31,7 → 31,7 |
*/ |
|
/** @file |
* Internet protocol header and options definitions. |
* IP header and options definitions. |
* Names according to the linux src/include/linux/ip.h header file. |
*/ |
|
87,6 → 87,7 |
uint16_t identification; |
#ifdef ARCH_IS_BIG_ENDIAN |
/** Various control flags. |
* @see |
*/ |
uint16_t flags:3; |
/** This field indicates where in the datagram this fragment belongs. |
165,15 → 166,40 |
#endif |
} __attribute__ ((packed)); |
|
/** @name IP flags definitions |
*/ |
/*@{*/ |
|
/** Fragment flag field shift. |
*/ |
#define IPFLAG_FRAGMENT_SHIFT 1 |
|
/** Fragmented flag field shift. |
*/ |
#define IPFLAG_FRAGMENTED_SHIFT 0 |
|
/** May fragment flag value. |
* Allows the packet fragmentation. |
*/ |
#define IPFLAG_MAY_FRAGMENT ( 0x0 << IPFLAG_FRAGMENT_SHIFT ) |
|
/** Don't fragment flag value. |
* Permits the packet fragmentation. |
*/ |
#define IPFLAG_DONT_FRAGMENT ( 0x1 << IPFLAG_FRAGMENT_SHIFT ) |
|
/** Last fragment flag value. |
* Indicates the last packet fragment. |
*/ |
#define IPFLAG_LAST_FRAGMENT ( 0x0 << IPFLAG_FRAGMENTED_SHIFT ) |
|
/** More fragments flag value. |
* Indicates that more packet fragments follow. |
*/ |
#define IPFLAG_MORE_FRAGMENTS ( 0x1 << IPFLAG_FRAGMENTED_SHIFT ) |
|
/*@}*/ |
|
/* |
#define IPOPT_OPTVAL 0 |
#define IPOPT_OLEN 1 |