|
The Pedigree Project 0.1
|
Include dependency graph for prot/ip4.h:Go to the source code of this file.
Classes | |
| struct | ip4_addr_packed |
| struct | ip_hdr |
Macros | |
| #define | IP_HLEN 20 |
| #define | IP_RF 0x8000U /* reserved fragment flag */ |
| #define | IP_DF 0x4000U /* don't fragment flag */ |
| #define | IP_MF 0x2000U /* more fragments flag */ |
| #define | IP_OFFMASK 0x1fffU /* mask for fragmenting bits */ |
| #define | IPH_V(hdr) ((hdr)->_v_hl >> 4) |
| #define | IPH_HL(hdr) ((hdr)->_v_hl & 0x0f) |
| #define | IPH_TOS(hdr) ((hdr)->_tos) |
| #define | IPH_LEN(hdr) ((hdr)->_len) |
| #define | IPH_ID(hdr) ((hdr)->_id) |
| #define | IPH_OFFSET(hdr) ((hdr)->_offset) |
| #define | IPH_TTL(hdr) ((hdr)->_ttl) |
| #define | IPH_PROTO(hdr) ((hdr)->_proto) |
| #define | IPH_CHKSUM(hdr) ((hdr)->_chksum) |
| #define | IPH_VHL_SET(hdr, v, hl) (hdr)->_v_hl = (u8_t)((((v) << 4) | (hl))) |
| #define | IPH_TOS_SET(hdr, tos) (hdr)->_tos = (tos) |
| #define | IPH_LEN_SET(hdr, len) (hdr)->_len = (len) |
| #define | IPH_ID_SET(hdr, id) (hdr)->_id = (id) |
| #define | IPH_OFFSET_SET(hdr, off) (hdr)->_offset = (off) |
| #define | IPH_TTL_SET(hdr, ttl) (hdr)->_ttl = (u8_t)(ttl) |
| #define | IPH_PROTO_SET(hdr, proto) (hdr)->_proto = (u8_t)(proto) |
| #define | IPH_CHKSUM_SET(hdr, chksum) (hdr)->_chksum = (chksum) |
Typedefs | |
| typedef typedefPACK_STRUCT_END struct ip4_addr_packed | ip4_addr_p_t |
Variables | |
| PACK_STRUCT_BEGIN struct ip4_addr_packed | PACK_STRUCT_STRUCT |
IPv4 protocol definitions
Definition in file prot/ip4.h.
| #define IP_DF 0x4000U /* don't fragment flag */ |
Definition at line 102 of file prot/ip4.h.
| #define IP_HLEN 20 |
Definition at line 83 of file prot/ip4.h.
| #define IP_MF 0x2000U /* more fragments flag */ |
Definition at line 103 of file prot/ip4.h.
| #define IP_OFFMASK 0x1fffU /* mask for fragmenting bits */ |
Definition at line 104 of file prot/ip4.h.
| #define IP_RF 0x8000U /* reserved fragment flag */ |
Definition at line 101 of file prot/ip4.h.
| #define IPH_CHKSUM | ( | hdr | ) | ((hdr)->_chksum) |
Definition at line 129 of file prot/ip4.h.
| #define IPH_CHKSUM_SET | ( | hdr, | |
| chksum | |||
| ) | (hdr)->_chksum = (chksum) |
Definition at line 139 of file prot/ip4.h.
| #define IPH_HL | ( | hdr | ) | ((hdr)->_v_hl & 0x0f) |
Definition at line 122 of file prot/ip4.h.
| #define IPH_ID | ( | hdr | ) | ((hdr)->_id) |
Definition at line 125 of file prot/ip4.h.
| #define IPH_ID_SET | ( | hdr, | |
| id | |||
| ) | (hdr)->_id = (id) |
Definition at line 135 of file prot/ip4.h.
| #define IPH_LEN | ( | hdr | ) | ((hdr)->_len) |
Definition at line 124 of file prot/ip4.h.
| #define IPH_LEN_SET | ( | hdr, | |
| len | |||
| ) | (hdr)->_len = (len) |
Definition at line 134 of file prot/ip4.h.
| #define IPH_OFFSET | ( | hdr | ) | ((hdr)->_offset) |
Definition at line 126 of file prot/ip4.h.
| #define IPH_OFFSET_SET | ( | hdr, | |
| off | |||
| ) | (hdr)->_offset = (off) |
Definition at line 136 of file prot/ip4.h.
| #define IPH_PROTO | ( | hdr | ) | ((hdr)->_proto) |
Definition at line 128 of file prot/ip4.h.
| #define IPH_PROTO_SET | ( | hdr, | |
| proto | |||
| ) | (hdr)->_proto = (u8_t)(proto) |
Definition at line 138 of file prot/ip4.h.
| #define IPH_TOS | ( | hdr | ) | ((hdr)->_tos) |
Definition at line 123 of file prot/ip4.h.
| #define IPH_TOS_SET | ( | hdr, | |
| tos | |||
| ) | (hdr)->_tos = (tos) |
Definition at line 133 of file prot/ip4.h.
| #define IPH_TTL | ( | hdr | ) | ((hdr)->_ttl) |
Definition at line 127 of file prot/ip4.h.
| #define IPH_TTL_SET | ( | hdr, | |
| ttl | |||
| ) | (hdr)->_ttl = (u8_t)(ttl) |
Definition at line 137 of file prot/ip4.h.
| #define IPH_V | ( | hdr | ) | ((hdr)->_v_hl >> 4) |
Definition at line 121 of file prot/ip4.h.
| #define IPH_VHL_SET | ( | hdr, | |
| v, | |||
| hl | |||
| ) | (hdr)->_v_hl = (u8_t)((((v) << 4) | (hl))) |
Definition at line 132 of file prot/ip4.h.
| typedef typedefPACK_STRUCT_END struct ip4_addr_packed ip4_addr_p_t |
Definition at line 80 of file prot/ip4.h.