tcpdump  4.99.1
About: tcpdump is a tool for network monitoring and data acquisition.
  Fossies Dox: tcpdump-4.99.1.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

extract.h File Reference
#include <string.h>
#include "funcattrs.h"
#include "netdissect.h"
Include dependency graph for extract.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EXTRACT_U_1(p)   ((uint8_t)(*(p)))
 
#define EXTRACT_S_1(p)   ((int8_t)(*(p)))
 
#define UNALIGNED_OK
 
#define EXTRACT_BE_U_2(p)
 
#define EXTRACT_BE_S_2(p)
 
#define EXTRACT_BE_U_4(p)
 
#define EXTRACT_BE_S_4(p)
 
#define EXTRACT_BE_U_8(p)
 
#define EXTRACT_BE_S_8(p)
 
#define EXTRACT_IPV4_TO_HOST_ORDER(p)
 
#define EXTRACT_BE_U_3(p)
 
#define EXTRACT_BE_S_3(p)
 
#define EXTRACT_BE_U_5(p)
 
#define EXTRACT_BE_S_5(p)
 
#define EXTRACT_BE_U_6(p)
 
#define EXTRACT_BE_S_6(p)
 
#define EXTRACT_BE_U_7(p)
 
#define EXTRACT_BE_S_7(p)
 
#define EXTRACT_LE_U_2(p)
 
#define EXTRACT_LE_S_2(p)
 
#define EXTRACT_LE_U_4(p)
 
#define EXTRACT_LE_S_4(p)
 
#define EXTRACT_LE_U_8(p)
 
#define EXTRACT_LE_S_8(p)
 
#define EXTRACT_LE_U_3(p)
 
#define EXTRACT_LE_S_3(p)
 
#define EXTRACT_LE_U_5(p)
 
#define EXTRACT_LE_U_6(p)
 
#define EXTRACT_LE_U_7(p)
 
#define ND_TTEST_1(p)   ND_TTEST_LEN((p), 1)
 
#define ND_TCHECK_1(p)   ND_TCHECK_LEN((p), 1)
 
#define ND_TTEST_2(p)   ND_TTEST_LEN((p), 2)
 
#define ND_TCHECK_2(p)   ND_TCHECK_LEN((p), 2)
 
#define ND_TTEST_3(p)   ND_TTEST_LEN((p), 3)
 
#define ND_TCHECK_3(p)   ND_TCHECK_LEN((p), 3)
 
#define ND_TTEST_4(p)   ND_TTEST_LEN((p), 4)
 
#define ND_TCHECK_4(p)   ND_TCHECK_LEN((p), 4)
 
#define ND_TTEST_5(p)   ND_TTEST_LEN((p), 5)
 
#define ND_TCHECK_5(p)   ND_TCHECK_LEN((p), 5)
 
#define ND_TTEST_6(p)   ND_TTEST_LEN((p), 6)
 
#define ND_TCHECK_6(p)   ND_TCHECK_LEN((p), 6)
 
#define ND_TTEST_7(p)   ND_TTEST_LEN((p), 7)
 
#define ND_TCHECK_7(p)   ND_TCHECK_LEN((p), 7)
 
#define ND_TTEST_8(p)   ND_TTEST_LEN((p), 8)
 
#define ND_TCHECK_8(p)   ND_TCHECK_LEN((p), 8)
 
#define ND_TTEST_16(p)   ND_TTEST_LEN((p), 16)
 
#define ND_TCHECK_16(p)   ND_TCHECK_LEN((p), 16)
 
#define GET_U_1(p)   get_u_1(ndo, (const u_char *)(p))
 
#define GET_S_1(p)   get_s_1(ndo, (const u_char *)(p))
 
#define GET_BE_U_2(p)   get_be_u_2(ndo, (const u_char *)(p))
 
#define GET_BE_U_3(p)   get_be_u_3(ndo, (const u_char *)(p))
 
#define GET_BE_U_4(p)   get_be_u_4(ndo, (const u_char *)(p))
 
#define GET_BE_U_5(p)   get_be_u_5(ndo, (const u_char *)(p))
 
#define GET_BE_U_6(p)   get_be_u_6(ndo, (const u_char *)(p))
 
#define GET_BE_U_7(p)   get_be_u_7(ndo, (const u_char *)(p))
 
#define GET_BE_U_8(p)   get_be_u_8(ndo, (const u_char *)(p))
 
#define GET_BE_S_2(p)   get_be_s_2(ndo, (const u_char *)(p))
 
#define GET_BE_S_3(p)   get_be_s_3(ndo, (const u_char *)(p))
 
#define GET_BE_S_4(p)   get_be_s_4(ndo, (const u_char *)(p))
 
#define GET_BE_S_5(p)   get_be_s_5(ndo, (const u_char *)(p))
 
#define GET_BE_S_6(p)   get_be_s_6(ndo, (const u_char *)(p))
 
#define GET_BE_S_7(p)   get_be_s_7(ndo, (const u_char *)(p))
 
#define GET_BE_S_8(p)   get_be_s_8(ndo, (const u_char *)(p))
 
#define GET_HE_U_2(p)   get_he_u_2(ndo, (const u_char *)(p))
 
#define GET_HE_U_4(p)   get_he_u_4(ndo, (const u_char *)(p))
 
#define GET_HE_S_2(p)   get_he_s_2(ndo, (const u_char *)(p))
 
#define GET_HE_S_4(p)   get_he_s_4(ndo, (const u_char *)(p))
 
#define GET_LE_U_2(p)   get_le_u_2(ndo, (const u_char *)(p))
 
#define GET_LE_U_3(p)   get_le_u_3(ndo, (const u_char *)(p))
 
#define GET_LE_U_4(p)   get_le_u_4(ndo, (const u_char *)(p))
 
#define GET_LE_U_5(p)   get_le_u_5(ndo, (const u_char *)(p))
 
#define GET_LE_U_6(p)   get_le_u_6(ndo, (const u_char *)(p))
 
#define GET_LE_U_7(p)   get_le_u_7(ndo, (const u_char *)(p))
 
#define GET_LE_U_8(p)   get_le_u_8(ndo, (const u_char *)(p))
 
#define GET_LE_S_2(p)   get_le_s_2(ndo, (const u_char *)(p))
 
#define GET_LE_S_3(p)   get_le_s_3(ndo, (const u_char *)(p))
 
#define GET_LE_S_4(p)   get_le_s_4(ndo, (const u_char *)(p))
 
#define GET_LE_S_8(p)   get_le_s_8(ndo, (const u_char *)(p))
 
#define GET_IPV4_TO_HOST_ORDER(p)   get_ipv4_to_host_order(ndo, (const u_char *)(p))
 
#define GET_IPV4_TO_NETWORK_ORDER(p)   get_ipv4_to_network_order(ndo, (const u_char *)(p))
 
#define GET_CPY_BYTES(dst, p, len)   get_cpy_bytes(ndo, (u_char *)(dst), (const u_char *)(p), len)
 

Functions

static uint16_t EXTRACT_HE_U_2 (const void *p)
 
static int16_t EXTRACT_HE_S_2 (const void *p)
 
static uint32_t EXTRACT_HE_U_4 (const void *p)
 
static int32_t EXTRACT_HE_S_4 (const void *p)
 
static uint32_t EXTRACT_IPV4_TO_NETWORK_ORDER (const void *p)
 
static void nd_trunc_longjmp (netdissect_options *ndo)
 
static uint8_t get_u_1 (netdissect_options *ndo, const u_char *p)
 
static int8_t get_s_1 (netdissect_options *ndo, const u_char *p)
 
static uint16_t get_be_u_2 (netdissect_options *ndo, const u_char *p)
 
static uint32_t get_be_u_3 (netdissect_options *ndo, const u_char *p)
 
static uint32_t get_be_u_4 (netdissect_options *ndo, const u_char *p)
 
static uint64_t get_be_u_5 (netdissect_options *ndo, const u_char *p)
 
static uint64_t get_be_u_6 (netdissect_options *ndo, const u_char *p)
 
static uint64_t get_be_u_7 (netdissect_options *ndo, const u_char *p)
 
static uint64_t get_be_u_8 (netdissect_options *ndo, const u_char *p)
 
static int16_t get_be_s_2 (netdissect_options *ndo, const u_char *p)
 
static int32_t get_be_s_3 (netdissect_options *ndo, const u_char *p)
 
static int32_t get_be_s_4 (netdissect_options *ndo, const u_char *p)
 
static int64_t get_be_s_5 (netdissect_options *ndo, const u_char *p)
 
static int64_t get_be_s_6 (netdissect_options *ndo, const u_char *p)
 
static int64_t get_be_s_7 (netdissect_options *ndo, const u_char *p)
 
static int64_t get_be_s_8 (netdissect_options *ndo, const u_char *p)
 
static uint16_t get_he_u_2 (netdissect_options *ndo, const u_char *p)
 
static uint32_t get_he_u_4 (netdissect_options *ndo, const u_char *p)
 
static int16_t get_he_s_2 (netdissect_options *ndo, const u_char *p)
 
static int32_t get_he_s_4 (netdissect_options *ndo, const u_char *p)
 
static uint16_t get_le_u_2 (netdissect_options *ndo, const u_char *p)
 
static uint32_t get_le_u_3 (netdissect_options *ndo, const u_char *p)
 
static uint32_t get_le_u_4 (netdissect_options *ndo, const u_char *p)
 
static uint64_t get_le_u_5 (netdissect_options *ndo, const u_char *p)
 
static uint64_t get_le_u_6 (netdissect_options *ndo, const u_char *p)
 
static uint64_t get_le_u_7 (netdissect_options *ndo, const u_char *p)
 
static uint64_t get_le_u_8 (netdissect_options *ndo, const u_char *p)
 
static int16_t get_le_s_2 (netdissect_options *ndo, const u_char *p)
 
static int32_t get_le_s_3 (netdissect_options *ndo, const u_char *p)
 
static int32_t get_le_s_4 (netdissect_options *ndo, const u_char *p)
 
static int64_t get_le_s_8 (netdissect_options *ndo, const u_char *p)
 
static uint32_t get_ipv4_to_host_order (netdissect_options *ndo, const u_char *p)
 
static uint32_t get_ipv4_to_network_order (netdissect_options *ndo, const u_char *p)
 
static void get_cpy_bytes (netdissect_options *ndo, u_char *dst, const u_char *p, size_t len)
 

Macro Definition Documentation

◆ EXTRACT_BE_S_2

#define EXTRACT_BE_S_2 (   p)
Value:
((int16_t)(((uint16_t)(*((const uint8_t *)(p) + 0)) << 8) | \
((uint16_t)(*((const uint8_t *)(p) + 1)) << 0)))

Definition at line 276 of file extract.h.

◆ EXTRACT_BE_S_3

#define EXTRACT_BE_S_3 (   p)
Value:
(((*((const uint8_t *)(p) + 0)) & 0x80) ? \
((int32_t)(((uint32_t)(*((const uint8_t *)(p) + 0)) << 16) | \
((uint32_t)(*((const uint8_t *)(p) + 1)) << 8) | \
((uint32_t)(*((const uint8_t *)(p) + 2)) << 0))) : \
((int32_t)(0xFF000000U | \
((uint32_t)(*((const uint8_t *)(p) + 0)) << 16) | \
((uint32_t)(*((const uint8_t *)(p) + 1)) << 8) | \
((uint32_t)(*((const uint8_t *)(p) + 2)) << 0))))

Definition at line 393 of file extract.h.

◆ EXTRACT_BE_S_4

#define EXTRACT_BE_S_4 (   p)
Value:
((int32_t)(((uint32_t)(*((const uint8_t *)(p) + 0)) << 24) | \
((uint32_t)(*((const uint8_t *)(p) + 1)) << 16) | \
((uint32_t)(*((const uint8_t *)(p) + 2)) << 8) | \
((uint32_t)(*((const uint8_t *)(p) + 3)) << 0)))

Definition at line 284 of file extract.h.

◆ EXTRACT_BE_S_5

#define EXTRACT_BE_S_5 (   p)
Value:
(((*((const uint8_t *)(p) + 0)) & 0x80) ? \
((int64_t)(((uint64_t)(*((const uint8_t *)(p) + 0)) << 32) | \
((uint64_t)(*((const uint8_t *)(p) + 1)) << 24) | \
((uint64_t)(*((const uint8_t *)(p) + 2)) << 16) | \
((uint64_t)(*((const uint8_t *)(p) + 3)) << 8) | \
((uint64_t)(*((const uint8_t *)(p) + 4)) << 0))) : \
((int64_t)(INT64_T_CONSTANT(0xFFFFFF0000000000U) | \
((uint64_t)(*((const uint8_t *)(p) + 0)) << 32) | \
((uint64_t)(*((const uint8_t *)(p) + 1)) << 24) | \
((uint64_t)(*((const uint8_t *)(p) + 2)) << 16) | \
((uint64_t)(*((const uint8_t *)(p) + 3)) << 8) | \
((uint64_t)(*((const uint8_t *)(p) + 4)) << 0))))
#define INT64_T_CONSTANT(constant)

Definition at line 410 of file extract.h.

◆ EXTRACT_BE_S_6

#define EXTRACT_BE_S_6 (   p)
Value:
(((*((const uint8_t *)(p) + 0)) & 0x80) ? \
((int64_t)(((uint64_t)(*((const uint8_t *)(p) + 0)) << 40) | \
((uint64_t)(*((const uint8_t *)(p) + 1)) << 32) | \
((uint64_t)(*((const uint8_t *)(p) + 2)) << 24) | \
((uint64_t)(*((const uint8_t *)(p) + 3)) << 16) | \
((uint64_t)(*((const uint8_t *)(p) + 4)) << 8) | \
((uint64_t)(*((const uint8_t *)(p) + 5)) << 0))) : \
((int64_t)(INT64_T_CONSTANT(0xFFFFFFFF00000000U) | \
((uint64_t)(*((const uint8_t *)(p) + 0)) << 40) | \
((uint64_t)(*((const uint8_t *)(p) + 1)) << 32) | \
((uint64_t)(*((const uint8_t *)(p) + 2)) << 24) | \
((uint64_t)(*((const uint8_t *)(p) + 3)) << 16) | \
((uint64_t)(*((const uint8_t *)(p) + 4)) << 8) | \
((uint64_t)(*((const uint8_t *)(p) + 5)) << 0))))

Definition at line 432 of file extract.h.

◆ EXTRACT_BE_S_7

#define EXTRACT_BE_S_7 (   p)
Value:
(((*((const uint8_t *)(p) + 0)) & 0x80) ? \
((int64_t)(((uint64_t)(*((const uint8_t *)(p) + 0)) << 48) | \
((uint64_t)(*((const uint8_t *)(p) + 1)) << 40) | \
((uint64_t)(*((const uint8_t *)(p) + 2)) << 32) | \
((uint64_t)(*((const uint8_t *)(p) + 3)) << 24) | \
((uint64_t)(*((const uint8_t *)(p) + 4)) << 16) | \
((uint64_t)(*((const uint8_t *)(p) + 5)) << 8) | \
((uint64_t)(*((const uint8_t *)(p) + 6)) << 0))) : \
((int64_t)(INT64_T_CONSTANT(0xFFFFFFFFFF000000U) | \
((uint64_t)(*((const uint8_t *)(p) + 0)) << 48) | \
((uint64_t)(*((const uint8_t *)(p) + 1)) << 40) | \
((uint64_t)(*((const uint8_t *)(p) + 2)) << 32) | \
((uint64_t)(*((const uint8_t *)(p) + 3)) << 24) | \
((uint64_t)(*((const uint8_t *)(p) + 4)) << 16) | \
((uint64_t)(*((const uint8_t *)(p) + 5)) << 8) | \
((uint64_t)(*((const uint8_t *)(p) + 6)) << 0))))

Definition at line 457 of file extract.h.

◆ EXTRACT_BE_S_8

#define EXTRACT_BE_S_8 (   p)
Value:
((int64_t)(((uint64_t)(*((const uint8_t *)(p) + 0)) << 56) | \
((uint64_t)(*((const uint8_t *)(p) + 1)) << 48) | \
((uint64_t)(*((const uint8_t *)(p) + 2)) << 40) | \
((uint64_t)(*((const uint8_t *)(p) + 3)) << 32) | \
((uint64_t)(*((const uint8_t *)(p) + 4)) << 24) | \
((uint64_t)(*((const uint8_t *)(p) + 5)) << 16) | \
((uint64_t)(*((const uint8_t *)(p) + 6)) << 8) | \
((uint64_t)(*((const uint8_t *)(p) + 7)) << 0)))

Definition at line 298 of file extract.h.

◆ EXTRACT_BE_U_2

#define EXTRACT_BE_U_2 (   p)
Value:
((uint16_t)(((uint16_t)(*((const uint8_t *)(p) + 0)) << 8) | \
((uint16_t)(*((const uint8_t *)(p) + 1)) << 0)))

Definition at line 273 of file extract.h.

◆ EXTRACT_BE_U_3

#define EXTRACT_BE_U_3 (   p)
Value:
((uint32_t)(((uint32_t)(*((const uint8_t *)(p) + 0)) << 16) | \
((uint32_t)(*((const uint8_t *)(p) + 1)) << 8) | \
((uint32_t)(*((const uint8_t *)(p) + 2)) << 0)))

Definition at line 388 of file extract.h.

◆ EXTRACT_BE_U_4

#define EXTRACT_BE_U_4 (   p)
Value:
((uint32_t)(((uint32_t)(*((const uint8_t *)(p) + 0)) << 24) | \
((uint32_t)(*((const uint8_t *)(p) + 1)) << 16) | \
((uint32_t)(*((const uint8_t *)(p) + 2)) << 8) | \
((uint32_t)(*((const uint8_t *)(p) + 3)) << 0)))

Definition at line 279 of file extract.h.

◆ EXTRACT_BE_U_5

#define EXTRACT_BE_U_5 (   p)
Value:
((uint64_t)(((uint64_t)(*((const uint8_t *)(p) + 0)) << 32) | \
((uint64_t)(*((const uint8_t *)(p) + 1)) << 24) | \
((uint64_t)(*((const uint8_t *)(p) + 2)) << 16) | \
((uint64_t)(*((const uint8_t *)(p) + 3)) << 8) | \
((uint64_t)(*((const uint8_t *)(p) + 4)) << 0)))

Definition at line 403 of file extract.h.

◆ EXTRACT_BE_U_6

#define EXTRACT_BE_U_6 (   p)
Value:
((uint64_t)(((uint64_t)(*((const uint8_t *)(p) + 0)) << 40) | \
((uint64_t)(*((const uint8_t *)(p) + 1)) << 32) | \
((uint64_t)(*((const uint8_t *)(p) + 2)) << 24) | \
((uint64_t)(*((const uint8_t *)(p) + 3)) << 16) | \
((uint64_t)(*((const uint8_t *)(p) + 4)) << 8) | \
((uint64_t)(*((const uint8_t *)(p) + 5)) << 0)))

Definition at line 424 of file extract.h.

◆ EXTRACT_BE_U_7

#define EXTRACT_BE_U_7 (   p)
Value:
((uint64_t)(((uint64_t)(*((const uint8_t *)(p) + 0)) << 48) | \
((uint64_t)(*((const uint8_t *)(p) + 1)) << 40) | \
((uint64_t)(*((const uint8_t *)(p) + 2)) << 32) | \
((uint64_t)(*((const uint8_t *)(p) + 3)) << 24) | \
((uint64_t)(*((const uint8_t *)(p) + 4)) << 16) | \
((uint64_t)(*((const uint8_t *)(p) + 5)) << 8) | \
((uint64_t)(*((const uint8_t *)(p) + 6)) << 0)))

Definition at line 448 of file extract.h.

◆ EXTRACT_BE_U_8

#define EXTRACT_BE_U_8 (   p)
Value:
((uint64_t)(((uint64_t)(*((const uint8_t *)(p) + 0)) << 56) | \
((uint64_t)(*((const uint8_t *)(p) + 1)) << 48) | \
((uint64_t)(*((const uint8_t *)(p) + 2)) << 40) | \
((uint64_t)(*((const uint8_t *)(p) + 3)) << 32) | \
((uint64_t)(*((const uint8_t *)(p) + 4)) << 24) | \
((uint64_t)(*((const uint8_t *)(p) + 5)) << 16) | \
((uint64_t)(*((const uint8_t *)(p) + 6)) << 8) | \
((uint64_t)(*((const uint8_t *)(p) + 7)) << 0)))

Definition at line 289 of file extract.h.

◆ EXTRACT_IPV4_TO_HOST_ORDER

#define EXTRACT_IPV4_TO_HOST_ORDER (   p)
Value:
((uint32_t)(((uint32_t)(*((const uint8_t *)(p) + 0)) << 24) | \
((uint32_t)(*((const uint8_t *)(p) + 1)) << 16) | \
((uint32_t)(*((const uint8_t *)(p) + 2)) << 8) | \
((uint32_t)(*((const uint8_t *)(p) + 3)) << 0)))

Definition at line 312 of file extract.h.

◆ EXTRACT_LE_S_2

#define EXTRACT_LE_S_2 (   p)
Value:
((int16_t)(((uint16_t)(*((const uint8_t *)(p) + 1)) << 8) | \
((uint16_t)(*((const uint8_t *)(p) + 0)) << 0)))

Definition at line 482 of file extract.h.

◆ EXTRACT_LE_S_3

#define EXTRACT_LE_S_3 (   p)
Value:
((int32_t)(((uint32_t)(*((const uint8_t *)(p) + 2)) << 16) | \
((uint32_t)(*((const uint8_t *)(p) + 1)) << 8) | \
((uint32_t)(*((const uint8_t *)(p) + 0)) << 0)))

Definition at line 522 of file extract.h.

◆ EXTRACT_LE_S_4

#define EXTRACT_LE_S_4 (   p)
Value:
((int32_t)(((uint32_t)(*((const uint8_t *)(p) + 3)) << 24) | \
((uint32_t)(*((const uint8_t *)(p) + 2)) << 16) | \
((uint32_t)(*((const uint8_t *)(p) + 1)) << 8) | \
((uint32_t)(*((const uint8_t *)(p) + 0)) << 0)))

Definition at line 490 of file extract.h.

◆ EXTRACT_LE_S_8

#define EXTRACT_LE_S_8 (   p)
Value:
((int64_t)(((uint64_t)(*((const uint8_t *)(p) + 7)) << 56) | \
((uint64_t)(*((const uint8_t *)(p) + 6)) << 48) | \
((uint64_t)(*((const uint8_t *)(p) + 5)) << 40) | \
((uint64_t)(*((const uint8_t *)(p) + 4)) << 32) | \
((uint64_t)(*((const uint8_t *)(p) + 3)) << 24) | \
((uint64_t)(*((const uint8_t *)(p) + 2)) << 16) | \
((uint64_t)(*((const uint8_t *)(p) + 1)) << 8) | \
((uint64_t)(*((const uint8_t *)(p) + 0)) << 0)))

Definition at line 504 of file extract.h.

◆ EXTRACT_LE_U_2

#define EXTRACT_LE_U_2 (   p)
Value:
((uint16_t)(((uint16_t)(*((const uint8_t *)(p) + 1)) << 8) | \
((uint16_t)(*((const uint8_t *)(p) + 0)) << 0)))

Definition at line 479 of file extract.h.

◆ EXTRACT_LE_U_3

#define EXTRACT_LE_U_3 (   p)
Value:
((uint32_t)(((uint32_t)(*((const uint8_t *)(p) + 2)) << 16) | \
((uint32_t)(*((const uint8_t *)(p) + 1)) << 8) | \
((uint32_t)(*((const uint8_t *)(p) + 0)) << 0)))

Definition at line 518 of file extract.h.

◆ EXTRACT_LE_U_4

#define EXTRACT_LE_U_4 (   p)
Value:
((uint32_t)(((uint32_t)(*((const uint8_t *)(p) + 3)) << 24) | \
((uint32_t)(*((const uint8_t *)(p) + 2)) << 16) | \
((uint32_t)(*((const uint8_t *)(p) + 1)) << 8) | \
((uint32_t)(*((const uint8_t *)(p) + 0)) << 0)))

Definition at line 485 of file extract.h.

◆ EXTRACT_LE_U_5

#define EXTRACT_LE_U_5 (   p)
Value:
((uint64_t)(((uint64_t)(*((const uint8_t *)(p) + 4)) << 32) | \
((uint64_t)(*((const uint8_t *)(p) + 3)) << 24) | \
((uint64_t)(*((const uint8_t *)(p) + 2)) << 16) | \
((uint64_t)(*((const uint8_t *)(p) + 1)) << 8) | \
((uint64_t)(*((const uint8_t *)(p) + 0)) << 0)))

Definition at line 526 of file extract.h.

◆ EXTRACT_LE_U_6

#define EXTRACT_LE_U_6 (   p)
Value:
((uint64_t)(((uint64_t)(*((const uint8_t *)(p) + 5)) << 40) | \
((uint64_t)(*((const uint8_t *)(p) + 4)) << 32) | \
((uint64_t)(*((const uint8_t *)(p) + 3)) << 24) | \
((uint64_t)(*((const uint8_t *)(p) + 2)) << 16) | \
((uint64_t)(*((const uint8_t *)(p) + 1)) << 8) | \
((uint64_t)(*((const uint8_t *)(p) + 0)) << 0)))

Definition at line 532 of file extract.h.

◆ EXTRACT_LE_U_7

#define EXTRACT_LE_U_7 (   p)
Value:
((uint64_t)(((uint64_t)(*((const uint8_t *)(p) + 6)) << 48) | \
((uint64_t)(*((const uint8_t *)(p) + 5)) << 40) | \
((uint64_t)(*((const uint8_t *)(p) + 4)) << 32) | \
((uint64_t)(*((const uint8_t *)(p) + 3)) << 24) | \
((uint64_t)(*((const uint8_t *)(p) + 2)) << 16) | \
((uint64_t)(*((const uint8_t *)(p) + 1)) << 8) | \
((uint64_t)(*((const uint8_t *)(p) + 0)) << 0)))

Definition at line 539 of file extract.h.

◆ EXTRACT_LE_U_8

#define EXTRACT_LE_U_8 (   p)
Value:
((uint64_t)(((uint64_t)(*((const uint8_t *)(p) + 7)) << 56) | \
((uint64_t)(*((const uint8_t *)(p) + 6)) << 48) | \
((uint64_t)(*((const uint8_t *)(p) + 5)) << 40) | \
((uint64_t)(*((const uint8_t *)(p) + 4)) << 32) | \
((uint64_t)(*((const uint8_t *)(p) + 3)) << 24) | \
((uint64_t)(*((const uint8_t *)(p) + 2)) << 16) | \
((uint64_t)(*((const uint8_t *)(p) + 1)) << 8) | \
((uint64_t)(*((const uint8_t *)(p) + 0)) << 0)))

Definition at line 495 of file extract.h.

◆ EXTRACT_S_1

#define EXTRACT_S_1 (   p)    ((int8_t)(*(p)))

Definition at line 32 of file extract.h.

◆ EXTRACT_U_1

#define EXTRACT_U_1 (   p)    ((uint8_t)(*(p)))

Definition at line 31 of file extract.h.

◆ GET_BE_S_2

#define GET_BE_S_2 (   p)    get_be_s_2(ndo, (const u_char *)(p))

Definition at line 883 of file extract.h.

◆ GET_BE_S_3

#define GET_BE_S_3 (   p)    get_be_s_3(ndo, (const u_char *)(p))

Definition at line 884 of file extract.h.

◆ GET_BE_S_4

#define GET_BE_S_4 (   p)    get_be_s_4(ndo, (const u_char *)(p))

Definition at line 885 of file extract.h.

◆ GET_BE_S_5

#define GET_BE_S_5 (   p)    get_be_s_5(ndo, (const u_char *)(p))

Definition at line 886 of file extract.h.

◆ GET_BE_S_6

#define GET_BE_S_6 (   p)    get_be_s_6(ndo, (const u_char *)(p))

Definition at line 887 of file extract.h.

◆ GET_BE_S_7

#define GET_BE_S_7 (   p)    get_be_s_7(ndo, (const u_char *)(p))

Definition at line 888 of file extract.h.

◆ GET_BE_S_8

#define GET_BE_S_8 (   p)    get_be_s_8(ndo, (const u_char *)(p))

Definition at line 889 of file extract.h.

◆ GET_BE_U_2

#define GET_BE_U_2 (   p)    get_be_u_2(ndo, (const u_char *)(p))

Definition at line 875 of file extract.h.

◆ GET_BE_U_3

#define GET_BE_U_3 (   p)    get_be_u_3(ndo, (const u_char *)(p))

Definition at line 876 of file extract.h.

◆ GET_BE_U_4

#define GET_BE_U_4 (   p)    get_be_u_4(ndo, (const u_char *)(p))

Definition at line 877 of file extract.h.

◆ GET_BE_U_5

#define GET_BE_U_5 (   p)    get_be_u_5(ndo, (const u_char *)(p))

Definition at line 878 of file extract.h.

◆ GET_BE_U_6

#define GET_BE_U_6 (   p)    get_be_u_6(ndo, (const u_char *)(p))

Definition at line 879 of file extract.h.

◆ GET_BE_U_7

#define GET_BE_U_7 (   p)    get_be_u_7(ndo, (const u_char *)(p))

Definition at line 880 of file extract.h.

◆ GET_BE_U_8

#define GET_BE_U_8 (   p)    get_be_u_8(ndo, (const u_char *)(p))

Definition at line 881 of file extract.h.

◆ GET_CPY_BYTES

#define GET_CPY_BYTES (   dst,
  p,
  len 
)    get_cpy_bytes(ndo, (u_char *)(dst), (const u_char *)(p), len)

Definition at line 913 of file extract.h.

◆ GET_HE_S_2

#define GET_HE_S_2 (   p)    get_he_s_2(ndo, (const u_char *)(p))

Definition at line 894 of file extract.h.

◆ GET_HE_S_4

#define GET_HE_S_4 (   p)    get_he_s_4(ndo, (const u_char *)(p))

Definition at line 895 of file extract.h.

◆ GET_HE_U_2

#define GET_HE_U_2 (   p)    get_he_u_2(ndo, (const u_char *)(p))

Definition at line 891 of file extract.h.

◆ GET_HE_U_4

#define GET_HE_U_4 (   p)    get_he_u_4(ndo, (const u_char *)(p))

Definition at line 892 of file extract.h.

◆ GET_IPV4_TO_HOST_ORDER

#define GET_IPV4_TO_HOST_ORDER (   p)    get_ipv4_to_host_order(ndo, (const u_char *)(p))

Definition at line 910 of file extract.h.

◆ GET_IPV4_TO_NETWORK_ORDER

#define GET_IPV4_TO_NETWORK_ORDER (   p)    get_ipv4_to_network_order(ndo, (const u_char *)(p))

Definition at line 911 of file extract.h.

◆ GET_LE_S_2

#define GET_LE_S_2 (   p)    get_le_s_2(ndo, (const u_char *)(p))

Definition at line 905 of file extract.h.

◆ GET_LE_S_3

#define GET_LE_S_3 (   p)    get_le_s_3(ndo, (const u_char *)(p))

Definition at line 906 of file extract.h.

◆ GET_LE_S_4

#define GET_LE_S_4 (   p)    get_le_s_4(ndo, (const u_char *)(p))

Definition at line 907 of file extract.h.

◆ GET_LE_S_8

#define GET_LE_S_8 (   p)    get_le_s_8(ndo, (const u_char *)(p))

Definition at line 908 of file extract.h.

◆ GET_LE_U_2

#define GET_LE_U_2 (   p)    get_le_u_2(ndo, (const u_char *)(p))

Definition at line 897 of file extract.h.

◆ GET_LE_U_3

#define GET_LE_U_3 (   p)    get_le_u_3(ndo, (const u_char *)(p))

Definition at line 898 of file extract.h.

◆ GET_LE_U_4

#define GET_LE_U_4 (   p)    get_le_u_4(ndo, (const u_char *)(p))

Definition at line 899 of file extract.h.

◆ GET_LE_U_5

#define GET_LE_U_5 (   p)    get_le_u_5(ndo, (const u_char *)(p))

Definition at line 900 of file extract.h.

◆ GET_LE_U_6

#define GET_LE_U_6 (   p)    get_le_u_6(ndo, (const u_char *)(p))

Definition at line 901 of file extract.h.

◆ GET_LE_U_7

#define GET_LE_U_7 (   p)    get_le_u_7(ndo, (const u_char *)(p))

Definition at line 902 of file extract.h.

◆ GET_LE_U_8

#define GET_LE_U_8 (   p)    get_le_u_8(ndo, (const u_char *)(p))

Definition at line 903 of file extract.h.

◆ GET_S_1

#define GET_S_1 (   p)    get_s_1(ndo, (const u_char *)(p))

Definition at line 873 of file extract.h.

◆ GET_U_1

#define GET_U_1 (   p)    get_u_1(ndo, (const u_char *)(p))

Definition at line 872 of file extract.h.

◆ ND_TCHECK_1

#define ND_TCHECK_1 (   p)    ND_TCHECK_LEN((p), 1)

Definition at line 552 of file extract.h.

◆ ND_TCHECK_16

#define ND_TCHECK_16 (   p)    ND_TCHECK_LEN((p), 16)

Definition at line 576 of file extract.h.

◆ ND_TCHECK_2

#define ND_TCHECK_2 (   p)    ND_TCHECK_LEN((p), 2)

Definition at line 555 of file extract.h.

◆ ND_TCHECK_3

#define ND_TCHECK_3 (   p)    ND_TCHECK_LEN((p), 3)

Definition at line 558 of file extract.h.

◆ ND_TCHECK_4

#define ND_TCHECK_4 (   p)    ND_TCHECK_LEN((p), 4)

Definition at line 561 of file extract.h.

◆ ND_TCHECK_5

#define ND_TCHECK_5 (   p)    ND_TCHECK_LEN((p), 5)

Definition at line 564 of file extract.h.

◆ ND_TCHECK_6

#define ND_TCHECK_6 (   p)    ND_TCHECK_LEN((p), 6)

Definition at line 567 of file extract.h.

◆ ND_TCHECK_7

#define ND_TCHECK_7 (   p)    ND_TCHECK_LEN((p), 7)

Definition at line 570 of file extract.h.

◆ ND_TCHECK_8

#define ND_TCHECK_8 (   p)    ND_TCHECK_LEN((p), 8)

Definition at line 573 of file extract.h.

◆ ND_TTEST_1

#define ND_TTEST_1 (   p)    ND_TTEST_LEN((p), 1)

Definition at line 551 of file extract.h.

◆ ND_TTEST_16

#define ND_TTEST_16 (   p)    ND_TTEST_LEN((p), 16)

Definition at line 575 of file extract.h.

◆ ND_TTEST_2

#define ND_TTEST_2 (   p)    ND_TTEST_LEN((p), 2)

Definition at line 554 of file extract.h.

◆ ND_TTEST_3

#define ND_TTEST_3 (   p)    ND_TTEST_LEN((p), 3)

Definition at line 557 of file extract.h.

◆ ND_TTEST_4

#define ND_TTEST_4 (   p)    ND_TTEST_LEN((p), 4)

Definition at line 560 of file extract.h.

◆ ND_TTEST_5

#define ND_TTEST_5 (   p)    ND_TTEST_LEN((p), 5)

Definition at line 563 of file extract.h.

◆ ND_TTEST_6

#define ND_TTEST_6 (   p)    ND_TTEST_LEN((p), 6)

Definition at line 566 of file extract.h.

◆ ND_TTEST_7

#define ND_TTEST_7 (   p)    ND_TTEST_LEN((p), 7)

Definition at line 569 of file extract.h.

◆ ND_TTEST_8

#define ND_TTEST_8 (   p)    ND_TTEST_LEN((p), 8)

Definition at line 572 of file extract.h.

◆ UNALIGNED_OK

#define UNALIGNED_OK

Definition at line 68 of file extract.h.

Function Documentation

◆ EXTRACT_HE_S_2()

static int16_t EXTRACT_HE_S_2 ( const void *  p)
inlinestatic

Definition at line 343 of file extract.h.

References UNALIGNED_MEMCPY.

Referenced by get_he_s_2().

◆ EXTRACT_HE_S_4()

static int32_t EXTRACT_HE_S_4 ( const void *  p)
inlinestatic

Definition at line 361 of file extract.h.

References UNALIGNED_MEMCPY.

Referenced by get_he_s_4().

◆ EXTRACT_HE_U_2()

static uint16_t EXTRACT_HE_U_2 ( const void *  p)
inlinestatic

Definition at line 334 of file extract.h.

References UNALIGNED_MEMCPY.

Referenced by get_he_u_2().

◆ EXTRACT_HE_U_4()

static uint32_t EXTRACT_HE_U_4 ( const void *  p)
inlinestatic

Definition at line 352 of file extract.h.

References UNALIGNED_MEMCPY.

Referenced by get_he_u_4().

◆ EXTRACT_IPV4_TO_NETWORK_ORDER()

static uint32_t EXTRACT_IPV4_TO_NETWORK_ORDER ( const void *  p)
inlinestatic

Definition at line 377 of file extract.h.

References UNALIGNED_MEMCPY.

Referenced by get_ipv4_to_network_order().

◆ get_be_s_2()

static int16_t get_be_s_2 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 663 of file extract.h.

References EXTRACT_BE_S_2, nd_trunc_longjmp(), and ND_TTEST_2.

◆ get_be_s_3()

static int32_t get_be_s_3 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 671 of file extract.h.

References EXTRACT_BE_S_3, nd_trunc_longjmp(), and ND_TTEST_3.

◆ get_be_s_4()

static int32_t get_be_s_4 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 679 of file extract.h.

References EXTRACT_BE_S_4, nd_trunc_longjmp(), and ND_TTEST_4.

◆ get_be_s_5()

static int64_t get_be_s_5 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 687 of file extract.h.

References EXTRACT_BE_S_5, nd_trunc_longjmp(), and ND_TTEST_5.

◆ get_be_s_6()

static int64_t get_be_s_6 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 695 of file extract.h.

References EXTRACT_BE_S_6, nd_trunc_longjmp(), and ND_TTEST_6.

◆ get_be_s_7()

static int64_t get_be_s_7 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 703 of file extract.h.

References EXTRACT_BE_S_7, nd_trunc_longjmp(), and ND_TTEST_7.

◆ get_be_s_8()

static int64_t get_be_s_8 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 711 of file extract.h.

References EXTRACT_BE_S_8, nd_trunc_longjmp(), and ND_TTEST_8.

◆ get_be_u_2()

static uint16_t get_be_u_2 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 605 of file extract.h.

References EXTRACT_BE_U_2, nd_trunc_longjmp(), and ND_TTEST_2.

◆ get_be_u_3()

static uint32_t get_be_u_3 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 613 of file extract.h.

References EXTRACT_BE_U_3, nd_trunc_longjmp(), and ND_TTEST_3.

◆ get_be_u_4()

static uint32_t get_be_u_4 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 621 of file extract.h.

References EXTRACT_BE_U_4, nd_trunc_longjmp(), and ND_TTEST_4.

◆ get_be_u_5()

static uint64_t get_be_u_5 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 629 of file extract.h.

References EXTRACT_BE_U_5, nd_trunc_longjmp(), and ND_TTEST_5.

◆ get_be_u_6()

static uint64_t get_be_u_6 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 637 of file extract.h.

References EXTRACT_BE_U_6, nd_trunc_longjmp(), and ND_TTEST_6.

◆ get_be_u_7()

static uint64_t get_be_u_7 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 645 of file extract.h.

References EXTRACT_BE_U_7, nd_trunc_longjmp(), and ND_TTEST_7.

◆ get_be_u_8()

static uint64_t get_be_u_8 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 653 of file extract.h.

References EXTRACT_BE_U_8, nd_trunc_longjmp(), and ND_TTEST_8.

◆ get_cpy_bytes()

static void get_cpy_bytes ( netdissect_options ndo,
u_char *  dst,
const u_char *  p,
size_t  len 
)
inlinestatic

Definition at line 865 of file extract.h.

References nd_trunc_longjmp(), ND_TTEST_LEN, and UNALIGNED_MEMCPY.

◆ get_he_s_2()

static int16_t get_he_s_2 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 739 of file extract.h.

References EXTRACT_HE_S_2(), nd_trunc_longjmp(), and ND_TTEST_2.

◆ get_he_s_4()

static int32_t get_he_s_4 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 747 of file extract.h.

References EXTRACT_HE_S_4(), nd_trunc_longjmp(), and ND_TTEST_4.

◆ get_he_u_2()

static uint16_t get_he_u_2 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 721 of file extract.h.

References EXTRACT_HE_U_2(), nd_trunc_longjmp(), and ND_TTEST_2.

◆ get_he_u_4()

static uint32_t get_he_u_4 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 729 of file extract.h.

References EXTRACT_HE_U_4(), nd_trunc_longjmp(), and ND_TTEST_4.

◆ get_ipv4_to_host_order()

static uint32_t get_ipv4_to_host_order ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 849 of file extract.h.

References EXTRACT_IPV4_TO_HOST_ORDER, nd_trunc_longjmp(), and ND_TTEST_4.

◆ get_ipv4_to_network_order()

static uint32_t get_ipv4_to_network_order ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 857 of file extract.h.

References EXTRACT_IPV4_TO_NETWORK_ORDER(), nd_trunc_longjmp(), and ND_TTEST_4.

◆ get_le_s_2()

static int16_t get_le_s_2 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 815 of file extract.h.

References EXTRACT_LE_S_2, nd_trunc_longjmp(), and ND_TTEST_2.

◆ get_le_s_3()

static int32_t get_le_s_3 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 823 of file extract.h.

References EXTRACT_LE_S_3, nd_trunc_longjmp(), and ND_TTEST_3.

◆ get_le_s_4()

static int32_t get_le_s_4 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 831 of file extract.h.

References EXTRACT_LE_S_4, nd_trunc_longjmp(), and ND_TTEST_4.

◆ get_le_s_8()

static int64_t get_le_s_8 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 839 of file extract.h.

References EXTRACT_LE_S_8, nd_trunc_longjmp(), and ND_TTEST_8.

◆ get_le_u_2()

static uint16_t get_le_u_2 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 757 of file extract.h.

References EXTRACT_LE_U_2, nd_trunc_longjmp(), and ND_TTEST_2.

◆ get_le_u_3()

static uint32_t get_le_u_3 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 765 of file extract.h.

References EXTRACT_LE_U_3, nd_trunc_longjmp(), and ND_TTEST_3.

◆ get_le_u_4()

static uint32_t get_le_u_4 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 773 of file extract.h.

References EXTRACT_LE_U_4, nd_trunc_longjmp(), and ND_TTEST_4.

◆ get_le_u_5()

static uint64_t get_le_u_5 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 781 of file extract.h.

References EXTRACT_LE_U_5, nd_trunc_longjmp(), and ND_TTEST_5.

◆ get_le_u_6()

static uint64_t get_le_u_6 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 789 of file extract.h.

References EXTRACT_LE_U_6, nd_trunc_longjmp(), and ND_TTEST_6.

◆ get_le_u_7()

static uint64_t get_le_u_7 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 797 of file extract.h.

References EXTRACT_LE_U_7, nd_trunc_longjmp(), and ND_TTEST_7.

◆ get_le_u_8()

static uint64_t get_le_u_8 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 805 of file extract.h.

References EXTRACT_LE_U_8, nd_trunc_longjmp(), and ND_TTEST_8.

◆ get_s_1()

static int8_t get_s_1 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 595 of file extract.h.

References EXTRACT_S_1, nd_trunc_longjmp(), and ND_TTEST_1.

◆ get_u_1()

static uint8_t get_u_1 ( netdissect_options ndo,
const u_char *  p 
)
inlinestatic

Definition at line 587 of file extract.h.

References EXTRACT_U_1, nd_trunc_longjmp(), and ND_TTEST_1.

◆ nd_trunc_longjmp()