Click here to Skip to main content
15,885,546 members
Articles / Desktop Programming / MFC
Article

Using IP Helper API’s

Rate me:
Please Sign up or sign in to vote.
2.42/5 (12 votes)
31 Oct 20012 min read 286.6K   3.9K   29   22
This article demonstrates the usage of the Internet Protocol Helper API's

Sample Image - TCPInfo.jpg

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.

  1. Getting the TCP statistics such as active connections, segments sent and received etc.

  2. Getting the UDP statistics such as datagrams sent and received etc.

  3. Getting the IP statistics such as Reassembly time outs, invalid datagrams sent or received etc.

  4. Getting the ICMP statistics such as total ICMP messages sent or received, echo requests sent and echo replies received etc.

  5. Getting the active TCP connections with local and remote addresses and ports.

  6. 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.

  1. GetTcpStatistics()

    This API fills a MIB_TCPSTATS structure with TCP statistics. See sample application for usage.

  2. GetUdpStatistics()

    This API fills a MIB_UDPSTATS structure with UDP statistics. See sample application for usage.

  3. GetIpStatistics()

    This API fills a MIB_IPSTATS structure with IP statistics. See sample application for usage.

  4. GetIcmpStatistics()

    This API fills a MIB_ICMP structure with ICMP statistics about outgoing and incoming ICMP messages. See the sample application for usage.

  5. 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.

  6. 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

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
Generalhelp with the header files Pin
bluebarnacle1-Feb-06 17:51
bluebarnacle1-Feb-06 17:51 
GeneralRe: help with the header files Pin
Nurrizki Brahmantyo23-Jun-07 19:01
Nurrizki Brahmantyo23-Jun-07 19:01 
GeneralSetTcpEntry Pin
Vitoto19-May-05 10:05
Vitoto19-May-05 10:05 
Questionwhere can you download IP Helper ? Pin
orenboskila7-Jul-04 6:24
orenboskila7-Jul-04 6:24 
AnswerRe: where can you download IP Helper ? Pin
ThatsAlok12-Feb-05 2:25
ThatsAlok12-Feb-05 2:25 
GeneralPoor Code! I cannot compile the project! I cannot find the lib file and its head file! Pin
Kevin Bao13-Jun-04 16:56
Kevin Bao13-Jun-04 16:56 
GeneralRe: Poor Code! I cannot compile the project! I cannot find the lib file and its head file! Pin
ThatsAlok12-Feb-05 2:27
ThatsAlok12-Feb-05 2:27 
GeneralRe: Poor Code! I cannot compile the project! I cannot find the lib file and its head file! Pin
Andre Oliveira8-May-06 1:52
Andre Oliveira8-May-06 1:52 
GeneralRe: Poor Code! I cannot compile the project! I cannot find the lib file and its head file! Pin
ThatsAlok10-May-06 0:41
ThatsAlok10-May-06 0:41 
GeneralClosing a port Pin
Member 44057729-Sep-03 8:57
Member 44057729-Sep-03 8:57 
GeneralRe: Closing a port Pin
Farooque29-Sep-03 18:36
Farooque29-Sep-03 18:36 
GeneralRe: Closing a port Pin
Vitoto19-May-05 10:03
Vitoto19-May-05 10:03 
QuestionWhere's the article? Pin
Paul A. Howes18-Nov-02 9:38
Paul A. Howes18-Nov-02 9:38 
Generalgetting infos about the listening process Pin
20-Nov-01 2:55
suss20-Nov-01 2:55 
GeneralRe: getting infos about the listening process Pin
Anonymous11-Nov-02 5:51
Anonymous11-Nov-02 5:51 
GeneralA second to the "missing info" Pin
Peter Weyzen2-Nov-01 12:06
Peter Weyzen2-Nov-01 12:06 
GeneralRe: A second to the "missing info" Pin
niverson15-Aug-02 11:53
niverson15-Aug-02 11:53 
GeneralMissing Information... Pin
Dan Madden1-Nov-01 4:11
Dan Madden1-Nov-01 4:11 
GeneralRe: Missing Information... Pin
5-Nov-01 17:54
suss5-Nov-01 17:54 
GeneralRe: Missing Information... Pin
Dan Madden16-Feb-02 0:29
Dan Madden16-Feb-02 0:29 
GeneralRe: Missing Information... Pin
15-Feb-02 17:55
suss15-Feb-02 17:55 
GeneralRe: Missing Information... Pin
15-Feb-02 17:55
suss15-Feb-02 17:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.