diff options
Diffstat (limited to 'plugins/epan/profinet/packet-pn-mrrt.c')
-rw-r--r-- | plugins/epan/profinet/packet-pn-mrrt.c | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/plugins/epan/profinet/packet-pn-mrrt.c b/plugins/epan/profinet/packet-pn-mrrt.c index 5c332a5a..b4f2a85e 100644 --- a/plugins/epan/profinet/packet-pn-mrrt.c +++ b/plugins/epan/profinet/packet-pn-mrrt.c @@ -19,17 +19,17 @@ void proto_register_pn_mrrt(void); void proto_reg_handoff_pn_mrrt(void); -static int proto_pn_mrrt = -1; +static int proto_pn_mrrt; -static int hf_pn_mrrt_sequence_id = -1; -static int hf_pn_mrrt_domain_uuid = -1; -static int hf_pn_mrrt_type = -1; -static int hf_pn_mrrt_length = -1; -static int hf_pn_mrrt_version = -1; -static int hf_pn_mrrt_sa = -1; +static int hf_pn_mrrt_sequence_id; +static int hf_pn_mrrt_domain_uuid; +static int hf_pn_mrrt_type; +static int hf_pn_mrrt_length; +static int hf_pn_mrrt_version; +static int hf_pn_mrrt_sa; -static gint ett_pn_mrrt = -1; +static int ett_pn_mrrt; @@ -47,9 +47,9 @@ static const value_string pn_mrrt_block_type_vals[] = { static int dissect_PNMRRT_Common(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 length _U_) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t length _U_) { - guint16 sequence_id; + uint16_t sequence_id; e_guid_t uuid; @@ -69,9 +69,9 @@ dissect_PNMRRT_Common(tvbuff_t *tvb, int offset, static int dissect_PNMRRT_Test(tvbuff_t *tvb, int offset, - packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 length _U_) + packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t length _U_) { - guint8 mac[6]; + uint8_t mac[6]; /* MRRT_SA */ @@ -91,10 +91,10 @@ static int dissect_PNMRRT_PDU(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, proto_item *item) { - guint16 version; - guint8 type; - guint8 length; - gint i = 0; + uint16_t version; + uint8_t type; + uint8_t length; + int i = 0; /* MRRT_Version */ @@ -122,7 +122,6 @@ dissect_PNMRRT_PDU(tvbuff_t *tvb, int offset, col_append_str(pinfo->cinfo, COL_INFO, "End"); proto_item_append_text(item, "End"); return offset; - break; case 0x01: offset = dissect_PNMRRT_Common(tvb, offset, pinfo, tree, item, length); break; @@ -143,22 +142,22 @@ dissect_PNMRRT_PDU(tvbuff_t *tvb, int offset, /* possibly dissect a PN-RT packet (frame ID must be in the appropriate range) */ -static gboolean +static bool dissect_PNMRRT_Data_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { /* the tvb will NOT contain the frame_id here, so get it from dissector data! */ - guint16 u16FrameID = GPOINTER_TO_UINT(data); + uint16_t u16FrameID = GPOINTER_TO_UINT(data); proto_item *item; proto_tree *mrrt_tree; int offset = 0; - guint32 u32SubStart; + uint32_t u32SubStart; /* frame id must be in valid range (MRRT) */ if (u16FrameID != 0xFF60) { /* we are not interested in this packet */ - return FALSE; + return false; } col_set_str(pinfo->cinfo, COL_PROTOCOL, "PN-MRRT"); @@ -173,7 +172,7 @@ dissect_PNMRRT_Data_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item_set_len(item, offset - u32SubStart); - return TRUE; + return true; } @@ -215,7 +214,7 @@ proto_register_pn_mrrt (void) }; - static gint *ett[] = { + static int *ett[] = { &ett_pn_mrrt }; |