aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-user_encap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2010-12-20 05:35:29 +0000
committerGuy Harris <guy@alum.mit.edu>2010-12-20 05:35:29 +0000
commita8bc4a0d136d7a68e8f006aec75a8e63191948c9 (patch)
tree2587cbb5c31f65afc60711d38d5dcc79a5a689e6 /epan/dissectors/packet-user_encap.c
parent7e16ec5b991b12020f7bdc135fd4943858bc3218 (diff)
Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle dissector tables with string keys. (Using _port can confuse people into thinking they're intended solely for use with TCP/UDP/etc. ports when, in fact, they work better for things such as Ethernet types, where the binding of particular values to particular protocols are a lot stronger.) svn path=/trunk/; revision=35224
Diffstat (limited to 'epan/dissectors/packet-user_encap.c')
-rw-r--r--epan/dissectors/packet-user_encap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-user_encap.c b/epan/dissectors/packet-user_encap.c
index 7b7d93d3fc..ae285b1649 100644
--- a/epan/dissectors/packet-user_encap.c
+++ b/epan/dissectors/packet-user_encap.c
@@ -90,7 +90,7 @@ static void dissect_user(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree) {
guint i;
for (i = 0; i < num_encaps; i++) {
- if (encaps[i].encap == pinfo->match_port) {
+ if (encaps[i].encap == pinfo->match_uint) {
encap = &(encaps[i]);
break;
}
@@ -99,14 +99,14 @@ static void dissect_user(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree) {
item = proto_tree_add_item(tree,proto_user_encap,tvb,0,0,FALSE);
if (!encap) {
char* msg = ep_strdup_printf("User encapsulation not handled: DLT=%d, check your Preferences->Protocols->DLT_USER",
- pinfo->match_port + 147 - WTAP_ENCAP_USER0);
+ pinfo->match_uint + 147 - WTAP_ENCAP_USER0);
proto_item_set_text(item,"%s",msg);
expert_add_info_format(pinfo, item, PI_UNDECODED, PI_WARN, "%s", msg);
call_dissector(data_handle, tvb, pinfo, tree);
return;
} else {
- proto_item_set_text(item,"DLT: %d",pinfo->match_port + 147 - WTAP_ENCAP_USER0);
+ proto_item_set_text(item,"DLT: %d",pinfo->match_uint + 147 - WTAP_ENCAP_USER0);
}
len = tvb_reported_length(tvb) - (encap->header_size + encap->trailer_size);
@@ -164,7 +164,7 @@ void proto_reg_handoff_user_encap(void)
data_handle = find_dissector("data");
for (i = WTAP_ENCAP_USER0 ; i <= WTAP_ENCAP_USER15; i++)
- dissector_add("wtap_encap", i, user_encap_handle);
+ dissector_add_uint("wtap_encap", i, user_encap_handle);
}