The IPv4 header.
More...
#include "rohc_utils.h"
#include <stdint.h>
#include "config.h"
Go to the source code of this file.
#define IPV4_ADDR_FORMAT "%02x%02x%02x%02x (%u.%u.%u.%u)" |
The format to print an IPv4 address
#define IPV4_ADDR_RAW |
( |
|
x | ) |
|
Value:(x)[0], (x)[1], (x)[2], (x)[3], \
(x)[0], (x)[1], (x)[2], (x)[3]
The data to print an IPv4 address in raw format
Mask for Don't Fragment (DF) flag
Mask for More Fragments (MF) flag
#define IPV4_OFFMASK 0x1fff |
mask for Fragment Offset field
static bool ipv4_is_fragment |
( |
const struct ipv4_hdr *const |
ipv4 | ) |
|
|
inlinestatic |
Whether the IPv4 packet is fragmented or not.
The IPv4 packet shall be at least sizeof(struct ipv4_hdr) long.
- Parameters
-
ipv4 | The IPv4 packet to check |
- Returns
- true if the IPv4 packet is a fragment, false if the IPv4 packet is not a fragment