#include <dolphin/ip.h>
struct ICMPInfo
{
//
// Note do not access members without API functions
//
IPInfo info;
IPSocket local; // Bind
IPSocket remote; // Connect
ICMPObj obj;
};
s32 ICMPSocket( int af, ICMPInfo* info );
ICMPSocket() initializes an endpoint for ICMP communication (ICMPInfo).
af must be SO_AF_INET (IPv4) or SO_AF_INET6(IPv6).
To send ICMP Echo Request (ping),
call ICMPPing().
Note:
When a session has been completed, ICMPClose()
should be performed.
af |
The address family (SO_AF_INET for IPv4 or SO_AF_INET6 for IPv6). |
info |
The pointer to the data structure that represents an endpoint for ICMP communication. |
IP_ERR_NONE |
Succeeded. |
IP_ERR_INVALID |
info is NULL, or af
is neither SO_AF_INET nor SO_AF_INET6. |
IP_ERR_EXIST |
Specified info is already in use. |