2 * Interface of pw-common module
3 * Copyright 2009, Artem Tamazov <artem.tamazov@tellabs.com>
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
12 #ifndef PACKET_PW_COMMON_H
13 #define PACKET_PW_COMMON_H
15 #include <epan/packet.h>
17 #define PWC_SIZEOF_CW 4
19 extern const char pwc_longname_pw_satop
[];
20 extern const char pwc_longname_pw_cesopsn
[];
21 extern const char pwc_longname_pw_atm_n1_cw
[];
22 extern const char pwc_longname_pw_atm_n1_nocw
[];
23 extern const char pwc_longname_pw_atm_11_or_aal5_pdu
[];
24 extern const char pwc_longname_pw_atm_aal5_sdu
[];
26 extern const value_string pwc_vals_cw_l_bit
[];
27 extern const value_string pwc_vals_cw_r_bit
[];
28 extern const value_string pwc_vals_cw_frag
[];
31 PWC_CW_BAD_BITS03
= 1 << 0
32 ,PWC_CW_BAD_PAYLEN_LT_0
= 1 << 1
33 ,PWC_CW_BAD_PAYLEN_GT_PACKET
= 1 << 2
34 ,PWC_CW_BAD_LEN_MUST_BE_0
= 1 << 3
35 ,PWC_CW_BAD_FRAG
= 1 << 4
36 ,PWC_CW_BAD_RSV
= 1 << 5
37 ,PWC_CW_BAD_FLAGS
= 1 << 8
38 ,PWC_CW_BAD_PAYLEN_LE_0
= 1 << 9
39 ,PWC_CW_BAD_PADDING_NE_0
= 1 << 10
40 ,PWC_ANYOF_CW_BAD
= PWC_CW_BAD_BITS03
41 + PWC_CW_BAD_PAYLEN_LT_0
42 + PWC_CW_BAD_PAYLEN_GT_PACKET
43 + PWC_CW_BAD_LEN_MUST_BE_0
47 + PWC_CW_BAD_PAYLEN_LE_0
48 + PWC_CW_BAD_PADDING_NE_0
49 ,PWC_CW_SUSPECT_LM
= 1 << 6
50 ,PWC_ANYOF_CW_SUSPECT
= PWC_CW_SUSPECT_LM
51 ,PWC_PAY_SIZE_BAD
= 1 << 7
53 pwc_packet_properties_t
;
54 #define PWC_PACKET_PROPERTIES_T_INITIALIZER 0
58 ,PWC_DEMUX_UDP
/*IPv4/IPv6 and UDP as demultiplexing layer*/
59 ,PWC_DEMUX_L2TP
/*IPv4/IPv6 and L2TPv3 as demultiplexing layer*/
63 extern void pwc_item_append_cw(proto_item
* item
, const uint32_t cw
, const bool append_text
);
64 extern void pwc_item_append_text_n_items(proto_item
* item
, const int n
, const char * const item_text
);