diff options
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-hdcp.c | 27 | ||||
-rw-r--r-- | epan/dissectors/packet-mim.c | 56 | ||||
-rw-r--r-- | epan/dissectors/packet-prp.c | 20 |
3 files changed, 52 insertions, 51 deletions
diff --git a/epan/dissectors/packet-hdcp.c b/epan/dissectors/packet-hdcp.c index 74612768b4..7b07993e30 100644 --- a/epan/dissectors/packet-hdcp.c +++ b/epan/dissectors/packet-hdcp.c @@ -38,7 +38,6 @@ static int proto_hdcp = -1; -static module_t *hdcp_module; static gboolean hdcp_enable_dissector = FALSE; void proto_reg_handoff_hdcp(void); @@ -114,12 +113,12 @@ static const msg_info_t msg_info[] = { static int dissect_hdcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - msg_info_t *mi; - proto_item *pi; - proto_tree *hdcp_tree = NULL, *cert_tree = NULL; - guint8 msg_id; - gboolean repeater; - guint16 reserved; + msg_info_t *mi; + proto_item *pi; + proto_tree *hdcp_tree = NULL, *cert_tree = NULL; + guint8 msg_id; + gboolean repeater; + guint16 reserved; ptvcursor_t *cursor; /* do the plausibility checks before setting up anything */ @@ -211,11 +210,6 @@ proto_register_hdcp(void) { guint i; - static gint *ett[] = { - &ett_hdcp, - &ett_hdcp_cert - }; - static hf_register_info hf[] = { { &hf_hdcp_msg_id, { "Message ID", "hdcp.msg_id", FT_UINT8, BASE_HEX, @@ -264,13 +258,20 @@ proto_register_hdcp(void) NULL, 0, NULL, HFILL } } }; + static gint *ett[] = { + &ett_hdcp, + &ett_hdcp_cert + }; + + module_t *hdcp_module; + msg_table = g_hash_table_new(g_direct_hash, g_direct_equal); for(i=0; i<array_length(msg_info); i++) { g_hash_table_insert(msg_table, GUINT_TO_POINTER((guint)msg_info[i].id), (gpointer)(&msg_info[i])); } - + proto_hdcp = proto_register_protocol( "High bandwidth Digital Content Protection", "HDCP", "hdcp"); diff --git a/epan/dissectors/packet-mim.c b/epan/dissectors/packet-mim.c index 9058eb99c9..2df0d29f3e 100644 --- a/epan/dissectors/packet-mim.c +++ b/epan/dissectors/packet-mim.c @@ -41,8 +41,6 @@ static int proto_fp = -1 ; static gint ett_mim = -1 ; static gint ett_hmac = -1 ; -static module_t *mim_module; - /* Main protocol items */ static int hf_s_hmac = -1; static int hf_d_hmac = -1; @@ -92,23 +90,23 @@ static dissector_handle_t eth_dissector ; #define FP_FIELD_LEN 3 -#define FP_EID_MASK 0xFCC0 +#define FP_EID_MASK 0x00FCC0 #define FP_3B_EID_MASK 0xFCC000 -#define FP_UL_MASK 0x020000 -#define FP_IG_MASK 0x010000 -#define FP_EID2_MASK 0x00C000 -#define FP_RES_MASK 0x002000 -#define FP_OOO_MASK 0x001000 -#define FP_SWID_MASK 0x000FFF +#define FP_UL_MASK 0x020000 +#define FP_IG_MASK 0x010000 +#define FP_EID2_MASK 0x00C000 +#define FP_RES_MASK 0x002000 +#define FP_OOO_MASK 0x001000 +#define FP_SWID_MASK 0x000FFF -#define FP_BF_LEN 3 -#define FP_LID_LEN 2 +#define FP_BF_LEN 3 +#define FP_LID_LEN 2 #define FP_SSWID_LEN 1 -#define FP_FTAG_LEN 2 +#define FP_FTAG_LEN 2 -#define FP_FTAG_MASK 0xFFC0 -#define FP_TTL_MASK 0x003F +#define FP_FTAG_MASK 0xFFC0 +#define FP_TTL_MASK 0x003F #define FP_HMAC_IG_MASK G_GINT64_CONSTANT(0x010000000000) #define FP_HMAC_SWID_MASK G_GINT64_CONSTANT(0x000FFF000000) @@ -198,21 +196,21 @@ fp_add_hmac (tvbuff_t *tvb, proto_tree *tree, int offset) { static int dissect_fp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) { - proto_item *ti ; - proto_tree *fp_tree ; - proto_tree *fp_addr_tree ; - tvbuff_t *next_tvb ; - int offset = 0 ; - guint64 hmac_src; - guint64 hmac_dst; - guint16 sswid = 0; - guint16 ssswid = 0; - guint16 slid = 0; - guint16 dswid = 0; - guint16 dsswid = 0; - guint16 dlid = 0; + proto_item *ti ; + proto_tree *fp_tree ; + proto_tree *fp_addr_tree ; + tvbuff_t *next_tvb ; + int offset = 0 ; + guint64 hmac_src; + guint64 hmac_dst; + guint16 sswid = 0; + guint16 ssswid = 0; + guint16 slid = 0; + guint16 dswid = 0; + guint16 dsswid = 0; + guint16 dlid = 0; const guint8 *dst_addr = NULL; - gboolean dest_ig = FALSE; + gboolean dest_ig = FALSE; col_set_str( pinfo->cinfo, COL_PROTOCOL, FP_PROTO_COL_NAME ) ; col_set_str( pinfo->cinfo, COL_INFO, FP_PROTO_COL_INFO ) ; @@ -362,6 +360,8 @@ proto_register_mim(void) &ett_hmac }; + module_t *mim_module; + proto_fp = proto_register_protocol("Cisco FabricPath", "CFP", "cfp"); mim_module = prefs_register_protocol (proto_fp, proto_reg_handoff_fabricpath); diff --git a/epan/dissectors/packet-prp.c b/epan/dissectors/packet-prp.c index eda5185722..12313c9581 100644 --- a/epan/dissectors/packet-prp.c +++ b/epan/dissectors/packet-prp.c @@ -80,14 +80,14 @@ dissect_prp_redundancy_control_trailer(tvbuff_t *tvb, packet_info *pinfo _U_, pr { proto_item *ti; proto_tree *prp_tree; - guint i; - guint length; - guint offset; - guint16 lan_id; - guint16 lsdu_size; - guint16 prp1_suffix; - guint trailer_start; - guint trailer_length; + guint i; + guint length; + guint offset; + guint16 lan_id; + guint16 lsdu_size; + guint16 prp1_suffix; + guint trailer_start; + guint trailer_length; if (!tree) return; @@ -119,7 +119,7 @@ dissect_prp_redundancy_control_trailer(tvbuff_t *tvb, packet_info *pinfo _U_, pr lsdu_size = tvb_get_ntohs(tvb, (i+2)) & 0x0fff; if(lsdu_size == i+4-offset && (lan_id == 0xa || lan_id == 0xb)) { - trailer_start = i; + trailer_start = i; trailer_length = 4; break; } @@ -141,7 +141,7 @@ dissect_prp_redundancy_control_trailer(tvbuff_t *tvb, packet_info *pinfo _U_, pr /* We don't check the lsdu_size, we just display whether it's correct. Helpful for testing, because different definitions of the lsdu_size did exist. */ - trailer_start = length-6; + trailer_start = length-6; trailer_length = 6; } } |