Packet Sniffer SDK DLL Edition

HNAdapterConfig :: Methods :: AdpCfgGetIp

 Previous Next

Returns one of the IP addresses, assigned to the network adapter.

Syntax:

LPCTSTR __stdcall AdpCfgGetIp(HANDLE hCfg, INT Index);

Parameters:

hCfg

[in] HNAdapterConfig object handle.

Index

[in] IP address index. Value may be set from 0 to AdpCfgGetIpCount - 1.

Return values:

If the function succeeds, returned value will contain an IP address string. Otherwise it will contain an empty string.

Description:

Use this function to obtain one of the IP addresses, assigned to the network adapter (e.g., 192.168.0.1). This function may be useful both for generating the packets, which your application is going to send, and for analysing the packets received by the network adapter.

Requirements:

Unicode

Implemented as AdpCfgGetIpW (Unicode) and AdpCfgGetIpA (ANSI).

See also:HNAdapterConfig, AdpCfgGetIpCount