12#ifndef __PACKET_IP_H__
13#define __PACKET_IP_H__
15#include "ws_symbol_export.h"
24#define IP_VERSION_NUM_RESERVED 0
25#define IP_VERSION_NUM_INET 4
26#define IP_VERSION_NUM_ST 5
27#define IP_VERSION_NUM_INET6 6
28#define IP_VERSION_NUM_TPIX 7
29#define IP_VERSION_NUM_PIP 8
30#define IP_VERSION_NUM_TUBA 9
49#define WS_IP4_PTR(p) ((ws_ip4 *)(((p) && *(uint8_t *)(p) == 4) ? (p) : NULL))
52#define IPDSFIELD_DSCP_MASK 0xFC
53#define IPDSFIELD_DSCP(dsfield) (((dsfield) & IPDSFIELD_DSCP_MASK) >> 2)
56#define IPDSFIELD_ECN_MASK 0x03
57#define IPDSFIELD_ECN(dsfield) ((dsfield) & IPDSFIELD_ECN_MASK)
59bool ip_try_dissect(
bool heur_first,
unsigned nxt, tvbuff_t *tvb,
63WS_DLL_PUBLIC value_string_ext dscp_vals_ext;
64WS_DLL_PUBLIC value_string_ext ecn_vals_ext;
65WS_DLL_PUBLIC value_string_ext dscp_short_vals_ext;
66WS_DLL_PUBLIC value_string_ext ecn_short_vals_ext;
81#define WS_IP6_PTR(p) ((ws_ip6 *)(((p) && *(uint8_t *)(p) == 6) ? (p) : NULL))
90typedef ws_ip6 ipv6_tap_info_t;
109 proto_tree *ipv6_tree;
115proto_tree *p_ipv6_pinfo_select_root(
packet_info *pinfo, proto_tree *tree);
119void ipv6_dissect_next(
unsigned nxt, tvbuff_t *tvb,
packet_info *pinfo, proto_tree *tree, ws_ip6 *iph);
121WS_DLL_PUBLIC
const char* ipprotostr(
const int proto);
124ws_ip_protocol(
void *iph)
130 if ((ip4 = WS_IP4_PTR(iph)) != NULL)
131 return ip4->ip_proto;
132 if ((ip6 = WS_IP6_PTR(iph)) != NULL)
142 uint32_t initial_frame;
struct _address address
Holds a network or link-layer address of any supported type.
struct conversation conversation_t
struct _packet_info packet_info
Represents the metadata and indexing information for a single captured frame.
proto_node proto_item
Definition proto.h:927
Definition packet-ip.h:35
Definition packet-ip.h:69
Definition packet-ip.h:138
Definition packet-ip.h:105
Definition packet-ipv6.h:44
Definition packet-ip.h:83
struct _value_string value_string
Mapping between a 32-bit integer value and its string representation.