aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
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 /asn1
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 'asn1')
-rw-r--r--asn1/ansi_map/ansi_map.cnf12
-rw-r--r--asn1/ansi_tcap/packet-ansi_tcap-template.c4
-rw-r--r--asn1/cmp/packet-cmp-template.c14
-rw-r--r--asn1/dap/packet-dap-template.c4
-rw-r--r--asn1/disp/packet-disp-template.c4
-rw-r--r--asn1/dop/packet-dop-template.c4
-rw-r--r--asn1/dsp/packet-dsp-template.c4
-rw-r--r--asn1/goose/packet-goose-template.c2
-rw-r--r--asn1/gsm_map/gsm_map.cnf16
-rw-r--r--asn1/h225/h225.cnf2
-rw-r--r--asn1/h225/packet-h225-template.c4
-rw-r--r--asn1/h245/h245.cnf2
-rw-r--r--asn1/h248/packet-h248-template.c10
-rw-r--r--asn1/h450/packet-h450-template.c6
-rw-r--r--asn1/h501/packet-h501-template.c8
-rw-r--r--asn1/hnbap/packet-hnbap-template.c16
-rw-r--r--asn1/idmp/packet-idmp-template.c4
-rw-r--r--asn1/kerberos/packet-kerberos-template.c4
-rw-r--r--asn1/ldap/packet-ldap-template.c12
-rw-r--r--asn1/mpeg-pes/packet-mpeg-pes-template.c2
-rw-r--r--asn1/nbap/packet-nbap-template.c6
-rw-r--r--asn1/p7/packet-p7-template.c4
-rw-r--r--asn1/pcap/packet-pcap-template.c16
-rw-r--r--asn1/q932/packet-q932-template.c4
-rw-r--r--asn1/qsig/packet-qsig-template.c10
-rw-r--r--asn1/ranap/packet-ranap-template.c24
-rw-r--r--asn1/ranap/ranap.cnf4
-rw-r--r--asn1/rnsap/packet-rnsap-template.c6
-rw-r--r--asn1/ros/ros-err.cnf2
-rw-r--r--asn1/ros/ros-inv.cnf2
-rw-r--r--asn1/ros/ros-res.cnf2
-rw-r--r--asn1/rua/packet-rua-template.c16
-rw-r--r--asn1/s1ap/packet-s1ap-template.c20
-rw-r--r--asn1/sabp/packet-sabp-template.c16
-rw-r--r--asn1/smrse/packet-smrse-template.c2
-rw-r--r--asn1/snmp/packet-snmp-template.c20
-rw-r--r--asn1/sv/packet-sv-template.c2
-rw-r--r--asn1/t38/packet-t38-template.c8
-rw-r--r--asn1/tcap/packet-tcap-template.c18
-rw-r--r--asn1/ulp/packet-ulp-template.c4
-rw-r--r--asn1/x2ap/packet-x2ap-template.c16
-rw-r--r--asn1/x411/packet-x411-template.c4
-rw-r--r--asn1/x411/x411.cnf6
43 files changed, 173 insertions, 173 deletions
diff --git a/asn1/ansi_map/ansi_map.cnf b/asn1/ansi_map/ansi_map.cnf
index b7fc70d9e8..aa1a2975d9 100644
--- a/asn1/ansi_map/ansi_map.cnf
+++ b/asn1/ansi_map/ansi_map.cnf
@@ -287,17 +287,17 @@ TerminalType
}
if (ansi_map_sms_tele_id != -1)
{
- dissector_try_port(is637_tele_id_dissector_table, ansi_map_sms_tele_id, SMS_BearerData_tvb, g_pinfo, g_tree);
+ dissector_try_uint(is637_tele_id_dissector_table, ansi_map_sms_tele_id, SMS_BearerData_tvb, g_pinfo, g_tree);
}
else
{
switch(ServiceIndicator){
case 1: /* CDMA OTASP Service */
case 3: /* CDMA OTAPA Service */
- dissector_try_port(is683_dissector_table, ansi_map_is_invoke ? 0 : 1, SMS_BearerData_tvb, g_pinfo, g_tree);
+ dissector_try_uint(is683_dissector_table, ansi_map_is_invoke ? 0 : 1, SMS_BearerData_tvb, g_pinfo, g_tree);
break;
case 4: /* CDMA Position Determination Service */
- dissector_try_port(is801_dissector_table, ansi_map_is_invoke ? 0 : 1, SMS_BearerData_tvb, g_pinfo, g_tree);
+ dissector_try_uint(is801_dissector_table, ansi_map_is_invoke ? 0 : 1, SMS_BearerData_tvb, g_pinfo, g_tree);
break;
default:
break;
@@ -334,7 +334,7 @@ TerminalType
ansi_map_sms_tele_id = tvb_get_ntohs(tvb,0);
if ((ansi_map_sms_tele_id != -1)&&(SMS_BearerData_tvb !=NULL))
{
- dissector_try_port(is637_tele_id_dissector_table, ansi_map_sms_tele_id, SMS_BearerData_tvb, g_pinfo, g_tree);
+ dissector_try_uint(is637_tele_id_dissector_table, ansi_map_sms_tele_id, SMS_BearerData_tvb, g_pinfo, g_tree);
}
}
@@ -447,10 +447,10 @@ TerminalType
switch(ServiceIndicator){
case 1: /* CDMA OTASP Service */
case 3: /* CDMA OTAPA Service */
- dissector_try_port(is683_dissector_table, ansi_map_is_invoke ? 0 : 1, SMS_BearerData_tvb, g_pinfo, g_tree);
+ dissector_try_uint(is683_dissector_table, ansi_map_is_invoke ? 0 : 1, SMS_BearerData_tvb, g_pinfo, g_tree);
break;
case 4: /* CDMA Position Determination Service */
- dissector_try_port(is801_dissector_table, ansi_map_is_invoke ? 0 : 1, SMS_BearerData_tvb, g_pinfo, g_tree);
+ dissector_try_uint(is801_dissector_table, ansi_map_is_invoke ? 0 : 1, SMS_BearerData_tvb, g_pinfo, g_tree);
break;
default:
break;
diff --git a/asn1/ansi_tcap/packet-ansi_tcap-template.c b/asn1/ansi_tcap/packet-ansi_tcap-template.c
index 8ff2eaf01f..d53a0c21a6 100644
--- a/asn1/ansi_tcap/packet-ansi_tcap-template.c
+++ b/asn1/ansi_tcap/packet-ansi_tcap-template.c
@@ -107,12 +107,12 @@ static GHashTable* itu_sub_dissectors = NULL;
extern void add_ansi_tcap_subdissector(guint32 ssn, dissector_handle_t dissector) {
g_hash_table_insert(ansi_sub_dissectors,GUINT_TO_POINTER(ssn),dissector);
- dissector_add("sccp.ssn",ssn,tcap_handle);
+ dissector_add_uint("sccp.ssn",ssn,tcap_handle);
}
extern void delete_ansi_tcap_subdissector(guint32 ssn, dissector_handle_t dissector _U_) {
g_hash_table_remove(ansi_sub_dissectors,GUINT_TO_POINTER(ssn));
- dissector_delete("sccp.ssn",ssn,tcap_handle);
+ dissector_delete_uint("sccp.ssn",ssn,tcap_handle);
}
dissector_handle_t get_ansi_tcap_subdissector(guint32 ssn) {
diff --git a/asn1/cmp/packet-cmp-template.c b/asn1/cmp/packet-cmp-template.c
index 70d439473a..e7f3c75894 100644
--- a/asn1/cmp/packet-cmp-template.c
+++ b/asn1/cmp/packet-cmp-template.c
@@ -400,7 +400,7 @@ void proto_reg_handoff_cmp(void) {
dissector_add_string("media_type", "application/x-pkixcmp-poll", cmp_tcp_style_http_handle);
cmp_tcp_handle = new_create_dissector_handle(dissect_cmp_tcp, proto_cmp);
- dissector_add("tcp.port", TCP_PORT_CMP, cmp_tcp_handle);
+ dissector_add_uint("tcp.port", TCP_PORT_CMP, cmp_tcp_handle);
oid_add_from_string("Cryptlib-presence-check","1.3.6.1.4.1.3029.3.1.1");
oid_add_from_string("Cryptlib-PKIBoot","1.3.6.1.4.1.3029.3.1.2");
@@ -419,17 +419,17 @@ void proto_reg_handoff_cmp(void) {
/* change alternate TCP port if changed in the preferences */
if (cmp_alternate_tcp_port != cmp_alternate_tcp_port_prev) {
if (cmp_alternate_tcp_port_prev != 0)
- dissector_delete("tcp.port", cmp_alternate_tcp_port_prev, cmp_tcp_handle);
+ dissector_delete_uint("tcp.port", cmp_alternate_tcp_port_prev, cmp_tcp_handle);
if (cmp_alternate_tcp_port != 0)
- dissector_add("tcp.port", cmp_alternate_tcp_port, cmp_tcp_handle);
+ dissector_add_uint("tcp.port", cmp_alternate_tcp_port, cmp_tcp_handle);
cmp_alternate_tcp_port_prev = cmp_alternate_tcp_port;
}
/* change alternate HTTP port if changed in the preferences */
if (cmp_alternate_http_port != cmp_alternate_http_port_prev) {
if (cmp_alternate_http_port_prev != 0) {
- dissector_delete("tcp.port", cmp_alternate_http_port_prev, NULL);
- dissector_delete("http.port", cmp_alternate_http_port_prev, NULL);
+ dissector_delete_uint("tcp.port", cmp_alternate_http_port_prev, NULL);
+ dissector_delete_uint("http.port", cmp_alternate_http_port_prev, NULL);
}
if (cmp_alternate_http_port != 0)
http_dissector_add( cmp_alternate_http_port, cmp_http_handle);
@@ -439,8 +439,8 @@ void proto_reg_handoff_cmp(void) {
/* change alternate TCP-style-HTTP port if changed in the preferences */
if (cmp_alternate_tcp_style_http_port != cmp_alternate_tcp_style_http_port_prev) {
if (cmp_alternate_tcp_style_http_port_prev != 0) {
- dissector_delete("tcp.port", cmp_alternate_tcp_style_http_port_prev, NULL);
- dissector_delete("http.port", cmp_alternate_tcp_style_http_port_prev, NULL);
+ dissector_delete_uint("tcp.port", cmp_alternate_tcp_style_http_port_prev, NULL);
+ dissector_delete_uint("http.port", cmp_alternate_tcp_style_http_port_prev, NULL);
}
if (cmp_alternate_tcp_style_http_port != 0)
http_dissector_add( cmp_alternate_tcp_style_http_port, cmp_tcp_style_http_handle);
diff --git a/asn1/dap/packet-dap-template.c b/asn1/dap/packet-dap-template.c
index 7ae880a79f..05e403af77 100644
--- a/asn1/dap/packet-dap-template.c
+++ b/asn1/dap/packet-dap-template.c
@@ -162,12 +162,12 @@ prefs_register_dap(void)
/* de-register the old port */
/* port 102 is registered by TPKT - don't undo this! */
if((tcp_port > 0) && (tcp_port != 102) && tpkt_handle)
- dissector_delete("tcp.port", tcp_port, tpkt_handle);
+ dissector_delete_uint("tcp.port", tcp_port, tpkt_handle);
/* Set our port number for future use */
tcp_port = global_dap_tcp_port;
if((tcp_port > 0) && (tcp_port != 102) && tpkt_handle)
- dissector_add("tcp.port", global_dap_tcp_port, tpkt_handle);
+ dissector_add_uint("tcp.port", global_dap_tcp_port, tpkt_handle);
}
diff --git a/asn1/disp/packet-disp-template.c b/asn1/disp/packet-disp-template.c
index 5fa4574933..9d29e2d6d5 100644
--- a/asn1/disp/packet-disp-template.c
+++ b/asn1/disp/packet-disp-template.c
@@ -269,12 +269,12 @@ prefs_register_disp(void)
/* de-register the old port */
/* port 102 is registered by TPKT - don't undo this! */
if((tcp_port > 0) && (tcp_port != 102) && tpkt_handle)
- dissector_delete("tcp.port", tcp_port, tpkt_handle);
+ dissector_delete_uint("tcp.port", tcp_port, tpkt_handle);
/* Set our port number for future use */
tcp_port = global_disp_tcp_port;
if((tcp_port > 0) && (tcp_port != 102) && tpkt_handle)
- dissector_add("tcp.port", global_disp_tcp_port, tpkt_handle);
+ dissector_add_uint("tcp.port", global_disp_tcp_port, tpkt_handle);
}
diff --git a/asn1/dop/packet-dop-template.c b/asn1/dop/packet-dop-template.c
index 5ccc260bcc..7ade3638bc 100644
--- a/asn1/dop/packet-dop-template.c
+++ b/asn1/dop/packet-dop-template.c
@@ -324,12 +324,12 @@ prefs_register_dop(void)
/* de-register the old port */
/* port 102 is registered by TPKT - don't undo this! */
if((tcp_port > 0) && (tcp_port != 102) && tpkt_handle)
- dissector_delete("tcp.port", tcp_port, tpkt_handle);
+ dissector_delete_uint("tcp.port", tcp_port, tpkt_handle);
/* Set our port number for future use */
tcp_port = global_dop_tcp_port;
if((tcp_port > 0) && (tcp_port != 102) && tpkt_handle)
- dissector_add("tcp.port", tcp_port, tpkt_handle);
+ dissector_add_uint("tcp.port", tcp_port, tpkt_handle);
}
diff --git a/asn1/dsp/packet-dsp-template.c b/asn1/dsp/packet-dsp-template.c
index ead5645948..91333d572a 100644
--- a/asn1/dsp/packet-dsp-template.c
+++ b/asn1/dsp/packet-dsp-template.c
@@ -331,12 +331,12 @@ prefs_register_dsp(void)
/* de-register the old port */
/* port 102 is registered by TPKT - don't undo this! */
if((tcp_port > 0) && (tcp_port != 102) && tpkt_handle)
- dissector_delete("tcp.port", tcp_port, tpkt_handle);
+ dissector_delete_uint("tcp.port", tcp_port, tpkt_handle);
/* Set our port number for future use */
tcp_port = global_dsp_tcp_port;
if((tcp_port > 0) && (tcp_port != 102) && tpkt_handle)
- dissector_add("tcp.port", global_dsp_tcp_port, tpkt_handle);
+ dissector_add_uint("tcp.port", global_dsp_tcp_port, tpkt_handle);
}
diff --git a/asn1/goose/packet-goose-template.c b/asn1/goose/packet-goose-template.c
index bbce687b39..1d218e3e75 100644
--- a/asn1/goose/packet-goose-template.c
+++ b/asn1/goose/packet-goose-template.c
@@ -154,5 +154,5 @@ void proto_reg_handoff_goose(void) {
dissector_handle_t goose_handle;
goose_handle = find_dissector("goose");
- dissector_add("ethertype", ETHERTYPE_IEC61850_GOOSE, goose_handle);
+ dissector_add_uint("ethertype", ETHERTYPE_IEC61850_GOOSE, goose_handle);
}
diff --git a/asn1/gsm_map/gsm_map.cnf b/asn1/gsm_map/gsm_map.cnf
index 7b9ac29f38..345d6b9d78 100644
--- a/asn1/gsm_map/gsm_map.cnf
+++ b/asn1/gsm_map/gsm_map.cnf
@@ -287,7 +287,7 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV;
if (!actx->value_ptr)
return offset;
- dissector_try_port(sms_dissector_table, 0, actx->value_ptr, actx->pinfo, top_tree);
+ dissector_try_uint(sms_dissector_table, 0, actx->value_ptr, actx->pinfo, top_tree);
#.FN_BODY ForwardSM-Arg
@@ -296,7 +296,7 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV;
if (!actx->value_ptr)
return offset;
- dissector_try_port(sms_dissector_table, 0, actx->value_ptr, actx->pinfo, top_tree);
+ dissector_try_uint(sms_dissector_table, 0, actx->value_ptr, actx->pinfo, top_tree);
#.FN_BODY MO-ForwardSM-Arg
@@ -305,7 +305,7 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV;
if (!actx->value_ptr)
return offset;
- dissector_try_port(sms_dissector_table, 0, actx->value_ptr, actx->pinfo, top_tree);
+ dissector_try_uint(sms_dissector_table, 0, actx->value_ptr, actx->pinfo, top_tree);
#.FN_BODY MO-ForwardSM-Res
@@ -314,7 +314,7 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV;
if (!actx->value_ptr)
return offset;
- dissector_try_port(sms_dissector_table, 0, actx->value_ptr, actx->pinfo, top_tree);
+ dissector_try_uint(sms_dissector_table, 0, actx->value_ptr, actx->pinfo, top_tree);
#.FN_BODY MT-ForwardSM-Arg
@@ -323,7 +323,7 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV;
if (!actx->value_ptr)
return offset;
- dissector_try_port(sms_dissector_table, 0, actx->value_ptr, actx->pinfo, top_tree);
+ dissector_try_uint(sms_dissector_table, 0, actx->value_ptr, actx->pinfo, top_tree);
#.FN_BODY MT-ForwardSM-Res
@@ -332,7 +332,7 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV;
if (!actx->value_ptr)
return offset;
- dissector_try_port(sms_dissector_table, 0, actx->value_ptr, actx->pinfo, top_tree);
+ dissector_try_uint(sms_dissector_table, 0, actx->value_ptr, actx->pinfo, top_tree);
#.FN_BODY MT-ForwardSM-VGCS-Arg
@@ -341,7 +341,7 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV;
if (!actx->value_ptr)
return offset;
- dissector_try_port(sms_dissector_table, 0, actx->value_ptr, actx->pinfo, top_tree);
+ dissector_try_uint(sms_dissector_table, 0, actx->value_ptr, actx->pinfo, top_tree);
#.FN_BODY MT-ForwardSM-VGCS-Res
@@ -350,7 +350,7 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV;
if (!actx->value_ptr)
return offset;
- dissector_try_port(sms_dissector_table, 0, actx->value_ptr, actx->pinfo, top_tree);
+ dissector_try_uint(sms_dissector_table, 0, actx->value_ptr, actx->pinfo, top_tree);
#.FN_BODY SS-Status VAL_PTR = &parameter_tvb
diff --git a/asn1/h225/h225.cnf b/asn1/h225/h225.cnf
index 23ea813fd7..e2b7cc0f65 100644
--- a/asn1/h225/h225.cnf
+++ b/asn1/h225/h225.cnf
@@ -597,7 +597,7 @@ NonStandardIdentifier/object FN_VARIANT = _str VAL_PTR = &nsiOID
nsp_handle = dissector_get_string_handle(nsp_object_dissector_table, nsiOID);
break;
case 1 : /* h221NonStandard */
- nsp_handle = dissector_get_port_handle(nsp_h221_dissector_table, h221NonStandard);
+ nsp_handle = dissector_get_uint_handle(nsp_h221_dissector_table, h221NonStandard);
break;
default :
nsp_handle = NULL;
diff --git a/asn1/h225/packet-h225-template.c b/asn1/h225/packet-h225-template.c
index 50ffa089e8..48c8c48f63 100644
--- a/asn1/h225/packet-h225-template.c
+++ b/asn1/h225/packet-h225-template.c
@@ -298,8 +298,8 @@ proto_reg_handoff_h225(void)
if (!h225_prefs_initialized) {
h225ras_handle=find_dissector("h225.ras");
- dissector_add("udp.port", UDP_PORT_RAS1, h225ras_handle);
- dissector_add("udp.port", UDP_PORT_RAS2, h225ras_handle);
+ dissector_add_uint("udp.port", UDP_PORT_RAS1, h225ras_handle);
+ dissector_add_uint("udp.port", UDP_PORT_RAS2, h225ras_handle);
h245_handle = find_dissector("h245");
h245dg_handle = find_dissector("h245dg");
diff --git a/asn1/h245/h245.cnf b/asn1/h245/h245.cnf
index c103e0b320..11c9f54f7f 100644
--- a/asn1/h245/h245.cnf
+++ b/asn1/h245/h245.cnf
@@ -940,7 +940,7 @@ NonStandardIdentifier/object FN_VARIANT = _str VAL_PTR = &nsiOID
nsp_handle = dissector_get_string_handle(nsp_object_dissector_table, nsiOID);
break;
case 1 : /* h221NonStandard */
- nsp_handle = dissector_get_port_handle(nsp_h221_dissector_table, h221NonStandard);
+ nsp_handle = dissector_get_uint_handle(nsp_h221_dissector_table, h221NonStandard);
break;
default :
nsp_handle = NULL;
diff --git a/asn1/h248/packet-h248-template.c b/asn1/h248/packet-h248-template.c
index b41f8ad2ec..14588f3618 100644
--- a/asn1/h248/packet-h248-template.c
+++ b/asn1/h248/packet-h248-template.c
@@ -1548,26 +1548,26 @@ void proto_reg_handoff_h248(void) {
if (!initialized) {
h248_handle = find_dissector("h248");
h248_tpkt_handle = find_dissector("h248.tpkt");
- dissector_add("mtp3.service_indicator", GATEWAY_CONTROL_PROTOCOL_USER_ID, h248_handle);
+ dissector_add_uint("mtp3.service_indicator", GATEWAY_CONTROL_PROTOCOL_USER_ID, h248_handle);
h248_term_handle = find_dissector("h248term");
initialized = TRUE;
} else {
if (udp_port != 0)
- dissector_delete("udp.port", udp_port, h248_handle);
+ dissector_delete_uint("udp.port", udp_port, h248_handle);
if (tcp_port != 0)
- dissector_delete("tcp.port", tcp_port, h248_tpkt_handle);
+ dissector_delete_uint("tcp.port", tcp_port, h248_tpkt_handle);
}
udp_port = global_udp_port;
tcp_port = global_tcp_port;
if (udp_port != 0) {
- dissector_add("udp.port", udp_port, h248_handle);
+ dissector_add_uint("udp.port", udp_port, h248_handle);
}
if (tcp_port != 0) {
- dissector_add("tcp.port", tcp_port, h248_tpkt_handle);
+ dissector_add_uint("tcp.port", tcp_port, h248_tpkt_handle);
}
}
diff --git a/asn1/h450/packet-h450-template.c b/asn1/h450/packet-h450-template.c
index 241e7c8fb5..ded2415430 100644
--- a/asn1/h450/packet-h450-template.c
+++ b/asn1/h450/packet-h450-template.c
@@ -289,12 +289,12 @@ proto_reg_handoff_h450(void)
h450_arg_handle = new_create_dissector_handle(dissect_h450_arg, proto_h450);
h450_res_handle = new_create_dissector_handle(dissect_h450_res, proto_h450);
for (i=0; i<(int)array_length(h450_op_tab); i++) {
- dissector_add("h450.ros.local.arg", h450_op_tab[i].opcode, h450_arg_handle);
- dissector_add("h450.ros.local.res", h450_op_tab[i].opcode, h450_res_handle);
+ dissector_add_uint("h450.ros.local.arg", h450_op_tab[i].opcode, h450_arg_handle);
+ dissector_add_uint("h450.ros.local.res", h450_op_tab[i].opcode, h450_res_handle);
}
h450_err_handle = new_create_dissector_handle(dissect_h450_err, proto_h450);
for (i=0; i<(int)array_length(h450_err_tab); i++) {
- dissector_add("h450.ros.local.err", h450_err_tab[i].errcode, h450_err_handle);
+ dissector_add_uint("h450.ros.local.err", h450_err_tab[i].errcode, h450_err_handle);
}
}
diff --git a/asn1/h501/packet-h501-template.c b/asn1/h501/packet-h501-template.c
index 39ca317a57..55e337ae2a 100644
--- a/asn1/h501/packet-h501-template.c
+++ b/asn1/h501/packet-h501-template.c
@@ -145,15 +145,15 @@ void proto_reg_handoff_h501(void)
h501_tcp_handle = new_create_dissector_handle(dissect_h501_tcp, proto_h501);
h501_prefs_initialized = TRUE;
} else {
- dissector_delete("udp.port", saved_h501_udp_port, h501_udp_handle);
- dissector_delete("tcp.port", saved_h501_tcp_port, h501_tcp_handle);
+ dissector_delete_uint("udp.port", saved_h501_udp_port, h501_udp_handle);
+ dissector_delete_uint("tcp.port", saved_h501_tcp_port, h501_tcp_handle);
}
/* Set our port number for future use */
saved_h501_udp_port = h501_udp_port;
- dissector_add("udp.port", saved_h501_udp_port, h501_udp_handle);
+ dissector_add_uint("udp.port", saved_h501_udp_port, h501_udp_handle);
saved_h501_tcp_port = h501_tcp_port;
- dissector_add("tcp.port", saved_h501_tcp_port, h501_tcp_handle);
+ dissector_add_uint("tcp.port", saved_h501_tcp_port, h501_tcp_handle);
}
diff --git a/asn1/hnbap/packet-hnbap-template.c b/asn1/hnbap/packet-hnbap-template.c
index a8662e6a05..18639af3c5 100644
--- a/asn1/hnbap/packet-hnbap-template.c
+++ b/asn1/hnbap/packet-hnbap-template.c
@@ -85,12 +85,12 @@ void proto_reg_handoff_hnbap(void);
static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port_new(hnbap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint_new(hnbap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
}
static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port_new(hnbap_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint_new(hnbap_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
}
#if 0
static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
@@ -114,17 +114,17 @@ static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, p
static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port_new(hnbap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint_new(hnbap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
}
static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port_new(hnbap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint_new(hnbap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
}
static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port_new(hnbap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint_new(hnbap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
}
static void
@@ -192,14 +192,14 @@ proto_reg_handoff_hnbap(void)
if (!initialized) {
hnbap_handle = find_dissector("hnbap");
- dissector_add("sctp.ppi", HNBAP_PAYLOAD_PROTOCOL_ID, hnbap_handle);
+ dissector_add_uint("sctp.ppi", HNBAP_PAYLOAD_PROTOCOL_ID, hnbap_handle);
initialized = TRUE;
#include "packet-hnbap-dis-tab.c"
} else {
- dissector_delete("sctp.port", sctp_port, hnbap_handle);
+ dissector_delete_uint("sctp.port", sctp_port, hnbap_handle);
}
/* Set our port number for future use */
sctp_port = global_sctp_port;
- dissector_add("sctp.port", sctp_port, hnbap_handle);
+ dissector_add_uint("sctp.port", sctp_port, hnbap_handle);
}
diff --git a/asn1/idmp/packet-idmp-template.c b/asn1/idmp/packet-idmp-template.c
index 5ca8a8bdde..877c1559b5 100644
--- a/asn1/idmp/packet-idmp-template.c
+++ b/asn1/idmp/packet-idmp-template.c
@@ -378,12 +378,12 @@ prefs_register_idmp(void)
/* de-register the old port */
/* port 102 is registered by TPKT - don't undo this! */
if(idmp_handle)
- dissector_delete("tcp.port", tcp_port, idmp_handle);
+ dissector_delete_uint("tcp.port", tcp_port, idmp_handle);
/* Set our port number for future use */
tcp_port = global_idmp_tcp_port;
if((tcp_port > 0) && idmp_handle)
- dissector_add("tcp.port", global_idmp_tcp_port, idmp_handle);
+ dissector_add_uint("tcp.port", global_idmp_tcp_port, idmp_handle);
}
diff --git a/asn1/kerberos/packet-kerberos-template.c b/asn1/kerberos/packet-kerberos-template.c
index d2781df976..b82ce9230a 100644
--- a/asn1/kerberos/packet-kerberos-template.c
+++ b/asn1/kerberos/packet-kerberos-template.c
@@ -1639,9 +1639,9 @@ proto_reg_handoff_kerberos(void)
kerberos_handle_tcp = create_dissector_handle(dissect_kerberos_tcp,
proto_kerberos);
*/
- dissector_add("udp.port", UDP_PORT_KERBEROS, kerberos_handle_udp);
+ dissector_add_uint("udp.port", UDP_PORT_KERBEROS, kerberos_handle_udp);
/*
- dissector_add("tcp.port", TCP_PORT_KERBEROS, kerberos_handle_tcp);
+ dissector_add_uint("tcp.port", TCP_PORT_KERBEROS, kerberos_handle_tcp);
*/
register_dcerpc_auth_subdissector(DCE_C_AUTHN_LEVEL_PKT_INTEGRITY,
DCE_C_RPC_AUTHN_PROTOCOL_GSS_KERBEROS,
diff --git a/asn1/ldap/packet-ldap-template.c b/asn1/ldap/packet-ldap-template.c
index a55186f42e..b4fec9b113 100644
--- a/asn1/ldap/packet-ldap-template.c
+++ b/asn1/ldap/packet-ldap-template.c
@@ -1745,7 +1745,7 @@ this_was_not_normal_ldap:
guint32 old_start_tls_frame;
/* temporarily dissect this port as SSL */
- dissector_delete("tcp.port", tcp_port, ldap_handle);
+ dissector_delete_uint("tcp.port", tcp_port, ldap_handle);
ssl_dissector_add(tcp_port, "ldap", TRUE);
old_start_tls_frame = ldap_info->start_tls_frame;
@@ -1758,7 +1758,7 @@ this_was_not_normal_ldap:
ssl_dissector_delete(tcp_port, "ldap", TRUE);
/* restore ldap as the dissector for this port */
- dissector_add("tcp.port", tcp_port, ldap_handle);
+ dissector_add_uint("tcp.port", tcp_port, ldap_handle);
/* we are done */
return;
@@ -2130,10 +2130,10 @@ proto_reg_handoff_ldap(void)
dissector_handle_t cldap_handle;
ldap_handle = find_dissector("ldap");
- dissector_add("tcp.port", TCP_PORT_GLOBALCAT_LDAP, ldap_handle);
+ dissector_add_uint("tcp.port", TCP_PORT_GLOBALCAT_LDAP, ldap_handle);
cldap_handle = create_dissector_handle(dissect_mscldap, proto_cldap);
- dissector_add("udp.port", UDP_PORT_CLDAP, cldap_handle);
+ dissector_add_uint("udp.port", UDP_PORT_CLDAP, cldap_handle);
gssapi_handle = find_dissector("gssapi");
gssapi_wrap_handle = find_dissector("gssapi_verf");
@@ -2205,13 +2205,13 @@ prefs_register_ldap(void)
if(tcp_port != global_ldap_tcp_port) {
if(tcp_port)
- dissector_delete("tcp.port", tcp_port, ldap_handle);
+ dissector_delete_uint("tcp.port", tcp_port, ldap_handle);
/* Set our port number for future use */
tcp_port = global_ldap_tcp_port;
if(tcp_port)
- dissector_add("tcp.port", tcp_port, ldap_handle);
+ dissector_add_uint("tcp.port", tcp_port, ldap_handle);
}
diff --git a/asn1/mpeg-pes/packet-mpeg-pes-template.c b/asn1/mpeg-pes/packet-mpeg-pes-template.c
index c83c5678be..0f7b93795f 100644
--- a/asn1/mpeg-pes/packet-mpeg-pes-template.c
+++ b/asn1/mpeg-pes/packet-mpeg-pes-template.c
@@ -708,6 +708,6 @@ proto_reg_handoff_mpeg_pes(void)
{
dissector_handle_t mpeg_handle = find_dissector("mpeg");
- dissector_add("wtap_encap", WTAP_ENCAP_MPEG, mpeg_handle);
+ dissector_add_uint("wtap_encap", WTAP_ENCAP_MPEG, mpeg_handle);
heur_dissector_add("mpeg", dissect_mpeg_pes, proto_mpeg_pes);
}
diff --git a/asn1/nbap/packet-nbap-template.c b/asn1/nbap/packet-nbap-template.c
index 1bd8f57060..f8f761b794 100644
--- a/asn1/nbap/packet-nbap-template.c
+++ b/asn1/nbap/packet-nbap-template.c
@@ -84,12 +84,12 @@ static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, p
static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port_new(nbap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint_new(nbap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
}
static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port_new(nbap_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint_new(nbap_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
}
static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
@@ -178,7 +178,7 @@ proto_reg_handoff_nbap(void)
dissector_handle_t nbap_handle;
nbap_handle = find_dissector("nbap");
- dissector_add("sctp.ppi", NBAP_PAYLOAD_PROTOCOL_ID, nbap_handle);
+ dissector_add_uint("sctp.ppi", NBAP_PAYLOAD_PROTOCOL_ID, nbap_handle);
dissector_add_handle("sctp.port", nbap_handle); /* for "decode-as" */
#include "packet-nbap-dis-tab.c"
diff --git a/asn1/p7/packet-p7-template.c b/asn1/p7/packet-p7-template.c
index 8f712769b7..2266337d70 100644
--- a/asn1/p7/packet-p7-template.c
+++ b/asn1/p7/packet-p7-template.c
@@ -147,12 +147,12 @@ prefs_register_p7(void)
/* de-register the old port */
/* port 102 is registered by TPKT - don't undo this! */
if((tcp_port > 0) && (tcp_port != 102) && tpkt_handle)
- dissector_delete("tcp.port", tcp_port, tpkt_handle);
+ dissector_delete_uint("tcp.port", tcp_port, tpkt_handle);
/* Set our port number for future use */
tcp_port = global_p7_tcp_port;
if((tcp_port > 0) && (tcp_port != 102) && tpkt_handle)
- dissector_add("tcp.port", global_p7_tcp_port, tpkt_handle);
+ dissector_add_uint("tcp.port", global_p7_tcp_port, tpkt_handle);
}
diff --git a/asn1/pcap/packet-pcap-template.c b/asn1/pcap/packet-pcap-template.c
index 91252424d9..791558c49c 100644
--- a/asn1/pcap/packet-pcap-template.c
+++ b/asn1/pcap/packet-pcap-template.c
@@ -97,32 +97,32 @@ static int dissect_OutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port(pcap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint(pcap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
}
static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port(pcap_extension_dissector_table, ProtocolExtensionID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint(pcap_extension_dissector_table, ProtocolExtensionID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
}
static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port(pcap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint(pcap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
}
static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port(pcap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint(pcap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
}
static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port(pcap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint(pcap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
}
static int dissect_OutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port(pcap_proc_out_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint(pcap_proc_out_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
}
static void
@@ -145,14 +145,14 @@ dissect_pcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static void range_delete_callback(guint32 ssn)
{
if ( ssn ) {
- dissector_delete("sccp.ssn", ssn, pcap_handle);
+ dissector_delete_uint("sccp.ssn", ssn, pcap_handle);
}
}
static void range_add_callback(guint32 ssn)
{
if (ssn) {
- dissector_add("sccp.ssn", ssn, pcap_handle);
+ dissector_add_uint("sccp.ssn", ssn, pcap_handle);
}
}
diff --git a/asn1/q932/packet-q932-template.c b/asn1/q932/packet-q932-template.c
index 66e8d84ca0..67340a0e4e 100644
--- a/asn1/q932/packet-q932-template.c
+++ b/asn1/q932/packet-q932-template.c
@@ -324,9 +324,9 @@ void proto_reg_handoff_q932(void) {
q932_ie_handle = create_dissector_handle(dissect_q932_ie, proto_q932);
/* Facility */
- dissector_add("q931.ie", (0x00 << 8) | Q932_IE_FACILITY, q932_ie_handle);
+ dissector_add_uint("q931.ie", (0x00 << 8) | Q932_IE_FACILITY, q932_ie_handle);
/* Notification indicator */
- dissector_add("q931.ie", (0x00 << 8) | Q932_IE_NOTIFICATION_INDICATOR, q932_ie_handle);
+ dissector_add_uint("q931.ie", (0x00 << 8) | Q932_IE_NOTIFICATION_INDICATOR, q932_ie_handle);
q932_ros_handle = find_dissector("q932.ros");
}
diff --git a/asn1/qsig/packet-qsig-template.c b/asn1/qsig/packet-qsig-template.c
index 580eb6a8e7..26be9e4182 100644
--- a/asn1/qsig/packet-qsig-template.c
+++ b/asn1/qsig/packet-qsig-template.c
@@ -685,8 +685,8 @@ void proto_reg_handoff_qsig(void) {
qsig_arg_handle = new_create_dissector_handle(dissect_qsig_arg, proto_qsig);
qsig_res_handle = new_create_dissector_handle(dissect_qsig_res, proto_qsig);
for (i=0; i<(int)array_length(qsig_op_tab); i++) {
- dissector_add("q932.ros.local.arg", qsig_op_tab[i].opcode, qsig_arg_handle);
- dissector_add("q932.ros.local.res", qsig_op_tab[i].opcode, qsig_res_handle);
+ dissector_add_uint("q932.ros.local.arg", qsig_op_tab[i].opcode, qsig_arg_handle);
+ dissector_add_uint("q932.ros.local.res", qsig_op_tab[i].opcode, qsig_res_handle);
key = qsig_op_tab[i].opcode;
oid = g_hash_table_lookup(qsig_opcode2oid_hashtable, &key);
if (oid) {
@@ -696,16 +696,16 @@ void proto_reg_handoff_qsig(void) {
}
qsig_err_handle = new_create_dissector_handle(dissect_qsig_err, proto_qsig);
for (i=0; i<(int)array_length(qsig_err_tab); i++) {
- dissector_add("q932.ros.local.err", qsig_err_tab[i].errcode, qsig_err_handle);
+ dissector_add_uint("q932.ros.local.err", qsig_err_tab[i].errcode, qsig_err_handle);
}
qsig_ie_handle = create_dissector_handle(dissect_qsig_ie_cs4, proto_qsig);
/* QSIG-TC - Transit counter */
- dissector_add("q931.ie", CS4 | QSIG_IE_TRANSIT_COUNTER, qsig_ie_handle);
+ dissector_add_uint("q931.ie", CS4 | QSIG_IE_TRANSIT_COUNTER, qsig_ie_handle);
qsig_ie_handle = create_dissector_handle(dissect_qsig_ie_cs5, proto_qsig);
/* SSIG-BC - Party category */
- dissector_add("q931.ie", CS5 | QSIG_IE_PARTY_CATEGORY, qsig_ie_handle);
+ dissector_add_uint("q931.ie", CS5 | QSIG_IE_PARTY_CATEGORY, qsig_ie_handle);
/* RFC 3204, 3.2 QSIG Media Type */
dissector_add_string("media_type", "application/qsig", q931_handle);
diff --git a/asn1/ranap/packet-ranap-template.c b/asn1/ranap/packet-ranap-template.c
index b1302e553d..1053cae3a5 100644
--- a/asn1/ranap/packet-ranap-template.c
+++ b/asn1/ranap/packet-ranap-template.c
@@ -151,16 +151,16 @@ static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto
case id_RelocationPreparation:
if((ProtocolIE_ID == id_Source_ToTarget_TransparentContainer)||(ProtocolIE_ID == id_Target_ToSource_TransparentContainer)){
key = SPECIAL | ProtocolIE_ID;
- ret = (dissector_try_port_new(ranap_ies_dissector_table, key, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
+ ret = (dissector_try_uint_new(ranap_ies_dissector_table, key, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
break;
}
/* Fall trough */
default:
/* no special handling */
- ret = (dissector_try_port_new(ranap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
+ ret = (dissector_try_uint_new(ranap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
if (ret == 0) {
key = pdu_type | ProtocolIE_ID;
- ret = (dissector_try_port_new(ranap_ies_dissector_table, key, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
+ ret = (dissector_try_uint_new(ranap_ies_dissector_table, key, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
}
break;
}
@@ -169,41 +169,41 @@ static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto
static int dissect_ProtocolIEFieldPairFirstValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port_new(ranap_ies_p1_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint_new(ranap_ies_p1_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
}
static int dissect_ProtocolIEFieldPairSecondValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port_new(ranap_ies_p2_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint_new(ranap_ies_p2_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
}
static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port_new(ranap_extension_dissector_table, ProtocolExtensionID, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint_new(ranap_extension_dissector_table, ProtocolExtensionID, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
}
static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
pdu_type = IMSG;
- return (dissector_try_port_new(ranap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint_new(ranap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
pdu_type = 0;
}
static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
pdu_type = SOUT;
- return (dissector_try_port_new(ranap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint_new(ranap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
pdu_type = 0;
}
static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port_new(ranap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint_new(ranap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
}
static int dissect_OutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port_new(ranap_proc_out_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint_new(ranap_proc_out_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
}
static void
@@ -349,10 +349,10 @@ proto_reg_handoff_ranap(void)
initialized = TRUE;
#include "packet-ranap-dis-tab.c"
} else {
- dissector_delete("sccp.ssn", local_ranap_sccp_ssn, ranap_handle);
+ dissector_delete_uint("sccp.ssn", local_ranap_sccp_ssn, ranap_handle);
}
- dissector_add("sccp.ssn", global_ranap_sccp_ssn, ranap_handle);
+ dissector_add_uint("sccp.ssn", global_ranap_sccp_ssn, ranap_handle);
local_ranap_sccp_ssn = global_ranap_sccp_ssn;
/* Add heuristic dissector
* Perhaps we want a preference whether the heuristic dissector
diff --git a/asn1/ranap/ranap.cnf b/asn1/ranap/ranap.cnf
index ff9d5b698d..d7b24d4ea8 100644
--- a/asn1/ranap/ranap.cnf
+++ b/asn1/ranap/ranap.cnf
@@ -211,7 +211,7 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound")
%(DEFAULT_BODY)s
if (nas_pdu_tvb)
- dissector_try_port(nas_pdu_dissector_table, 0x1, nas_pdu_tvb, %(ACTX)s->pinfo, proto_tree_get_root(tree));
+ dissector_try_uint(nas_pdu_dissector_table, 0x1, nas_pdu_tvb, %(ACTX)s->pinfo, proto_tree_get_root(tree));
#.END
#.FN_BODY RRC-Container VAL_PTR = &rrc_message_tvb
@@ -258,7 +258,7 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound")
%(DEFAULT_BODY)s
if (l3_info_tvb)
- dissector_try_port(nas_pdu_dissector_table, 0x1, l3_info_tvb, %(ACTX)s->pinfo, proto_tree_get_root(tree));
+ dissector_try_uint(nas_pdu_dissector_table, 0x1, l3_info_tvb, %(ACTX)s->pinfo, proto_tree_get_root(tree));
#.END
# following construction is not supported by asn2wrs
diff --git a/asn1/rnsap/packet-rnsap-template.c b/asn1/rnsap/packet-rnsap-template.c
index 43507f36d6..ee34f4f5e6 100644
--- a/asn1/rnsap/packet-rnsap-template.c
+++ b/asn1/rnsap/packet-rnsap-template.c
@@ -87,12 +87,12 @@ static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, p
static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port(rnsap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint(rnsap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
}
static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port(rnsap_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint(rnsap_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
}
static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
@@ -173,7 +173,7 @@ proto_reg_handoff_rnsap(void)
rnsap_handle = find_dissector("rnsap");
rrc_dl_dcch_handle = find_dissector("rrc.dl.dcch");
- dissector_add("sccp.ssn", SCCP_SSN_RNSAP, rnsap_handle);
+ dissector_add_uint("sccp.ssn", SCCP_SSN_RNSAP, rnsap_handle);
/* Add heuristic dissector
* Perhaps we want a preference whether the heuristic dissector
* is or isn't enabled
diff --git a/asn1/ros/ros-err.cnf b/asn1/ros/ros-err.cnf
index caa7729cfb..9ec5a788cd 100644
--- a/asn1/ros/ros-err.cnf
+++ b/asn1/ros/ros-err.cnf
@@ -12,7 +12,7 @@
actx->rose_ctx->d.pdu = 3;
if ((actx->rose_ctx->d.code == 0) && actx->rose_ctx->err_local_dissector_table) {
- err_handle = dissector_get_port_handle(actx->rose_ctx->err_local_dissector_table, actx->rose_ctx->d.code_local);
+ err_handle = dissector_get_uint_handle(actx->rose_ctx->err_local_dissector_table, actx->rose_ctx->d.code_local);
} else if ((actx->rose_ctx->d.code == 1) && actx->rose_ctx->err_global_dissector_table) {
err_handle = dissector_get_string_handle(actx->rose_ctx->err_global_dissector_table, actx->rose_ctx->d.code_global);
} else {
diff --git a/asn1/ros/ros-inv.cnf b/asn1/ros/ros-inv.cnf
index aa24364585..8c663d9b7b 100644
--- a/asn1/ros/ros-inv.cnf
+++ b/asn1/ros/ros-inv.cnf
@@ -13,7 +13,7 @@
actx->rose_ctx->d.pdu = 1;
if ((actx->rose_ctx->d.code == 0) && actx->rose_ctx->arg_local_dissector_table) {
- arg_handle = dissector_get_port_handle(actx->rose_ctx->arg_local_dissector_table, actx->rose_ctx->d.code_local);
+ arg_handle = dissector_get_uint_handle(actx->rose_ctx->arg_local_dissector_table, actx->rose_ctx->d.code_local);
} else if ((actx->rose_ctx->d.code == 1) && actx->rose_ctx->arg_global_dissector_table) {
arg_handle = dissector_get_string_handle(actx->rose_ctx->arg_global_dissector_table, actx->rose_ctx->d.code_global);
} else {
diff --git a/asn1/ros/ros-res.cnf b/asn1/ros/ros-res.cnf
index 4f85d0c419..5b0a4cc8f9 100644
--- a/asn1/ros/ros-res.cnf
+++ b/asn1/ros/ros-res.cnf
@@ -13,7 +13,7 @@
actx->rose_ctx->d.pdu = 2;
if ((actx->rose_ctx->d.code == 0) && actx->rose_ctx->res_local_dissector_table) {
- res_handle = dissector_get_port_handle(actx->rose_ctx->res_local_dissector_table, actx->rose_ctx->d.code_local);
+ res_handle = dissector_get_uint_handle(actx->rose_ctx->res_local_dissector_table, actx->rose_ctx->d.code_local);
} else if ((actx->rose_ctx->d.code == 1) && actx->rose_ctx->res_global_dissector_table) {
res_handle = dissector_get_string_handle(actx->rose_ctx->res_global_dissector_table, actx->rose_ctx->d.code_global);
} else {
diff --git a/asn1/rua/packet-rua-template.c b/asn1/rua/packet-rua-template.c
index 2826438241..bda78611a6 100644
--- a/asn1/rua/packet-rua-template.c
+++ b/asn1/rua/packet-rua-template.c
@@ -89,27 +89,27 @@ void proto_reg_handoff_rua(void);
static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port_new(rua_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint_new(rua_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
}
static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port_new(rua_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint_new(rua_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
}
static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port_new(rua_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint_new(rua_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
}
static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port_new(rua_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint_new(rua_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
}
static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port_new(rua_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint_new(rua_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
}
static void
@@ -179,14 +179,14 @@ proto_reg_handoff_rua(void)
if (!initialized) {
rua_handle = find_dissector("rua");
ranap_handle = find_dissector("ranap");
- dissector_add("sctp.ppi", RUA_PAYLOAD_PROTOCOL_ID, rua_handle);
+ dissector_add_uint("sctp.ppi", RUA_PAYLOAD_PROTOCOL_ID, rua_handle);
initialized = TRUE;
#include "packet-rua-dis-tab.c"
} else {
- dissector_delete("sctp.port", sctp_port, rua_handle);
+ dissector_delete_uint("sctp.port", sctp_port, rua_handle);
}
/* Set our port number for future use */
sctp_port = global_sctp_port;
- dissector_add("sctp.port", sctp_port, rua_handle);
+ dissector_add_uint("sctp.port", sctp_port, rua_handle);
}
diff --git a/asn1/s1ap/packet-s1ap-template.c b/asn1/s1ap/packet-s1ap-template.c
index f6ce7e21bb..cff5f3fa76 100644
--- a/asn1/s1ap/packet-s1ap-template.c
+++ b/asn1/s1ap/packet-s1ap-template.c
@@ -123,38 +123,38 @@ static int dissect_TargetBSS_ToSourceBSS_TransparentContainer_PDU(tvbuff_t *tvb,
static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port(s1ap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint(s1ap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
}
/* Currently not used
static int dissect_ProtocolIEFieldPairFirstValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port(s1ap_ies_p1_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint(s1ap_ies_p1_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
}
static int dissect_ProtocolIEFieldPairSecondValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port(s1ap_ies_p2_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint(s1ap_ies_p2_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
}
*/
static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port(s1ap_extension_dissector_table, ProtocolExtensionID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint(s1ap_extension_dissector_table, ProtocolExtensionID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
}
static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port(s1ap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint(s1ap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
}
static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port(s1ap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint(s1ap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
}
static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port(s1ap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint(s1ap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
}
@@ -187,18 +187,18 @@ proto_reg_handoff_s1ap(void)
if (!Initialized) {
nas_eps_handle = find_dissector("nas-eps");
dissector_add_handle("sctp.port", s1ap_handle); /* for "decode-as" */
- dissector_add("sctp.ppi", S1AP_PAYLOAD_PROTOCOL_ID, s1ap_handle);
+ dissector_add_uint("sctp.ppi", S1AP_PAYLOAD_PROTOCOL_ID, s1ap_handle);
Initialized=TRUE;
#include "packet-s1ap-dis-tab.c"
} else {
if (SctpPort != 0) {
- dissector_delete("sctp.port", SctpPort, s1ap_handle);
+ dissector_delete_uint("sctp.port", SctpPort, s1ap_handle);
}
}
SctpPort=gbl_s1apSctpPort;
if (SctpPort != 0) {
- dissector_add("sctp.port", SctpPort, s1ap_handle);
+ dissector_add_uint("sctp.port", SctpPort, s1ap_handle);
}
}
diff --git a/asn1/sabp/packet-sabp-template.c b/asn1/sabp/packet-sabp-template.c
index b5ff7f74ce..457cd9f552 100644
--- a/asn1/sabp/packet-sabp-template.c
+++ b/asn1/sabp/packet-sabp-template.c
@@ -87,27 +87,27 @@ static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, p
static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port(sabp_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint(sabp_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
}
static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port(sabp_extension_dissector_table, ProtocolExtensionID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint(sabp_extension_dissector_table, ProtocolExtensionID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
}
static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port(sabp_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint(sabp_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
}
static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port(sabp_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint(sabp_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
}
static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port(sabp_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint(sabp_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
}
static guint
@@ -215,9 +215,9 @@ proto_reg_handoff_sabp(void)
sabp_handle = find_dissector("sabp");
sabp_tcp_handle = find_dissector("sabp.tcp");
- dissector_add("udp.port", 3452, sabp_handle);
- dissector_add("tcp.port", 3452, sabp_tcp_handle);
- dissector_add("sctp.ppi", SABP_PAYLOAD_PROTOCOL_ID, sabp_handle);
+ dissector_add_uint("udp.port", 3452, sabp_handle);
+ dissector_add_uint("tcp.port", 3452, sabp_tcp_handle);
+ dissector_add_uint("sctp.ppi", SABP_PAYLOAD_PROTOCOL_ID, sabp_handle);
#include "packet-sabp-dis-tab.c"
diff --git a/asn1/smrse/packet-smrse-template.c b/asn1/smrse/packet-smrse-template.c
index 9f507961fa..f1cb536f95 100644
--- a/asn1/smrse/packet-smrse-template.c
+++ b/asn1/smrse/packet-smrse-template.c
@@ -183,6 +183,6 @@ void proto_reg_handoff_smrse(void) {
dissector_handle_t smrse_handle;
smrse_handle = new_create_dissector_handle(dissect_smrse, proto_smrse);
- dissector_add("tcp.port",TCP_PORT_SMRSE, smrse_handle);
+ dissector_add_uint("tcp.port",TCP_PORT_SMRSE, smrse_handle);
}
diff --git a/asn1/snmp/packet-snmp-template.c b/asn1/snmp/packet-snmp-template.c
index 063aad6038..0a5971c983 100644
--- a/asn1/snmp/packet-snmp-template.c
+++ b/asn1/snmp/packet-snmp-template.c
@@ -2254,17 +2254,17 @@ void proto_reg_handoff_snmp(void) {
snmp_handle = find_dissector("snmp");
- dissector_add("udp.port", UDP_PORT_SNMP, snmp_handle);
- dissector_add("udp.port", UDP_PORT_SNMP_TRAP, snmp_handle);
- dissector_add("udp.port", UDP_PORT_SNMP_PATROL, snmp_handle);
- dissector_add("ethertype", ETHERTYPE_SNMP, snmp_handle);
- dissector_add("ipx.socket", IPX_SOCKET_SNMP_AGENT, snmp_handle);
- dissector_add("ipx.socket", IPX_SOCKET_SNMP_SINK, snmp_handle);
- dissector_add("hpext.dxsap", HPEXT_SNMP, snmp_handle);
+ dissector_add_uint("udp.port", UDP_PORT_SNMP, snmp_handle);
+ dissector_add_uint("udp.port", UDP_PORT_SNMP_TRAP, snmp_handle);
+ dissector_add_uint("udp.port", UDP_PORT_SNMP_PATROL, snmp_handle);
+ dissector_add_uint("ethertype", ETHERTYPE_SNMP, snmp_handle);
+ dissector_add_uint("ipx.socket", IPX_SOCKET_SNMP_AGENT, snmp_handle);
+ dissector_add_uint("ipx.socket", IPX_SOCKET_SNMP_SINK, snmp_handle);
+ dissector_add_uint("hpext.dxsap", HPEXT_SNMP, snmp_handle);
snmp_tcp_handle = create_dissector_handle(dissect_snmp_tcp, proto_snmp);
- dissector_add("tcp.port", TCP_PORT_SNMP, snmp_tcp_handle);
- dissector_add("tcp.port", TCP_PORT_SNMP_TRAP, snmp_tcp_handle);
+ dissector_add_uint("tcp.port", TCP_PORT_SNMP, snmp_tcp_handle);
+ dissector_add_uint("tcp.port", TCP_PORT_SNMP_TRAP, snmp_tcp_handle);
data_handle = find_dissector("data");
@@ -2307,5 +2307,5 @@ proto_reg_handoff_smux(void)
dissector_handle_t smux_handle;
smux_handle = create_dissector_handle(dissect_smux, proto_smux);
- dissector_add("tcp.port", TCP_PORT_SMUX, smux_handle);
+ dissector_add_uint("tcp.port", TCP_PORT_SMUX, smux_handle);
}
diff --git a/asn1/sv/packet-sv-template.c b/asn1/sv/packet-sv-template.c
index 9ab6f16f00..e667f6dfcc 100644
--- a/asn1/sv/packet-sv-template.c
+++ b/asn1/sv/packet-sv-template.c
@@ -331,5 +331,5 @@ void proto_reg_handoff_sv(void) {
dissector_handle_t sv_handle;
sv_handle = find_dissector("sv");
- dissector_add("ethertype", ETHERTYPE_IEC61850_SV, sv_handle);
+ dissector_add_uint("ethertype", ETHERTYPE_IEC61850_SV, sv_handle);
}
diff --git a/asn1/t38/packet-t38-template.c b/asn1/t38/packet-t38-template.c
index 5ed1b73282..a08cffb4df 100644
--- a/asn1/t38/packet-t38-template.c
+++ b/asn1/t38/packet-t38-template.c
@@ -786,14 +786,14 @@ proto_reg_handoff_t38(void)
t38_prefs_initialized = TRUE;
}
else {
- dissector_delete("tcp.port", tcp_port, t38_tcp_handle);
- dissector_delete("udp.port", udp_port, t38_udp_handle);
+ dissector_delete_uint("tcp.port", tcp_port, t38_tcp_handle);
+ dissector_delete_uint("udp.port", udp_port, t38_udp_handle);
}
tcp_port = global_t38_tcp_port;
udp_port = global_t38_udp_port;
- dissector_add("tcp.port", tcp_port, t38_tcp_handle);
- dissector_add("udp.port", udp_port, t38_udp_handle);
+ dissector_add_uint("tcp.port", tcp_port, t38_tcp_handle);
+ dissector_add_uint("udp.port", udp_port, t38_udp_handle);
}
diff --git a/asn1/tcap/packet-tcap-template.c b/asn1/tcap/packet-tcap-template.c
index aa2b2dfc8a..673cf092f5 100644
--- a/asn1/tcap/packet-tcap-template.c
+++ b/asn1/tcap/packet-tcap-template.c
@@ -108,23 +108,23 @@ static void dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_t
extern void add_ansi_tcap_subdissector(guint32 ssn, dissector_handle_t dissector) {
g_hash_table_insert(ansi_sub_dissectors,GUINT_TO_POINTER(ssn),dissector);
- dissector_add("sccp.ssn",ssn,tcap_handle);
+ dissector_add_uint("sccp.ssn",ssn,tcap_handle);
}
extern void add_itu_tcap_subdissector(guint32 ssn, dissector_handle_t dissector) {
g_hash_table_insert(itu_sub_dissectors,GUINT_TO_POINTER(ssn),dissector);
- dissector_add("sccp.ssn",ssn,tcap_handle);
+ dissector_add_uint("sccp.ssn",ssn,tcap_handle);
}
extern void delete_ansi_tcap_subdissector(guint32 ssn, dissector_handle_t dissector _U_) {
g_hash_table_remove(ansi_sub_dissectors,GUINT_TO_POINTER(ssn));
if (!get_itu_tcap_subdissector(ssn))
- dissector_delete("sccp.ssn",ssn,tcap_handle);
+ dissector_delete_uint("sccp.ssn",ssn,tcap_handle);
}
extern void delete_itu_tcap_subdissector(guint32 ssn, dissector_handle_t dissector _U_) {
g_hash_table_remove(itu_sub_dissectors,GUINT_TO_POINTER(ssn));
if (!get_ansi_tcap_subdissector(ssn))
- dissector_delete("sccp.ssn", ssn,tcap_handle);
+ dissector_delete_uint("sccp.ssn", ssn,tcap_handle);
}
dissector_handle_t get_ansi_tcap_subdissector(guint32 ssn) {
@@ -400,14 +400,14 @@ proto_register_tcap(void)
static void range_delete_callback(guint32 ssn)
{
if ( ssn && !get_ansi_tcap_subdissector(ssn) && !get_itu_tcap_subdissector(ssn) ) {
- dissector_delete("sccp.ssn", ssn, tcap_handle);
+ dissector_delete_uint("sccp.ssn", ssn, tcap_handle);
}
}
static void range_add_callback(guint32 ssn)
{
if (ssn && !get_ansi_tcap_subdissector(ssn) && !get_itu_tcap_subdissector(ssn) ) {
- dissector_add("sccp.ssn", ssn, tcap_handle);
+ dissector_add_uint("sccp.ssn", ssn, tcap_handle);
}
}
@@ -564,7 +564,7 @@ dissect_tcap_ITU_ComponentPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offs
p_tcap_context->subdissector_present=TRUE;
} else {
/* Not found, so try to find a subdissector according to SSN */
- if ( (subdissector_handle = get_itu_tcap_subdissector(actx->pinfo->match_port))) {
+ if ( (subdissector_handle = get_itu_tcap_subdissector(actx->pinfo->match_uint))) {
/* Found according to SSN */
p_tcap_context->subdissector_handle=subdissector_handle;
p_tcap_context->subdissector_present=TRUE;
@@ -610,7 +610,7 @@ dissect_tcap_ITU_ComponentPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offs
} else {
/* Search if we can found the sub protocol according to the SSN table */
if ( (subdissector_handle
- = get_itu_tcap_subdissector(actx->pinfo->match_port))) {
+ = get_itu_tcap_subdissector(actx->pinfo->match_uint))) {
/* Found according to SSN */
is_subdissector=TRUE;
} else {
@@ -621,7 +621,7 @@ dissect_tcap_ITU_ComponentPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offs
} /* ACN */
} else {
/* There is no A.C.N for this transaction, so search in the SSN table */
- if ( (subdissector_handle = get_itu_tcap_subdissector(actx->pinfo->match_port))) {
+ if ( (subdissector_handle = get_itu_tcap_subdissector(actx->pinfo->match_uint))) {
/* Found according to SSN */
is_subdissector=TRUE;
} else {
diff --git a/asn1/ulp/packet-ulp-template.c b/asn1/ulp/packet-ulp-template.c
index a7988bb160..cb3558f39f 100644
--- a/asn1/ulp/packet-ulp-template.c
+++ b/asn1/ulp/packet-ulp-template.c
@@ -146,11 +146,11 @@ proto_reg_handoff_ulp(void)
rrlp_handle = find_dissector("rrlp");
initialized = TRUE;
} else {
- dissector_delete("tcp.port", local_ulp_port, ulp_handle);
+ dissector_delete_uint("tcp.port", local_ulp_port, ulp_handle);
}
local_ulp_port = gbl_ulp_port;
- dissector_add("tcp.port", gbl_ulp_port, ulp_handle);
+ dissector_add_uint("tcp.port", gbl_ulp_port, ulp_handle);
/* application/oma-supl-ulp */
diff --git a/asn1/x2ap/packet-x2ap-template.c b/asn1/x2ap/packet-x2ap-template.c
index 7fc87483df..730555f72e 100644
--- a/asn1/x2ap/packet-x2ap-template.c
+++ b/asn1/x2ap/packet-x2ap-template.c
@@ -92,27 +92,27 @@ void proto_reg_handoff_x2ap(void);
static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port(x2ap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint(x2ap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
}
static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port(x2ap_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint(x2ap_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
}
static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port(x2ap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint(x2ap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
}
static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port(x2ap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint(x2ap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
}
static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- return (dissector_try_port(x2ap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
+ return (dissector_try_uint(x2ap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
}
static void
@@ -197,18 +197,18 @@ proto_reg_handoff_x2ap(void)
x2ap_handle = find_dissector("x2ap");
if (!Initialized) {
dissector_add_handle("sctp.port", x2ap_handle); /* for "decode-as" */
- dissector_add("sctp.ppi", X2AP_PAYLOAD_PROTOCOL_ID, x2ap_handle);
+ dissector_add_uint("sctp.ppi", X2AP_PAYLOAD_PROTOCOL_ID, x2ap_handle);
Initialized=TRUE;
#include "packet-x2ap-dis-tab.c"
} else {
if (SctpPort != 0) {
- dissector_delete("sctp.port", SctpPort, x2ap_handle);
+ dissector_delete_uint("sctp.port", SctpPort, x2ap_handle);
}
}
SctpPort=gbl_x2apSctpPort;
if (SctpPort != 0) {
- dissector_add("sctp.port", SctpPort, x2ap_handle);
+ dissector_add_uint("sctp.port", SctpPort, x2ap_handle);
}
}
diff --git a/asn1/x411/packet-x411-template.c b/asn1/x411/packet-x411-template.c
index 55a9d2421b..e3739c0798 100644
--- a/asn1/x411/packet-x411-template.c
+++ b/asn1/x411/packet-x411-template.c
@@ -339,12 +339,12 @@ prefs_register_x411(void)
/* de-register the old port */
/* port 102 is registered by TPKT - don't undo this! */
if((tcp_port > 0) && (tcp_port != 102) && tpkt_handle)
- dissector_delete("tcp.port", tcp_port, tpkt_handle);
+ dissector_delete_uint("tcp.port", tcp_port, tpkt_handle);
/* Set our port number for future use */
tcp_port = global_x411_tcp_port;
if((tcp_port > 0) && (tcp_port != 102) && tpkt_handle)
- dissector_add("tcp.port", tcp_port, tpkt_handle);
+ dissector_add_uint("tcp.port", tcp_port, tpkt_handle);
}
diff --git a/asn1/x411/x411.cnf b/asn1/x411/x411.cnf
index 7382b40145..5e447acbfd 100644
--- a/asn1/x411/x411.cnf
+++ b/asn1/x411/x411.cnf
@@ -535,7 +535,7 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token"
if(extension_id != -1) {
proto_item_append_text(tree, " (%%s)", val_to_str(extension_id, x411_StandardExtension_vals, "standard-extension %%d"));
- if (dissector_try_port(x411_extension_dissector_table, extension_id, tvb, actx->pinfo, tree)) {
+ if (dissector_try_uint(x411_extension_dissector_table, extension_id, tvb, actx->pinfo, tree)) {
offset = tvb_length(tvb);
} else {
proto_item *item = NULL;
@@ -574,7 +574,7 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token"
#.FN_BODY ExtensionAttribute/extension-attribute-value
proto_item_append_text(tree, " (%%s)", val_to_str(extension_id, x411_ExtensionAttributeType_vals, "extension-attribute-type %%d"));
- if (dissector_try_port(x411_extension_attribute_dissector_table, extension_id, tvb, actx->pinfo, tree)) {
+ if (dissector_try_uint(x411_extension_attribute_dissector_table, extension_id, tvb, actx->pinfo, tree)) {
offset =tvb_length(tvb);
} else {
proto_item *item = NULL;
@@ -1234,7 +1234,7 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token"
#.FN_BODY TokenData/value
proto_item_append_text(tree, " (%%s)", val_to_str(extension_id, x411_TokenDataType_vals, "tokendata-type %%d"));
- if (dissector_try_port(x411_tokendata_dissector_table, extension_id, tvb, actx->pinfo, tree)) {
+ if (dissector_try_uint(x411_tokendata_dissector_table, extension_id, tvb, actx->pinfo, tree)) {
offset = tvb_length(tvb);
} else {
proto_item *item = NULL;