prot_ip4.h

IPv4 protocol definitions.

Defines

IP_HLEN
IP_HLEN_MAX
IP_MIN_FRAG_LENGTH
IP4_MIN_MTU_LENGTH
IP_RF
IP_DF
IP_MF
IP_OFFMASK
IPH_V(hdr)
IPH_HL(hdr)
IPH_HL_BYTES(hdr)
IPH_TOS(hdr)
IPH_LEN(hdr)
IPH_ID(hdr)
IPH_OFFSET(hdr)
IPH_OFFSET_BYTES(hdr)
IPH_TTL(hdr)
IPH_PROTO(hdr)
IPH_CHKSUM(hdr)
IPH_VHL_SET(hdr, v, hl)
IPH_TOS_SET(hdr, tos)
IPH_LEN_SET(hdr, len)
IPH_ID_SET(hdr, id)
IPH_OFFSET_SET(hdr, off)
IPH_TTL_SET(hdr, ttl)
IPH_PROTO_SET(hdr, proto)
IPH_CHKSUM_SET(hdr, chksum)

Typedefs

typedefPACK_STRUCT_END struct ip4_addr_packed ip4_addr_p_t

Variables

PACK_STRUCT_BEGIN struct ip4_addr_packed PACK_STRUCT_STRUCT
struct ip4_addr_packed
#include <prot_ip4.h>

This is the packed version of ip4_addr_t, used in network headers that are itself packed.

Public Functions

PACK_STRUCT_FIELD (u32_t addr)
struct ip_hdr
#include <prot_ip4.h>

Public Functions

PACK_STRUCT_FLD_8 (u8_t _v_hl)
PACK_STRUCT_FLD_8 (u8_t _tos)
PACK_STRUCT_FIELD (u16_t _len)
PACK_STRUCT_FIELD (u16_t _id)
PACK_STRUCT_FIELD (u16_t _offset)
PACK_STRUCT_FLD_8 (u8_t _ttl)
PACK_STRUCT_FLD_8 (u8_t _proto)
PACK_STRUCT_FIELD (u16_t _chksum)
PACK_STRUCT_FLD_S (ip4_addr_p_t src)
PACK_STRUCT_FLD_S (ip4_addr_p_t dest)