61 IP_FLAG_DONT_ROUTE = 0x0400,
63 IP_FLAG_HOP_LIMIT = 0x00FF
76#if (IPV4_SUPPORT == ENABLED)
79#if (IPV6_SUPPORT == ENABLED)
95#if (IPV4_SUPPORT == ENABLED)
96 Ipv4PseudoHeader ipv4Data;
98#if (IPV6_SUPPORT == ENABLED)
99 Ipv6PseudoHeader ipv6Data;
107extern const IpAddr IP_ADDR_ANY;
108extern const IpAddr IP_ADDR_UNSPECIFIED;
111error_t ipSendDatagram(NetInterface *interface,
113 NetTxAncillary *ancillary);
115error_t ipSelectSourceAddr(NetInterface **interface,
const IpAddr *destAddr,
118bool_t ipIsUnspecifiedAddr(
const IpAddr *ipAddr);
119bool_t ipIsLinkLocalAddr(
const IpAddr *ipAddr);
120bool_t ipIsMulticastAddr(
const IpAddr *ipAddr);
122bool_t ipCompAddr(
const IpAddr *ipAddr1,
const IpAddr *ipAddr2);
124bool_t ipCompPrefix(
const IpAddr *ipAddr1,
const IpAddr *ipAddr2,
127error_t ipJoinMulticastGroup(NetInterface *interface,
const IpAddr *groupAddr);
128error_t ipLeaveMulticastGroup(NetInterface *interface,
const IpAddr *groupAddr);
130uint16_t ipCalcChecksum(
const void *data,
size_t length);
131uint16_t ipCalcChecksumEx(
const NetBuffer *buffer,
size_t offset,
size_t length);
133uint16_t ipCalcUpperLayerChecksum(
const void *pseudoHeader,
134 size_t pseudoHeaderLen,
const void *data,
size_t dataLen);
136uint16_t ipCalcUpperLayerChecksumEx(
const void *pseudoHeader,
137 size_t pseudoHeaderLen,
const NetBuffer *buffer,
size_t offset,
size_t length);
139NetBuffer *ipAllocBuffer(
size_t length,
size_t *offset);
142char_t *ipAddrToString(
const IpAddr *ipAddr, char_t *str);
error_t
Error codes.
Definition error.h:43
IpProtocol
IP supported protocols.
Definition ip.h:49
IpFlags
Flags used by I/O functions.
Definition ip.h:60
IPv4 (Internet Protocol Version 4)
uint32_t Ipv4Addr
IPv4 network address.
Definition ipv4.h:267
IPv6 (Internet Protocol Version 6)
IP network address.
Definition ip.h:72
Structure describing a buffer that spans multiple chunks.
Definition net_mem.h:89