IPAddrAny, IPLoopbackAddr, IPLimited


C Specification

#include <dolphin/if.h>

extern const u8 IPAddrAny[IP_ALEN];           // 0.  0.  0.  0
extern const u8 IPLoopbackAddr[IP_ALEN];      // 127.0.  0.  1
extern const u8 IPLimited[IP_ALEN];           // 255.255.255.255

Description

Several well known IP addresses are defined in the library.

A loopback interface address (127.0.0.1) is defined as IPLoopbackAddr. It refers to the local host via the loopback interface.

The limited broadcast address (255.255.255.255) is defined as IPLimited. It is limited since a datagram sent to the limited broadcast address is never forwarded by a router.

While a host is determining its own IP address, it's address is represented as 0.0.0.0 which is defined as IPAddrAny. IPAddrAny is also used to specify any network interface for binding with IPSocket.

See Also