
Introduction
Internet
Protocol Helper (IP Helper) is an API that assists in the network administration
of the local computer. You can use IP Helper to programmatically retrieve
information about the network configuration of the local computer, and to
modify that configuration. This article and the associated code demonstrate
usage of some of the API’s. The sample application is developed using these
API's and can be used for following purposes.
- Getting
the TCP statistics such as active connections, segments sent and received etc.
- Getting
the UDP statistics such as datagrams sent and received etc.
- Getting
the IP statistics such as Reassembly time outs, invalid datagrams sent or
received etc.
- Getting
the ICMP statistics such as total ICMP messages sent or received, echo requests
sent and echo replies received etc.
- Getting
the active TCP connections with local and remote addresses and ports.
- Getting
the active UDP connections with local address and ports.
These
are some of the functions IP Helper API’s can do. In the sample application
following API's were used.
-
GetTcpStatistics()
This
API fills a MIB_TCPSTATS
structure with TCP statistics. See sample application
for usage.
-
GetUdpStatistics()
This
API fills a MIB_UDPSTATS
structure with UDP statistics. See sample application
for usage.
-
GetIpStatistics()
This
API fills a MIB_IPSTATS
structure with IP statistics. See sample application
for usage.
-
GetIcmpStatistics()
This
API fills a MIB_ICMP
structure with ICMP statistics about outgoing and incoming
ICMP messages. See the sample application for usage.
-
GetTcpTable()
This
API fills a buffer with the information about active TCP connections. Apart
from the status of the connections (Established, closing etc.) the local and
remote addresses and ports involved are also returned. See the sample
application for the usage of this API.
-
GetUdpTable()
This
API fills a buffer with UDP connections information. Only the local address and
ports of the connection are returned. See the sample application for the usage
of this API