summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-pw-fr.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-pw-fr.c')
-rw-r--r--epan/dissectors/packet-pw-fr.c51
1 files changed, 26 insertions, 25 deletions
diff --git a/epan/dissectors/packet-pw-fr.c b/epan/dissectors/packet-pw-fr.c
index 7c00fe41..e10ffd45 100644
--- a/epan/dissectors/packet-pw-fr.c
+++ b/epan/dissectors/packet-pw-fr.c
@@ -27,23 +27,23 @@
void proto_register_pw_fr(void);
void proto_reg_handoff_pw_fr(void);
-static gint proto_encaps = -1;
-static gint ett_encaps = -1;
-
-/* static int hf_pw_fr = -1; */
-static int hf_cw_bits03 = -1;
-static int hf_cw_fecn = -1;
-static int hf_cw_becn = -1;
-static int hf_cw_de = -1;
-static int hf_cw_cr = -1;
-static int hf_cw_frg = -1;
-static int hf_cw_len = -1;
-static int hf_cw_seq = -1;
-static int hf_cw_padding = -1;
-
-static expert_field ei_payload_size_invalid = EI_INIT;
-static expert_field ei_cw_bits03 = EI_INIT;
-static expert_field ei_cw_packet_size_too_small = EI_INIT;
+static int proto_encaps;
+static int ett_encaps;
+
+/* static int hf_pw_fr; */
+static int hf_cw_bits03;
+static int hf_cw_fecn;
+static int hf_cw_becn;
+static int hf_cw_de;
+static int hf_cw_cr;
+static int hf_cw_frg;
+static int hf_cw_len;
+static int hf_cw_seq;
+static int hf_cw_padding;
+
+static expert_field ei_payload_size_invalid;
+static expert_field ei_cw_bits03;
+static expert_field ei_cw_packet_size_too_small;
static const value_string vals_frg[] = {
{ 0x0, "Unfragmented" },
@@ -60,9 +60,9 @@ static dissector_handle_t pw_fr_mpls_handle;
static int
dissect_pw_fr( tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_ )
{
- gint packet_size;
- gint payload_size;
- gint payload_padding;
+ int packet_size;
+ int payload_size;
+ int payload_padding;
const int encaps_size = 4; /*encapsulation consists of mandatory CW only*/
enum {
PQ_CW_BAD = 0x001
@@ -97,7 +97,7 @@ dissect_pw_fr( tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* dat
/* check how "good" is this packet */
/* also decide payload length from packet size and CW */
packet_quality = 0;
- if (0 != (tvb_get_guint8(tvb, 0) & 0xf0 /*bits03*/))
+ if (0 != (tvb_get_uint8(tvb, 0) & 0xf0 /*bits03*/))
{
packet_quality |= PQ_CW_BAD + PQ_CW_BAD_BITS03;
}
@@ -113,9 +113,9 @@ dissect_pw_fr( tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* dat
* *plus* the length of the *PWMCW*. ]
*/
int cw_len;
- gint payload_size_packet; /*derived from packet size*/
+ int payload_size_packet; /*derived from packet size*/
- cw_len = tvb_get_guint8(tvb, 1) & 0x3f;
+ cw_len = tvb_get_uint8(tvb, 1) & 0x3f;
payload_size_packet = packet_size - encaps_size;
/*
@@ -126,7 +126,7 @@ dissect_pw_fr( tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* dat
if (payload_size_packet < 64)
{
- gint payload_size_cw; /*derived from cw*/
+ int payload_size_cw; /*derived from cw*/
payload_size_cw = cw_len; /*RFC4619-specific*/
if (payload_size_cw == 0)
{
@@ -275,7 +275,7 @@ static hf_register_info hf[] = {
,HFILL}}
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_encaps
};
@@ -301,6 +301,7 @@ void
proto_reg_handoff_pw_fr(void)
{
dissector_add_for_decode_as("mpls.label", pw_fr_mpls_handle);
+ dissector_add_for_decode_as("mpls.pfn", pw_fr_mpls_handle);
fr_stripped_address_handle = find_dissector_add_dependency("fr_stripped_address", proto_encaps);
}