Click here to Skip to main content
Click here to Skip to main content

Using IP Helper API’s

, 31 Oct 2001
Rate this:
Please Sign up or sign in to vote.
This article demonstrates the usage of the Internet Protocol Helper API's
<!-- Download Links --> <!-- Article image -->

Sample Image - TCPInfo.jpg

<!-- Main HTML starts here -->


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


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


About the Author

Farooque Khan

United States United States
No Biography provided

Comments and Discussions

GeneralRe: Closing a port PinmemberFarooque29-Sep-03 19:36 
GeneralRe: Closing a port PinmemberVitoto19-May-05 11:03 
QuestionWhere's the article? PinmemberPaul A. Howes18-Nov-02 10:38 
Generalgetting infos about the listening process PinmemberChristophe Renard20-Nov-01 3:55 
Great illustration.
But, does any one knows how to link the infos obtained from GetTcpStatistics to process(PID) or instance infos ?
I've found no way to do that in the whole MSDN.
Any help would be welcome.

The meta-Turing test counts a thing as intelligent if it seeks to
devise and apply Turing tests to objects of its own creation.
-- Lew Mammel, Jr.

GeneralRe: getting infos about the listening process PinsussAnonymous11-Nov-02 6:51 
GeneralA second to the "missing info" PinmemberPeter Weyzen2-Nov-01 13:06 
GeneralRe: A second to the "missing info" Pinmemberniverson15-Aug-02 12:53 
GeneralMissing Information... PinmemberDaniel Madden1-Nov-01 5:11 
GeneralRe: Missing Information... PinmemberFarooque Khan5-Nov-01 18:54 
GeneralRe: Missing Information... PinmemberDaniel Madden16-Feb-02 1:29 

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

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

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150123.1 | Last Updated 1 Nov 2001
Article Copyright 2001 by Farooque Khan
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid