P
P
progmax2014-04-19 04:33:52
Programming
progmax, 2014-04-19 04:33:52

How to implement a Windows connection checker (2 connections)?

Good afternoon!
Given:
Windows 7-8.
Two connections: 3G modem and twisted pair.
I need to implement a connection check service on a machine via a 3g modem.
That is, when the connection is lost through the 3G modem, send a report (the path will be email) through a twisted pair connection.
Please, tell me in which direction to study the issue.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2014-04-22
@progmax

  1. Get a list of interfaces (WinAPI: GetIfTable)
  2. Understand which ethernet (IF_TYPE_ETHERNET_CSMACD) and which ppp (IF_TYPE_PPP) (WinAPI: GetIfEntry). Look at PMIB_IFROW->dwType.
  3. Hang up on a socket on them. Ping on a timer via ppp, failed - email via another.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question