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
This commit is contained in:
Guy Harris 2010-12-20 05:35:29 +00:00
parent 7e16ec5b99
commit a8bc4a0d13
680 changed files with 4891 additions and 4853 deletions

View File

@ -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;

View File

@ -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) {

View File

@ -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);

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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

View File

@ -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;

View File

@ -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");

View File

@ -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;

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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,

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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"

View File

@ -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);
}

View File

@ -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);
}
}

View File

@ -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");
}

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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);
}

View File

@ -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);
}
}

View File

@ -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"

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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 {

View File

@ -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 */

View File

@ -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);
}
}

View File

@ -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);
}

View File

@ -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;

View File

@ -1063,12 +1063,12 @@ proto_reg_handoff_PROTOABBREV(void)
function (proto_reg_handoff).
*/
dissector_delete("tcp.port", currentPort, PROTOABBREV_handle);
dissector_delete_uint("tcp.port", currentPort, PROTOABBREV_handle);
}
currentPort = gPORT_PREF;
dissector_add("tcp.port", currentPort, PROTOABBREV_handle);
dissector_add_uint("tcp.port", currentPort, PROTOABBREV_handle);
}
@ -1088,7 +1088,7 @@ proto_reg_handoff_PROTOABBREV(void)
*/
PROTOABBREV_handle = new_create_dissector_handle(dissect_PROTOABBREV,
proto_PROTOABBREV);
dissector_add("PARENT_SUBFIELD", ID_VALUE, PROTOABBREV_handle);
dissector_add_uint("PARENT_SUBFIELD", ID_VALUE, PROTOABBREV_handle);
}
#endif
@ -3661,10 +3661,10 @@ example, stolen from packet-dns.c:
mdns_udp_handle = create_dissector_handle(dissect_mdns_udp,
proto_dns);
dissector_add("udp.port", UDP_PORT_DNS, dns_udp_handle);
dissector_add("tcp.port", TCP_PORT_DNS, dns_tcp_handle);
dissector_add("udp.port", UDP_PORT_MDNS, mdns_udp_handle);
dissector_add("tcp.port", TCP_PORT_MDNS, dns_tcp_handle);
dissector_add_uint("udp.port", UDP_PORT_DNS, dns_udp_handle);
dissector_add_uint("tcp.port", TCP_PORT_DNS, dns_tcp_handle);
dissector_add_uint("udp.port", UDP_PORT_MDNS, mdns_udp_handle);
dissector_add_uint("tcp.port", TCP_PORT_MDNS, dns_tcp_handle);
The dissect_dns_udp function does very little work and calls
dissect_dns_common, while dissect_dns_tcp calls tcp_dissect_pdus with a

View File

@ -205,7 +205,7 @@ proto_reg_handoff_PROTOABBREV(void)
/* register as normal dissector for IP as well */
PROTOABBREV_handle = new_create_dissector_handle(dissect_PROTOABBREV,
proto_PROTOABBREV);
dissector_add("ip.proto", IP_PROTO_PROTOABBREV, PROTOABBREV_handle);
dissector_add_uint("ip.proto", IP_PROTO_PROTOABBREV, PROTOABBREV_handle);
PROTOABBREV_inited = TRUE;
}
}

View File

@ -76,7 +76,7 @@ CLASSES
|
| protocol_ids(self)
| defined a list of tuples containing three values. Each tuple is defining
| the parameters of dissector_add(). This function MUST be defined when
| the parameters of dissector_add_uint(). This function MUST be defined when
| implementing the dissector of a specific protocol.
|
| register_handoff(self)

View File

@ -133,7 +133,7 @@ proto_reg_handoff_foo(void)
static dissector_handle_t foo_handle;
foo_handle = create_dissector_handle(dissect_foo, proto_foo);
dissector_add("udp.port", FOO_PORT, foo_handle);
dissector_add_uint("udp.port", FOO_PORT, foo_handle);
}]]>
</programlisting></example>
<para>

View File

@ -342,9 +342,9 @@ void proto_reg_handoff_2dparityfec(void)
}
if (dissect_fec) {
dissector_add("rtp.pt", fec_rtp_payload_type, handle_2dparityfec);
dissector_add_uint("rtp.pt", fec_rtp_payload_type, handle_2dparityfec);
} else {
dissector_delete("rtp.pt", fec_rtp_payload_type, handle_2dparityfec);
dissector_delete_uint("rtp.pt", fec_rtp_payload_type, handle_2dparityfec);
}
}

View File

@ -791,10 +791,10 @@ proto_reg_handoff_njack(void)
dissector_handle_t njack_handle;
njack_handle = new_create_dissector_handle(dissect_njack_static, proto_njack);
dissector_add("udp.port", PORT_NJACK_PC, njack_handle);
/* dissector_add("tcp.port", PORT_NJACK_PC, njack_handle); */
dissector_add("udp.port", PORT_NJACK_SWITCH, njack_handle);
/* dissector_add("tcp.port", PORT_NJACK_SWITCH, njack_handle); */
dissector_add_uint("udp.port", PORT_NJACK_PC, njack_handle);
/* dissector_add_uint("tcp.port", PORT_NJACK_PC, njack_handle); */
dissector_add_uint("udp.port", PORT_NJACK_SWITCH, njack_handle);
/* dissector_add_uint("tcp.port", PORT_NJACK_SWITCH, njack_handle); */
heur_dissector_add("udp", dissect_njack_heur, proto_njack);
/* heur_dissector_add("tcp", dissect_njack_heur, proto_njack); */

View File

@ -87,7 +87,7 @@ dissect_3com_xns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
} else {
proto_tree_add_uint(subtree, hf_3com_xns_type_ethertype,
tvb, 0, 2, type);
if (!dissector_try_port(ethertype_subdissector_table,
if (!dissector_try_uint(ethertype_subdissector_table,
type, next_tvb, pinfo, tree))
call_dissector(data_handle, next_tvb, pinfo, tree);
}
@ -127,5 +127,5 @@ proto_reg_handoff_3com_xns(void)
ethertype_subdissector_table = find_dissector_table("ethertype");
our_xns_handle = create_dissector_handle(dissect_3com_xns, proto_3com_xns);
dissector_add("llc.dsap", 0x80, our_xns_handle);
dissector_add_uint("llc.dsap", 0x80, our_xns_handle);
}

View File

@ -2148,5 +2148,5 @@ proto_reg_handoff_a11(void)
dissector_handle_t a11_handle;
a11_handle = find_dissector("a11");
dissector_add("udp.port", UDP_PORT_3GA11, a11_handle);
dissector_add_uint("udp.port", UDP_PORT_3GA11, a11_handle);
}

View File

@ -826,7 +826,7 @@ void proto_reg_handoff_9P(void)
ninep_handle = create_dissector_handle(dissect_9P, proto_9P);
dissector_add("tcp.port", NINEPORT, ninep_handle);
dissector_add_uint("tcp.port", NINEPORT, ninep_handle);
}

File diff suppressed because it is too large Load Diff

View File

@ -349,6 +349,6 @@ proto_reg_handoff_aarp(void)
dissector_handle_t aarp_handle;
aarp_handle = create_dissector_handle(dissect_aarp, proto_aarp);
dissector_add("ethertype", ETHERTYPE_AARP, aarp_handle);
dissector_add("chdlctype", ETHERTYPE_AARP, aarp_handle);
dissector_add_uint("ethertype", ETHERTYPE_AARP, aarp_handle);
dissector_add_uint("chdlctype", ETHERTYPE_AARP, aarp_handle);
}

View File

@ -68,7 +68,7 @@ dissect_acap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
linelen = tvb_find_line_end(tvb, offset, -1, &next_offset, FALSE);
line = tvb_get_ptr(tvb, offset, linelen);
if (pinfo->match_port == pinfo->destport)
if (pinfo->match_uint == pinfo->destport)
is_request = TRUE;
else
is_request = FALSE;
@ -187,5 +187,5 @@ proto_reg_handoff_acap(void)
dissector_handle_t acap_handle;
acap_handle = create_dissector_handle(dissect_acap, proto_acap);
dissector_add("tcp.port", TCP_PORT_ACAP, acap_handle);
dissector_add_uint("tcp.port", TCP_PORT_ACAP, acap_handle);
}

View File

@ -831,12 +831,12 @@ void proto_reg_handoff_actrace(void)
}
else
{
dissector_delete("udp.port", actrace_udp_port, actrace_handle);
dissector_delete_uint("udp.port", actrace_udp_port, actrace_handle);
}
/* Set our port number for future use */
actrace_udp_port = global_actrace_udp_port;
dissector_add("udp.port", global_actrace_udp_port, actrace_handle);
dissector_add_uint("udp.port", global_actrace_udp_port, actrace_handle);
}

View File

@ -1448,9 +1448,9 @@ proto_reg_handoff_adwin(void)
adwin_handle = new_create_dissector_handle(dissect_adwin, proto_adwin);
adwin_prefs_initialized = TRUE;
} else {
dissector_delete("udp.port", udp_port, adwin_handle);
dissector_delete_uint("udp.port", udp_port, adwin_handle);
}
udp_port = global_adwin_udp_port;
dissector_add("udp.port", global_adwin_udp_port, adwin_handle);
dissector_add_uint("udp.port", global_adwin_udp_port, adwin_handle);
}

View File

@ -1161,9 +1161,9 @@ proto_reg_handoff_agentx(void)
agentx_prefs_initialized = TRUE;
}
else {
dissector_delete("tcp.port", agentx_tcp_port, agentx_handle);
dissector_delete_uint("tcp.port", agentx_tcp_port, agentx_handle);
}
agentx_tcp_port = global_agentx_tcp_port;
dissector_add("tcp.port", agentx_tcp_port, agentx_handle);
dissector_add_uint("tcp.port", agentx_tcp_port, agentx_handle);
}

View File

@ -106,5 +106,5 @@ proto_reg_handoff_aim_oft(void)
/* FIXME
aim_handle = new_create_dissector_handle(dissect_aim, proto_aim);
dissector_add("tcp.port", TCP_PORT_AIM, aim_handle);*/
dissector_add_uint("tcp.port", TCP_PORT_AIM, aim_handle);*/
}

View File

@ -1746,5 +1746,5 @@ proto_reg_handoff_aim(void)
dissector_handle_t aim_handle;
aim_handle = new_create_dissector_handle(dissect_aim, proto_aim);
dissector_add("tcp.port", TCP_PORT_AIM, aim_handle);
dissector_add_uint("tcp.port", TCP_PORT_AIM, aim_handle);
}

View File

@ -138,5 +138,5 @@ proto_reg_handoff_airopeek(void)
ieee80211_handle = find_dissector("wlan_datapad");
airopeek_handle = create_dissector_handle(dissect_airopeek, proto_airopeek);
dissector_add("udp.port", 5000, airopeek_handle);
dissector_add_uint("udp.port", 5000, airopeek_handle);
}

View File

@ -874,5 +874,5 @@ proto_reg_handoff_ajp13(void)
{
dissector_handle_t ajp13_handle;
ajp13_handle = create_dissector_handle(dissect_ajp13, proto_ajp13);
dissector_add("tcp.port", 8009, ajp13_handle);
dissector_add_uint("tcp.port", 8009, ajp13_handle);
}

View File

@ -1798,5 +1798,5 @@ proto_reg_handoff_alcap(void)
{
dissector_handle_t alcap_handle = create_dissector_handle(dissect_alcap, proto_alcap);
dissector_add("mtp3.service_indicator", ALCAP_SI, alcap_handle);
dissector_add_uint("mtp3.service_indicator", ALCAP_SI, alcap_handle);
}

View File

@ -5237,6 +5237,6 @@ proto_register_amqp(void)
void
proto_reg_handoff_amqp(void)
{
dissector_add("tcp.port", amqp_port,
dissector_add_uint("tcp.port", amqp_port,
create_dissector_handle(dissect_amqp, proto_amqp));
}

View File

@ -648,18 +648,18 @@ proto_reg_handoff_amr(void)
dissector_add_string("h245.gef.content", ftr->id, new_create_dissector_handle(ftr->content_pdu, proto_amr));
}
/* Activate the next line for testing with the randpkt tool
dissector_add("udp.port", 55555, amr_handle);
dissector_add_uint("udp.port", 55555, amr_handle);
*/
amr_prefs_initialized = TRUE;
} else {
if ( dynamic_payload_type > 95 )
dissector_delete("rtp.pt", dynamic_payload_type, amr_handle);
dissector_delete_uint("rtp.pt", dynamic_payload_type, amr_handle);
}
dynamic_payload_type = temp_dynamic_payload_type;
if ( dynamic_payload_type > 95 ){
dissector_add("rtp.pt", dynamic_payload_type, amr_handle);
dissector_add_uint("rtp.pt", dynamic_payload_type, amr_handle);
}
}

View File

@ -945,7 +945,7 @@ proto_reg_handoff_ancp(void)
dissector_handle_t ancp_handle;
ancp_handle = create_dissector_handle(dissect_ancp, proto_ancp);
dissector_add("tcp.port", ANCP_PORT, ancp_handle);
dissector_add_uint("tcp.port", ANCP_PORT, ancp_handle);
stats_tree_register("ancp", "ancp", "ANCP", 0,
ancp_stats_tree_packet, ancp_stats_tree_init, NULL);
}

View File

@ -146,6 +146,6 @@ proto_reg_handoff_ans(void)
dissector_handle_t ans_handle;
ans_handle = create_dissector_handle(dissect_ans, proto_ans);
dissector_add("ethertype", ETHERTYPE_INTEL_ANS, ans_handle);
dissector_add_uint("ethertype", ETHERTYPE_INTEL_ANS, ans_handle);
}

View File

@ -1843,7 +1843,7 @@ trans_param_bearer_data(tvbuff_t *tvb, proto_tree *tree, guint len, guint32 offs
*/
tele_tvb = tvb_new_subset(tvb, offset, len, len);
dissector_try_port(tele_dissector_table, ansi_637_trans_tele_id,
dissector_try_uint(tele_dissector_table, ansi_637_trans_tele_id,
tele_tvb, g_pinfo, g_tree);
}
@ -1967,7 +1967,7 @@ dissect_ansi_637_tele(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*/
if (tree)
{
value = pinfo->match_port;
value = pinfo->match_uint;
/*
* create the ansi_637 protocol tree
@ -2045,7 +2045,7 @@ dissect_ansi_637_tele(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
"%s - %s (%d)",
ansi_proto_name_tele,
str,
pinfo->match_port);
pinfo->match_uint);
ansi_637_tree =
proto_item_add_subtree(ansi_637_item, ett_ansi_637_tele);
@ -2351,18 +2351,18 @@ proto_reg_handoff_ansi_637(void)
/*
* ANSI MAP dissector will push out teleservice ids
*/
dissector_add("ansi_map.tele_id", ansi_tele_id_strings[i].value, ansi_637_tele_handle);
dissector_add_uint("ansi_map.tele_id", ansi_tele_id_strings[i].value, ansi_637_tele_handle);
/*
* we will push out teleservice ids after Transport layer decode
*/
dissector_add("ansi_637.tele_id", ansi_tele_id_strings[i].value, ansi_637_tele_handle);
dissector_add_uint("ansi_637.tele_id", ansi_tele_id_strings[i].value, ansi_637_tele_handle);
}
/*
* ANSI A-interface will push out transport layer data
*/
dissector_add("ansi_a.sms", 0, ansi_637_trans_handle);
dissector_add_uint("ansi_a.sms", 0, ansi_637_trans_handle);
/* data_handle = find_dissector("data"); */
}

View File

@ -4773,12 +4773,12 @@ dissect_ansi_683(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_protocol_format(tree, proto_ansi_683, tvb, 0, -1,
"%s %s Link",
ansi_proto_name,
(pinfo->match_port == ANSI_683_FORWARD) ? "Forward" : "Reverse");
(pinfo->match_uint == ANSI_683_FORWARD) ? "Forward" : "Reverse");
ansi_683_tree =
proto_item_add_subtree(ansi_683_item, ett_ansi_683);
if (pinfo->match_port == ANSI_683_FORWARD)
if (pinfo->match_uint == ANSI_683_FORWARD)
{
dissect_ansi_683_for_message(tvb, ansi_683_tree);
}
@ -4865,10 +4865,10 @@ proto_reg_handoff_ansi_683(void)
ansi_683_handle = create_dissector_handle(dissect_ansi_683, proto_ansi_683);
dissector_add("ansi_map.ota", ANSI_683_FORWARD, ansi_683_handle);
dissector_add("ansi_map.ota", ANSI_683_REVERSE, ansi_683_handle);
dissector_add("ansi_a.ota", ANSI_683_FORWARD, ansi_683_handle);
dissector_add("ansi_a.ota", ANSI_683_REVERSE, ansi_683_handle);
dissector_add_uint("ansi_map.ota", ANSI_683_FORWARD, ansi_683_handle);
dissector_add_uint("ansi_map.ota", ANSI_683_REVERSE, ansi_683_handle);
dissector_add_uint("ansi_a.ota", ANSI_683_FORWARD, ansi_683_handle);
dissector_add_uint("ansi_a.ota", ANSI_683_REVERSE, ansi_683_handle);
data_handle = find_dissector("data");
}

View File

@ -2147,12 +2147,12 @@ dissect_ansi_801(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_protocol_format(tree, proto_ansi_801, tvb, 0, -1,
"%s %s Link",
ansi_proto_name,
(pinfo->match_port == ANSI_801_FORWARD) ? "Forward" : "Reverse");
(pinfo->match_uint == ANSI_801_FORWARD) ? "Forward" : "Reverse");
ansi_801_tree =
proto_item_add_subtree(ansi_801_item, ett_ansi_801);
if (pinfo->match_port == ANSI_801_FORWARD)
if (pinfo->match_uint == ANSI_801_FORWARD)
{
dissect_ansi_801_for_message(tvb, ansi_801_tree);
}
@ -2409,10 +2409,10 @@ proto_reg_handoff_ansi_801(void)
ansi_801_handle = create_dissector_handle(dissect_ansi_801, proto_ansi_801);
dissector_add("ansi_map.pld", ANSI_801_FORWARD, ansi_801_handle);
dissector_add("ansi_map.pld", ANSI_801_REVERSE, ansi_801_handle);
dissector_add("ansi_a.pld", ANSI_801_FORWARD, ansi_801_handle);
dissector_add("ansi_a.pld", ANSI_801_REVERSE, ansi_801_handle);
dissector_add_uint("ansi_map.pld", ANSI_801_FORWARD, ansi_801_handle);
dissector_add_uint("ansi_map.pld", ANSI_801_REVERSE, ansi_801_handle);
dissector_add_uint("ansi_a.pld", ANSI_801_FORWARD, ansi_801_handle);
dissector_add_uint("ansi_a.pld", ANSI_801_REVERSE, ansi_801_handle);
data_handle = find_dissector("data");
}

View File

@ -5359,7 +5359,7 @@ elem_adds_user_part(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len,
case ADDS_APP_SMS:
adds_tvb = tvb_new_subset(tvb, curr_offset, len - 1, len - 1);
dissector_try_port(is637_dissector_table,
dissector_try_uint(is637_dissector_table,
0, adds_tvb, g_pinfo, g_tree);
curr_offset += (len - 1);
@ -5368,7 +5368,7 @@ elem_adds_user_part(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len,
case ADDS_APP_OTA:
adds_tvb = tvb_new_subset(tvb, curr_offset, len - 1, len - 1);
dissector_try_port(is683_dissector_table,
dissector_try_uint(is683_dissector_table,
(g_pinfo->p2p_dir == P2P_DIR_RECV), adds_tvb, g_pinfo, g_tree);
curr_offset += (len - 1);
@ -5377,7 +5377,7 @@ elem_adds_user_part(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len,
case ADDS_APP_PDS:
adds_tvb = tvb_new_subset(tvb, curr_offset, len - 1, len - 1);
dissector_try_port(is801_dissector_table,
dissector_try_uint(is801_dissector_table,
(g_pinfo->p2p_dir == P2P_DIR_RECV), adds_tvb, g_pinfo, g_tree);
curr_offset += (len - 1);
@ -12233,8 +12233,8 @@ proto_reg_handoff_ansi_a(void)
data_handle = find_dissector("data");
rtp_handle = find_dissector("rtp");
dissector_add("bsap.pdu_type", BSSAP_PDU_TYPE_BSMAP, bsmap_handle);
dissector_add("bsap.pdu_type", BSSAP_PDU_TYPE_DTAP, dtap_handle);
dissector_add_uint("bsap.pdu_type", BSSAP_PDU_TYPE_BSMAP, bsmap_handle);
dissector_add_uint("bsap.pdu_type", BSSAP_PDU_TYPE_DTAP, dtap_handle);
ansi_a_prefs_initialized = TRUE;
}

View File

@ -5490,10 +5490,10 @@ dissect_ansi_map_ServiceIndicator(gboolean implicit_tag _U_, tvbuff_t *tvb _U_,
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;
@ -10655,17 +10655,17 @@ dissect_ansi_map_SMS_BearerData(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in
}
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;
@ -10703,7 +10703,7 @@ dissect_ansi_map_SMS_TeleserviceIdentifier(gboolean implicit_tag _U_, tvbuff_t *
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);
}
}

View File

@ -198,12 +198,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) {

View File

@ -1001,5 +1001,5 @@ proto_reg_handoff_aodv(void)
aodv_handle = new_create_dissector_handle(dissect_aodv,
proto_aodv);
dissector_add("udp.port", UDP_PORT_AODV, aodv_handle);
dissector_add_uint("udp.port", UDP_PORT_AODV, aodv_handle);
}

View File

@ -499,6 +499,6 @@ proto_reg_handoff_aoe(void)
dissector_handle_t aoe_handle;
aoe_handle = find_dissector("aoe");
dissector_add("ethertype", ETHERTYPE_AOE, aoe_handle);
dissector_add_uint("ethertype", ETHERTYPE_AOE, aoe_handle);
}

View File

@ -94,7 +94,7 @@ dissect_ap1394(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (tree)
proto_tree_add_uint(fh_tree, hf_ap1394_type, tvb, 16, 2, etype);
next_tvb = tvb_new_subset_remaining(tvb, 18);
if (!dissector_try_port(ethertype_subdissector_table, etype, next_tvb,
if (!dissector_try_uint(ethertype_subdissector_table, etype, next_tvb,
pinfo, tree))
call_dissector(data_handle, next_tvb, pinfo, tree);
}
@ -133,5 +133,5 @@ proto_reg_handoff_ap1394(void)
ethertype_subdissector_table = find_dissector_table("ethertype");
ap1394_handle = create_dissector_handle(dissect_ap1394, proto_ap1394);
dissector_add("wtap_encap", WTAP_ENCAP_APPLE_IP_OVER_IEEE1394, ap1394_handle);
dissector_add_uint("wtap_encap", WTAP_ENCAP_APPLE_IP_OVER_IEEE1394, ap1394_handle);
}

View File

@ -241,7 +241,7 @@ dissect_arcnet_common (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
next_tvb = tvb_new_subset_remaining (tvb, offset);
if (!dissector_try_port (arcnet_dissector_table, protID,
if (!dissector_try_uint (arcnet_dissector_table, protID,
next_tvb, pinfo, tree))
{
if (check_col (pinfo->cinfo, COL_PROTOCOL))
@ -362,10 +362,10 @@ proto_reg_handoff_arcnet (void)
dissector_handle_t arcnet_handle, arcnet_linux_handle;
arcnet_handle = create_dissector_handle (dissect_arcnet, proto_arcnet);
dissector_add ("wtap_encap", WTAP_ENCAP_ARCNET, arcnet_handle);
dissector_add_uint ("wtap_encap", WTAP_ENCAP_ARCNET, arcnet_handle);
arcnet_linux_handle = create_dissector_handle (dissect_arcnet_linux,
proto_arcnet);
dissector_add ("wtap_encap", WTAP_ENCAP_ARCNET_LINUX, arcnet_linux_handle);
dissector_add_uint ("wtap_encap", WTAP_ENCAP_ARCNET_LINUX, arcnet_linux_handle);
data_handle = find_dissector ("data");
}

View File

@ -330,6 +330,6 @@ void proto_reg_handoff_armagetronad(void)
armagetronad_handle = find_dissector("armagetronad");
dissector_add("udp.port", UDP_PORT_ARMAGETRONAD, armagetronad_handle);
dissector_add("udp.port", UDP_PORT_MASTER, armagetronad_handle);
dissector_add_uint("udp.port", UDP_PORT_ARMAGETRONAD, armagetronad_handle);
dissector_add_uint("udp.port", UDP_PORT_MASTER, armagetronad_handle);
}

View File

@ -1352,9 +1352,9 @@ proto_reg_handoff_arp(void)
arp_handle = find_dissector("arp");
dissector_add("ethertype", ETHERTYPE_ARP, arp_handle);
dissector_add("ethertype", ETHERTYPE_REVARP, arp_handle);
dissector_add("arcnet.protocol_id", ARCNET_PROTO_ARP_1051, arp_handle);
dissector_add("arcnet.protocol_id", ARCNET_PROTO_ARP_1201, arp_handle);
dissector_add("arcnet.protocol_id", ARCNET_PROTO_RARP_1201, arp_handle);
dissector_add_uint("ethertype", ETHERTYPE_ARP, arp_handle);
dissector_add_uint("ethertype", ETHERTYPE_REVARP, arp_handle);
dissector_add_uint("arcnet.protocol_id", ARCNET_PROTO_ARP_1051, arp_handle);
dissector_add_uint("arcnet.protocol_id", ARCNET_PROTO_ARP_1201, arp_handle);
dissector_add_uint("arcnet.protocol_id", ARCNET_PROTO_RARP_1201, arp_handle);
}

View File

@ -2696,10 +2696,10 @@ proto_reg_handoff_artnet(void) {
rdm_handle = find_dissector("rdm");
artnet_initialized = TRUE;
} else {
dissector_delete("udp.port",udp_port_artnet,artnet_handle);
dissector_delete_uint("udp.port",udp_port_artnet,artnet_handle);
}
udp_port_artnet = global_udp_port_artnet;
dissector_add("udp.port",global_udp_port_artnet,artnet_handle);
dissector_add_uint("udp.port",global_udp_port_artnet,artnet_handle);
}

View File

@ -153,7 +153,7 @@ proto_reg_handoff_aruba_adp(void)
dissector_handle_t adp_handle;
adp_handle = create_dissector_handle(dissect_aruba_adp, proto_aruba_adp);
dissector_add("udp.port", UDP_PORT_ADP, adp_handle);
dissector_add_uint("udp.port", UDP_PORT_ADP, adp_handle);
}

View File

@ -129,12 +129,12 @@ proto_register_aruba_erm(void)
static void range_delete_callback (guint32 port)
{
dissector_delete("udp.port", port, aruba_erm_handle);
dissector_delete_uint("udp.port", port, aruba_erm_handle);
}
static void range_add_callback (guint32 port)
{
dissector_add("udp.port", port, aruba_erm_handle);
dissector_add_uint("udp.port", port, aruba_erm_handle);
}
void

View File

@ -345,6 +345,6 @@ proto_reg_handoff_papi(void)
dissector_handle_t papi_handle;
papi_handle = new_create_dissector_handle(dissect_papi, proto_papi);
dissector_add("udp.port", UDP_PORT_PAPI, papi_handle);
dissector_add_uint("udp.port", UDP_PORT_PAPI, papi_handle);
data_handle = find_dissector("data");
}

View File

@ -929,8 +929,8 @@ proto_reg_handoff_asap(void)
dissector_handle_t asap_handle;
asap_handle = create_dissector_handle(dissect_asap, proto_asap);
dissector_add("sctp.ppi", ASAP_PAYLOAD_PROTOCOL_ID, asap_handle);
dissector_add("udp.port", ASAP_UDP_PORT, asap_handle);
dissector_add("tcp.port", ASAP_TCP_PORT, asap_handle);
dissector_add("sctp.port", ASAP_SCTP_PORT, asap_handle);
dissector_add_uint("sctp.ppi", ASAP_PAYLOAD_PROTOCOL_ID, asap_handle);
dissector_add_uint("udp.port", ASAP_UDP_PORT, asap_handle);
dissector_add_uint("tcp.port", ASAP_TCP_PORT, asap_handle);
dissector_add_uint("sctp.port", ASAP_SCTP_PORT, asap_handle);
}

View File

@ -162,5 +162,5 @@ proto_reg_handoff_ascend(void)
ppp_hdlc_handle = find_dissector("ppp_hdlc");
ascend_handle = create_dissector_handle(dissect_ascend, proto_ascend);
dissector_add("wtap_encap", WTAP_ENCAP_ASCEND, ascend_handle);
dissector_add_uint("wtap_encap", WTAP_ENCAP_ASCEND, ascend_handle);
}

View File

@ -378,5 +378,5 @@ proto_reg_handoff_asf(void)
data_handle = find_dissector("data");
asf_handle = new_create_dissector_handle(dissect_asf, proto_asf);
dissector_add("rmcp.class", RMCP_CLASS_ASF, asf_handle);
dissector_add_uint("rmcp.class", RMCP_CLASS_ASF, asf_handle);
}

View File

@ -5724,8 +5724,8 @@ void proto_register_r3 (void)
void proto_reg_handoff_r3 (void)
{
dissector_handle_t r3_handle = find_dissector ("r3");
dissector_add ("tcp.port", 2571, r3_handle);
dissector_add ("tcp.port", 8023, r3_handle);
dissector_add_uint ("tcp.port", 2571, r3_handle);
dissector_add_uint ("tcp.port", 8023, r3_handle);
}

View File

@ -1724,7 +1724,7 @@ dissect_ddp_short(tvbuff_t *tvb, packet_info *pinfo, guint8 dnode,
}
new_tvb = tvb_new_subset_remaining(tvb, DDP_SHORT_HEADER_SIZE);
if (!dissector_try_port(ddp_dissector_table, type, new_tvb, pinfo, tree))
if (!dissector_try_uint(ddp_dissector_table, type, new_tvb, pinfo, tree))
call_dissector(data_handle,new_tvb, pinfo, tree);
}
@ -1800,7 +1800,7 @@ dissect_ddp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
new_tvb = tvb_new_subset_remaining(tvb, DDP_HEADER_SIZE);
if (!dissector_try_port(ddp_dissector_table, ddp.type, new_tvb, pinfo, tree))
if (!dissector_try_uint(ddp_dissector_table, ddp.type, new_tvb, pinfo, tree))
call_dissector(data_handle,new_tvb, pinfo, tree);
}
@ -2451,33 +2451,33 @@ proto_reg_handoff_atalk(void)
dissector_handle_t rtmp_data_handle, llap_handle;
ddp_handle = create_dissector_handle(dissect_ddp, proto_ddp);
dissector_add("ethertype", ETHERTYPE_ATALK, ddp_handle);
dissector_add("chdlctype", ETHERTYPE_ATALK, ddp_handle);
dissector_add("ppp.protocol", PPP_AT, ddp_handle);
dissector_add("null.type", BSD_AF_APPLETALK, ddp_handle);
dissector_add("arcnet.protocol_id", ARCNET_PROTO_APPLETALK, ddp_handle);
dissector_add_uint("ethertype", ETHERTYPE_ATALK, ddp_handle);
dissector_add_uint("chdlctype", ETHERTYPE_ATALK, ddp_handle);
dissector_add_uint("ppp.protocol", PPP_AT, ddp_handle);
dissector_add_uint("null.type", BSD_AF_APPLETALK, ddp_handle);
dissector_add_uint("arcnet.protocol_id", ARCNET_PROTO_APPLETALK, ddp_handle);
nbp_handle = create_dissector_handle(dissect_nbp, proto_nbp);
dissector_add("ddp.type", DDP_NBP, nbp_handle);
dissector_add_uint("ddp.type", DDP_NBP, nbp_handle);
atp_handle = create_dissector_handle(dissect_atp, proto_atp);
dissector_add("ddp.type", DDP_ATP, atp_handle);
dissector_add_uint("ddp.type", DDP_ATP, atp_handle);
asp_handle = create_dissector_handle(dissect_asp, proto_asp);
pap_handle = create_dissector_handle(dissect_pap, proto_pap);
rtmp_request_handle = create_dissector_handle(dissect_rtmp_request, proto_rtmp);
rtmp_data_handle = create_dissector_handle(dissect_rtmp_data, proto_rtmp);
dissector_add("ddp.type", DDP_RTMPREQ, rtmp_request_handle);
dissector_add("ddp.type", DDP_RTMPDATA, rtmp_data_handle);
dissector_add_uint("ddp.type", DDP_RTMPREQ, rtmp_request_handle);
dissector_add_uint("ddp.type", DDP_RTMPDATA, rtmp_data_handle);
zip_ddp_handle = create_dissector_handle(dissect_ddp_zip, proto_zip);
dissector_add("ddp.type", DDP_ZIP, zip_ddp_handle);
dissector_add_uint("ddp.type", DDP_ZIP, zip_ddp_handle);
zip_atp_handle = create_dissector_handle(dissect_atp_zip, proto_zip);
llap_handle = create_dissector_handle(dissect_llap, proto_llap);
dissector_add("wtap_encap", WTAP_ENCAP_LOCALTALK, llap_handle);
dissector_add_uint("wtap_encap", WTAP_ENCAP_LOCALTALK, llap_handle);
register_init_routine( atp_init);
register_init_routine( &asp_reinit);

View File

@ -2021,10 +2021,10 @@ proto_reg_handoff_atm(void)
fp_handle = find_dissector("fp");
atm_handle = create_dissector_handle(dissect_atm, proto_atm);
dissector_add("wtap_encap", WTAP_ENCAP_ATM_PDUS, atm_handle);
dissector_add_uint("wtap_encap", WTAP_ENCAP_ATM_PDUS, atm_handle);
atm_untruncated_handle = create_dissector_handle(dissect_atm_untruncated,
proto_atm);
dissector_add("wtap_encap", WTAP_ENCAP_ATM_PDUS_UNTRUNCATED,
dissector_add_uint("wtap_encap", WTAP_ENCAP_ATM_PDUS_UNTRUNCATED,
atm_untruncated_handle);
}

View File

@ -235,7 +235,7 @@ proto_reg_handoff_auto_rp(void)
auto_rp_handle = create_dissector_handle(dissect_auto_rp,
proto_auto_rp);
dissector_add("udp.port", UDP_PORT_PIM_RP_DISC, auto_rp_handle);
dissector_add_uint("udp.port", UDP_PORT_PIM_RP_DISC, auto_rp_handle);
}
/*

View File

@ -167,7 +167,7 @@ proto_reg_handoff_ax4000(void)
ax4000_handle = create_dissector_handle(dissect_ax4000,
proto_ax4000);
dissector_add("ip.proto", IP_PROTO_AX4000, ax4000_handle);
dissector_add("tcp.port", AX4000_TCP_PORT, ax4000_handle);
dissector_add("udp.port", AX4000_UDP_PORT, ax4000_handle);
dissector_add_uint("ip.proto", IP_PROTO_AX4000, ax4000_handle);
dissector_add_uint("tcp.port", AX4000_TCP_PORT, ax4000_handle);
dissector_add_uint("udp.port", AX4000_UDP_PORT, ax4000_handle);
}

View File

@ -132,7 +132,7 @@ dissect_ayiya(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch (opcode) {
case OPCODE_FORWARD:
payload = tvb_new_subset_remaining(tvb, offset);
dissector_try_port(ip_dissector_table, next_header, payload, pinfo, tree);
dissector_try_uint(ip_dissector_table, next_header, payload, pinfo, tree);
break;
}
}
@ -209,7 +209,7 @@ proto_reg_handoff_ayiya(void)
dissector_handle_t ayiya_handle;
ayiya_handle = find_dissector("ayiya");
dissector_add("udp.port", UDP_PORT_AYIYA, ayiya_handle);
dissector_add_uint("udp.port", UDP_PORT_AYIYA, ayiya_handle);
ip_dissector_table = find_dissector_table("ip.proto");
}

View File

@ -5983,7 +5983,7 @@ fConfirmedPrivateTransferRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
offset = fVendorIdentifier (tvb, pinfo, subtree, offset);
next_tvb = tvb_new_subset_remaining(tvb,offset);
if (dissector_try_port(bacapp_dissector_table,
if (dissector_try_uint(bacapp_dissector_table,
vendor_identifier, next_tvb, pinfo, tree))
{
/* we parsed it so skip over length and we are done */

View File

@ -633,11 +633,11 @@ proto_reg_handoff_bacnet(void)
dissector_handle_t bacnet_handle;
bacnet_handle = find_dissector("bacnet");
dissector_add("bvlc.function", 0x04, bacnet_handle);
dissector_add("bvlc.function", 0x09, bacnet_handle);
dissector_add("bvlc.function", 0x0a, bacnet_handle);
dissector_add("bvlc.function", 0x0b, bacnet_handle);
dissector_add("llc.dsap", SAP_BACNET, bacnet_handle);
dissector_add_uint("bvlc.function", 0x04, bacnet_handle);
dissector_add_uint("bvlc.function", 0x09, bacnet_handle);
dissector_add_uint("bvlc.function", 0x0a, bacnet_handle);
dissector_add_uint("bvlc.function", 0x0b, bacnet_handle);
dissector_add_uint("llc.dsap", SAP_BACNET, bacnet_handle);
bacapp_handle = find_dissector("bacapp");
data_handle = find_dissector("data");
}

View File

@ -259,12 +259,12 @@ dissect_banana(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
static void
range_delete_banana_tcp_callback(guint32 port) {
dissector_delete("tcp.port", port, banana_handle);
dissector_delete_uint("tcp.port", port, banana_handle);
}
static void
range_add_banana_tcp_callback(guint32 port) {
dissector_add("tcp.port", port, banana_handle);
dissector_add_uint("tcp.port", port, banana_handle);
}
static void

View File

@ -931,15 +931,15 @@ void proto_reg_handoff_bat(void)
inited = TRUE;
} else {
dissector_delete("udp.port", batman_udp_port, batman_handle);
dissector_delete("udp.port", gw_udp_port, gw_handle);
dissector_delete("udp.port", vis_udp_port, vis_handle);
dissector_delete_uint("udp.port", batman_udp_port, batman_handle);
dissector_delete_uint("udp.port", gw_udp_port, gw_handle);
dissector_delete_uint("udp.port", vis_udp_port, vis_handle);
}
batman_udp_port = global_bat_batman_udp_port;
gw_udp_port = global_bat_gw_udp_port;
vis_udp_port = global_bat_vis_udp_port;
dissector_add("udp.port", batman_udp_port, batman_handle);
dissector_add("udp.port", gw_udp_port, gw_handle);
dissector_add("udp.port", vis_udp_port, vis_handle);
dissector_add_uint("udp.port", batman_udp_port, batman_handle);
dissector_add_uint("udp.port", gw_udp_port, gw_handle);
dissector_add_uint("udp.port", vis_udp_port, vis_handle);
}

View File

@ -2074,9 +2074,9 @@ void proto_reg_handoff_batadv(void)
inited = TRUE;
} else {
dissector_delete("ethertype", old_batadv_ethertype, batman_handle);
dissector_delete_uint("ethertype", old_batadv_ethertype, batman_handle);
}
old_batadv_ethertype = batadv_ethertype;
dissector_add("ethertype", batadv_ethertype, batman_handle);
dissector_add_uint("ethertype", batadv_ethertype, batman_handle);
}

View File

@ -80,7 +80,7 @@ static void dissect_bctp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree) {
proto_tree_add_item(pt, hf_bctp_tpei, tvb,0,2, FALSE);
proto_tree_add_item(pt, hf_bctp_tpi, tvb,0,2, FALSE);
if ( dissector_try_port(bctp_dissector_table, tpi, sub_tvb, pinfo, tree) ) {
if ( dissector_try_uint(bctp_dissector_table, tpi, sub_tvb, pinfo, tree) ) {
return;
} else if (tpi <= 0x22) {
call_dissector(data_handle,sub_tvb, pinfo, tree);

View File

@ -1095,7 +1095,7 @@ proto_reg_handoff_beep(void)
}
else {
dissector_delete("tcp.port", beep_tcp_port, beep_handle);
dissector_delete_uint("tcp.port", beep_tcp_port, beep_handle);
}
@ -1103,6 +1103,6 @@ proto_reg_handoff_beep(void)
beep_tcp_port = global_beep_tcp_port;
dissector_add("tcp.port", global_beep_tcp_port, beep_handle);
dissector_add_uint("tcp.port", global_beep_tcp_port, beep_handle);
}

View File

@ -4840,7 +4840,7 @@ proto_reg_handoff_ber(void)
oid_add_from_string("basic-encoding","2.1.1");
ber_handle = create_dissector_handle(dissect_ber, proto_ber);
dissector_add("wtap_encap", WTAP_ENCAP_BER, ber_handle);
dissector_add_uint("wtap_encap", WTAP_ENCAP_BER, ber_handle);
ber_decode_as_foreach(ber_add_syntax_name, &i);

Some files were not shown because too many files have changed in this diff Show More