diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2006-10-31 09:29:07 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2006-10-31 09:29:07 +0000 |
commit | 2d1bb39121cf739517b55c68a84e5d9ad5b31619 (patch) | |
tree | fff9b9d1a5f7445ca000040fe0c8399298acbac8 | |
parent | 4343de3513f4a1405f06ca9bdf82c134ac10594e (diff) | |
download | wireshark-2d1bb39121cf739517b55c68a84e5d9ad5b31619.tar.gz wireshark-2d1bb39121cf739517b55c68a84e5d9ad5b31619.tar.bz2 wireshark-2d1bb39121cf739517b55c68a84e5d9ad5b31619.zip |
change the signature for the get_pdu_len() function pointer passed to tcp_dissect_pdus() to also include a packet_info pointer.
there are many reasons why some protocols actually need to be able to access the pinfo structure while determining the pdu size
svn path=/trunk/; revision=19751
58 files changed, 76 insertions, 76 deletions
diff --git a/asn1/ldap/packet-ldap-template.c b/asn1/ldap/packet-ldap-template.c index aff390fb30..8089774937 100644 --- a/asn1/ldap/packet-ldap-template.c +++ b/asn1/ldap/packet-ldap-template.c @@ -1128,7 +1128,7 @@ static void dissect_NetLogon_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree * static guint -get_sasl_ldap_pdu_len(tvbuff_t *tvb, int offset) +get_sasl_ldap_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { /* sasl encapsulated ldap is 4 bytes plus the length in size */ return tvb_get_ntohl(tvb, offset)+4; @@ -1142,7 +1142,7 @@ dissect_sasl_ldap_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } static guint -get_normal_ldap_pdu_len(tvbuff_t *tvb, int offset) +get_normal_ldap_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint32 len; gboolean ind; diff --git a/asn1/pkixcmp/cmp-exp.cnf b/asn1/pkixcmp/cmp-exp.cnf index 7b448b761c..d09232df9e 100644 --- a/asn1/pkixcmp/cmp-exp.cnf +++ b/asn1/pkixcmp/cmp-exp.cnf @@ -1,6 +1,6 @@ # Do not modify this file. # It is created automatically by the ASN.1 to Wireshark dissector compiler -# .\cmp-exp.cnf +# ./cmp-exp.cnf # ../../tools/asn2wrs.py -b -e -p cmp -c cmp.cnf -s packet-cmp-template CMP.asn #.MODULE diff --git a/asn1/pkixcmp/packet-cmp-template.c b/asn1/pkixcmp/packet-cmp-template.c index 0c3712e8c7..81d4495f7d 100644 --- a/asn1/pkixcmp/packet-cmp-template.c +++ b/asn1/pkixcmp/packet-cmp-template.c @@ -169,7 +169,7 @@ static void dissect_cmp_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *p } -static guint get_cmp_pdu_len(tvbuff_t *tvb, int offset) +static guint get_cmp_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint32 plen; diff --git a/asn1/ulp/packet-ulp-template.c b/asn1/ulp/packet-ulp-template.c index 5c6157ddb7..a8c478506e 100644 --- a/asn1/ulp/packet-ulp-template.c +++ b/asn1/ulp/packet-ulp-template.c @@ -80,7 +80,7 @@ static gint ett_ulp = -1; static guint -get_ulp_pdu_len(tvbuff_t *tvb, int offset) +get_ulp_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { /* PDU length = Message length */ return tvb_get_ntohs(tvb,offset); diff --git a/asn1/ulp/ulp-exp.cnf b/asn1/ulp/ulp-exp.cnf index e22e8936db..3d50fdbdce 100644 --- a/asn1/ulp/ulp-exp.cnf +++ b/asn1/ulp/ulp-exp.cnf @@ -1,7 +1,7 @@ # Do not modify this file. # It is created automatically by the ASN.1 to Wireshark dissector compiler -# .\ulp-exp.cnf -# ../../tools/asn2wrs.py -u -e -p ulp -c ulp.cnf -s packet-ulp-template ULP.asn +# ./ulp-exp.cnf +# ../../tools/asn2wrs.py -e -p ulp -c ulp.cnf -s packet-ulp-template ULP.asn #.MODULE ULP ulp diff --git a/epan/dissectors/packet-aim.c b/epan/dissectors/packet-aim.c index 7740f778e4..69bed55566 100644 --- a/epan/dissectors/packet-aim.c +++ b/epan/dissectors/packet-aim.c @@ -329,7 +329,7 @@ static const aim_tlv fnac_tlvs[] = { }; static int dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -static guint get_aim_pdu_len(tvbuff_t *tvb, int offset); +static guint get_aim_pdu_len(packet_info *pinfo, tvbuff_t *tvb, int offset); static void dissect_aim_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); static void dissect_aim_newconn(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree); @@ -433,7 +433,7 @@ static int dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) return tvb_length(tvb); } -static guint get_aim_pdu_len(tvbuff_t *tvb, int offset) +static guint get_aim_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint16 plen; diff --git a/epan/dissectors/packet-ajp13.c b/epan/dissectors/packet-ajp13.c index 806692bf6c..edc20a446c 100644 --- a/epan/dissectors/packet-ajp13.c +++ b/epan/dissectors/packet-ajp13.c @@ -746,7 +746,7 @@ dissect_ajp13_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * packet length. see comments in packet-tcp.c:tcp_dissect_pdus(). */ static guint -get_ajp13_pdu_len(tvbuff_t *tvb, int offset) +get_ajp13_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint16 magic; guint16 plen; diff --git a/epan/dissectors/packet-bittorrent.c b/epan/dissectors/packet-bittorrent.c index 48316c6232..b49a5cea41 100644 --- a/epan/dissectors/packet-bittorrent.c +++ b/epan/dissectors/packet-bittorrent.c @@ -193,7 +193,7 @@ static struct client_information peer_id[] = { {"", NULL} }; -static guint get_bittorrent_pdu_length(tvbuff_t *tvb, int offset) +static guint get_bittorrent_pdu_length(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint8 type; guint32 length; diff --git a/epan/dissectors/packet-cast.c b/epan/dissectors/packet-cast.c index 8af644186f..9f71d35f5e 100644 --- a/epan/dissectors/packet-cast.c +++ b/epan/dissectors/packet-cast.c @@ -1038,7 +1038,7 @@ static void dissect_cast_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree } /* Get the length of a single CAST PDU */ -static guint get_cast_pdu_len(tvbuff_t *tvb, int offset) +static guint get_cast_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint32 hdr_data_length; diff --git a/epan/dissectors/packet-cmp.c b/epan/dissectors/packet-cmp.c index 2a31b39393..60bae901d5 100644 --- a/epan/dissectors/packet-cmp.c +++ b/epan/dissectors/packet-cmp.c @@ -1,6 +1,6 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* .\packet-cmp.c */ +/* ./packet-cmp.c */ /* ../../tools/asn2wrs.py -b -e -p cmp -c cmp.cnf -s packet-cmp-template CMP.asn */ /* Input file: packet-cmp-template.c */ @@ -1415,7 +1415,7 @@ static void dissect_cmp_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *p } -static guint get_cmp_pdu_len(tvbuff_t *tvb, int offset) +static guint get_cmp_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint32 plen; diff --git a/epan/dissectors/packet-cmp.h b/epan/dissectors/packet-cmp.h index 299f9bccb2..207e2e976a 100644 --- a/epan/dissectors/packet-cmp.h +++ b/epan/dissectors/packet-cmp.h @@ -1,6 +1,6 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* .\packet-cmp.h */ +/* ./packet-cmp.h */ /* ../../tools/asn2wrs.py -b -e -p cmp -c cmp.cnf -s packet-cmp-template CMP.asn */ /* Input file: packet-cmp-template.h */ diff --git a/epan/dissectors/packet-cops.c b/epan/dissectors/packet-cops.c index 21b3e0bdaf..b22984163f 100644 --- a/epan/dissectors/packet-cops.c +++ b/epan/dissectors/packet-cops.c @@ -844,7 +844,7 @@ static gint ett_docsis_request_transmission_policy = -1; void proto_reg_handoff_cops(void); -static guint get_cops_pdu_len(tvbuff_t *tvb, int offset); +static guint get_cops_pdu_len(packet_info *pinfo, tvbuff_t *tvb, int offset); static void dissect_cops_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); static int dissect_cops_object(tvbuff_t *tvb, packet_info *pinfo, guint8 op_code, guint32 offset, proto_tree *tree, guint16 client_type); @@ -892,7 +892,7 @@ dissect_cops(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } static guint -get_cops_pdu_len(tvbuff_t *tvb, int offset) +get_cops_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { /* * Get the length of the COPS message. diff --git a/epan/dissectors/packet-dcm.c b/epan/dissectors/packet-dcm.c index cb40af24e5..7a291953dd 100644 --- a/epan/dissectors/packet-dcm.c +++ b/epan/dissectors/packet-dcm.c @@ -595,7 +595,7 @@ dcm_tag2str(guint16 grp, guint16 elm, guint8 syntax, tvbuff_t *tvb, int offset, } static guint -dcm_get_pdu_len(tvbuff_t *tvb, int offset) +dcm_get_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint32 len; diff --git a/epan/dissectors/packet-dhcp-failover.c b/epan/dissectors/packet-dhcp-failover.c index 812617a70c..c271af9b75 100644 --- a/epan/dissectors/packet-dhcp-failover.c +++ b/epan/dissectors/packet-dhcp-failover.c @@ -338,7 +338,7 @@ static const value_string tls_request_vals[] = /* Code to actually dissect the packets */ static guint -get_dhcpfo_pdu_len(tvbuff_t *tvb, int offset) +get_dhcpfo_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { /* * Return the length of the DHCP failover packet. diff --git a/epan/dissectors/packet-diameter.c b/epan/dissectors/packet-diameter.c index dfed3cc7f9..b43f781450 100644 --- a/epan/dissectors/packet-diameter.c +++ b/epan/dissectors/packet-diameter.c @@ -1543,7 +1543,7 @@ dissect_diameter_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) static guint -get_diameter_pdu_len(tvbuff_t *tvb, int offset) +get_diameter_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { /* Get the length of the Diameter packet. */ return tvb_get_ntoh24(tvb, offset + 1); diff --git a/epan/dissectors/packet-dlsw.c b/epan/dissectors/packet-dlsw.c index 9e25e4cbae..e67d760419 100644 --- a/epan/dissectors/packet-dlsw.c +++ b/epan/dissectors/packet-dlsw.c @@ -494,7 +494,7 @@ dissect_dlsw_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } static guint -get_dlsw_pdu_len(tvbuff_t *tvb, int offset) +get_dlsw_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint hlen, mlen; diff --git a/epan/dissectors/packet-dns.c b/epan/dissectors/packet-dns.c index 5cec907299..1879430ad4 100644 --- a/epan/dissectors/packet-dns.c +++ b/epan/dissectors/packet-dns.c @@ -2612,7 +2612,7 @@ dissect_mdns_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) static guint -get_dns_pdu_len(tvbuff_t *tvb, int offset) +get_dns_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint16 plen; diff --git a/epan/dissectors/packet-dsi.c b/epan/dissectors/packet-dsi.c index 4eba39d440..d95753b532 100644 --- a/epan/dissectors/packet-dsi.c +++ b/epan/dissectors/packet-dsi.c @@ -591,7 +591,7 @@ dissect_dsi_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } static guint -get_dsi_pdu_len(tvbuff_t *tvb, int offset) +get_dsi_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint32 plen; guint8 dsi_flags,dsi_command; diff --git a/epan/dissectors/packet-edonkey.c b/epan/dissectors/packet-edonkey.c index 1a97942444..ce171bcc34 100644 --- a/epan/dissectors/packet-edonkey.c +++ b/epan/dissectors/packet-edonkey.c @@ -1617,7 +1617,7 @@ static void dissect_emule_udp_message(guint8 msg_type, } -static guint get_edonkey_tcp_pdu_len(tvbuff_t *tvb, int offset) +static guint get_edonkey_tcp_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint32 msg_len; diff --git a/epan/dissectors/packet-enip.c b/epan/dissectors/packet-enip.c index 072f23ed21..d7112f3312 100644 --- a/epan/dissectors/packet-enip.c +++ b/epan/dissectors/packet-enip.c @@ -527,7 +527,7 @@ classify_packet(packet_info *pinfo) } static guint -get_enip_pdu_len(tvbuff_t *tvb, int offset) +get_enip_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint16 plen; diff --git a/epan/dissectors/packet-giop.c b/epan/dissectors/packet-giop.c index 6dbf0fe0b5..597fc3ff2f 100644 --- a/epan/dissectors/packet-giop.c +++ b/epan/dissectors/packet-giop.c @@ -4008,7 +4008,7 @@ static void dissect_giop_common (tvbuff_t * tvb, packet_info * pinfo, proto_tree } static guint -get_giop_pdu_len(tvbuff_t *tvb, int offset) +get_giop_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { MessageHeader header; diff --git a/epan/dissectors/packet-gnutella.c b/epan/dissectors/packet-gnutella.c index 1aa7eefa91..5dcd1c9127 100644 --- a/epan/dissectors/packet-gnutella.c +++ b/epan/dissectors/packet-gnutella.c @@ -325,7 +325,7 @@ static void dissect_gnutella_push(tvbuff_t *tvb, guint offset, proto_tree *tree) } static guint -get_gnutella_pdu_len(tvbuff_t *tvb, int offset) { +get_gnutella_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint32 size; size = tvb_get_letohl( diff --git a/epan/dissectors/packet-icep.c b/epan/dissectors/packet-icep.c index ffc567afa2..4ff5f58e33 100644 --- a/epan/dissectors/packet-icep.c +++ b/epan/dissectors/packet-icep.c @@ -1094,7 +1094,7 @@ static void dissect_icep_reply(tvbuff_t *tvb, guint32 offset, proto_tree *icep_t DBG1("consumed --> %d\n", reported_reply_data); } -static guint get_icep_pdu_len(tvbuff_t *tvb, int offset) +static guint get_icep_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { return tvb_get_letohl(tvb, offset + 10); } diff --git a/epan/dissectors/packet-ifcp.c b/epan/dissectors/packet-ifcp.c index 432a327a5b..ff189eebb7 100644 --- a/epan/dissectors/packet-ifcp.c +++ b/epan/dissectors/packet-ifcp.c @@ -504,7 +504,7 @@ dissect_ifcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) } static guint -get_ifcp_pdu_len(tvbuff_t *tvb, int offset) +get_ifcp_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint pdu_len; diff --git a/epan/dissectors/packet-ipdc.c b/epan/dissectors/packet-ipdc.c index eabdd72e66..442adf6412 100644 --- a/epan/dissectors/packet-ipdc.c +++ b/epan/dissectors/packet-ipdc.c @@ -67,7 +67,7 @@ void proto_reg_handoff_ipdc(void); static guint -get_ipdc_pdu_len(tvbuff_t *tvb, int offset) +get_ipdc_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { /* lower 10 bits only */ guint raw_len = (tvb_get_ntohs(tvb,offset+2) & 0x03FF); @@ -97,7 +97,7 @@ dissect_ipdc_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) gshort nr = tvb_get_guint8(tvb,0); gshort ns = tvb_get_guint8(tvb,1); - guint payload_len = get_ipdc_pdu_len(tvb,0); + guint payload_len = get_ipdc_pdu_len(pinfo,tvb,0); gshort protocol_id; gshort trans_id_size; diff --git a/epan/dissectors/packet-isns.c b/epan/dissectors/packet-isns.c index 0bee9271e2..632979a5d0 100644 --- a/epan/dissectors/packet-isns.c +++ b/epan/dissectors/packet-isns.c @@ -773,7 +773,7 @@ dissect_isns_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } static guint -get_isns_pdu_len(tvbuff_t *tvb, int offset) +get_isns_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint16 isns_len; diff --git a/epan/dissectors/packet-kerberos.c b/epan/dissectors/packet-kerberos.c index 83d70fb7e7..76107dbd49 100644 --- a/epan/dissectors/packet-kerberos.c +++ b/epan/dissectors/packet-kerberos.c @@ -4235,7 +4235,7 @@ kerberos_rm_to_reclen(guint krb_rm) } guint -get_krb_pdu_len(tvbuff_t *tvb, int offset) +get_krb_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint krb_rm; gint pdulen; diff --git a/epan/dissectors/packet-kerberos.h b/epan/dissectors/packet-kerberos.h index 0b52d71e31..8cc66a1553 100644 --- a/epan/dissectors/packet-kerberos.h +++ b/epan/dissectors/packet-kerberos.h @@ -54,7 +54,7 @@ int dissect_krb5_cname(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int int dissect_krb5_realm(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset); guint32 kerberos_output_keytype(void); -guint get_krb_pdu_len(tvbuff_t *tvb, int offset); +guint get_krb_pdu_len(packet_info *, tvbuff_t *tvb, int offset); gint kerberos_rm_to_reclen(guint krb_rm); diff --git a/epan/dissectors/packet-laplink.c b/epan/dissectors/packet-laplink.c index 1f809c64f1..0612991324 100644 --- a/epan/dissectors/packet-laplink.c +++ b/epan/dissectors/packet-laplink.c @@ -160,7 +160,7 @@ dissect_laplink_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } static guint -get_laplink_pdu_len(tvbuff_t *tvb, int offset) +get_laplink_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint plen; /* diff --git a/epan/dissectors/packet-ldap.c b/epan/dissectors/packet-ldap.c index 9489507ee6..2cacb83a5e 100644 --- a/epan/dissectors/packet-ldap.c +++ b/epan/dissectors/packet-ldap.c @@ -3431,7 +3431,7 @@ static void dissect_NetLogon_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree * static guint -get_sasl_ldap_pdu_len(tvbuff_t *tvb, int offset) +get_sasl_ldap_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { /* sasl encapsulated ldap is 4 bytes plus the length in size */ return tvb_get_ntohl(tvb, offset)+4; @@ -3445,7 +3445,7 @@ dissect_sasl_ldap_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } static guint -get_normal_ldap_pdu_len(tvbuff_t *tvb, int offset) +get_normal_ldap_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint32 len; gboolean ind; diff --git a/epan/dissectors/packet-lsc.c b/epan/dissectors/packet-lsc.c index dd2c4b963a..e294e91eb3 100644 --- a/epan/dissectors/packet-lsc.c +++ b/epan/dissectors/packet-lsc.c @@ -297,7 +297,7 @@ dissect_lsc_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Determine length of LSC message */ static guint -get_lsc_pdu_len(tvbuff_t *tvb, int offset) +get_lsc_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint8 op_code; guint pdu_len; diff --git a/epan/dissectors/packet-mq.c b/epan/dissectors/packet-mq.c index d891207dc1..8718572ec9 100644 --- a/epan/dissectors/packet-mq.c +++ b/epan/dissectors/packet-mq.c @@ -2389,7 +2389,7 @@ reassemble_mq(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } static guint -get_mq_pdu_len(tvbuff_t *tvb, int offset) +get_mq_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { if (tvb_length_remaining(tvb, offset) >= 8) { diff --git a/epan/dissectors/packet-mysql.c b/epan/dissectors/packet-mysql.c index 29b1e85946..6ebc8e6ce0 100644 --- a/epan/dissectors/packet-mysql.c +++ b/epan/dissectors/packet-mysql.c @@ -467,7 +467,7 @@ typedef struct my_stmt_data void proto_reg_handoff_mysql(void); void proto_register_mysql(void); static void dissect_mysql(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -static guint get_mysql_pdu_len(tvbuff_t *tvb, int offset); +static guint get_mysql_pdu_len(packet_info *pinfo, tvbuff_t *tvb, int offset); static void dissect_mysql_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); static int mysql_dissect_login(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree, my_conn_data_t *conn_data); static int mysql_dissect_greeting(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree, my_conn_data_t *conn_data); @@ -913,7 +913,7 @@ static void dissect_mysql(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* dissector helper: length of PDU */ -static guint get_mysql_pdu_len(tvbuff_t *tvb, int offset) +static guint get_mysql_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint plen= tvb_get_letoh24(tvb, offset); return plen + 4; /* add length field + packet number */ diff --git a/epan/dissectors/packet-ncp.c b/epan/dissectors/packet-ncp.c index 963dc40042..2c860dbb39 100644 --- a/epan/dissectors/packet-ncp.c +++ b/epan/dissectors/packet-ncp.c @@ -846,7 +846,7 @@ dissect_ncp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } static guint -get_ncp_pdu_len(tvbuff_t *tvb, int offset) +get_ncp_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint32 signature; diff --git a/epan/dissectors/packet-ndmp.c b/epan/dissectors/packet-ndmp.c index 550f3c4138..eec2c5427e 100644 --- a/epan/dissectors/packet-ndmp.c +++ b/epan/dissectors/packet-ndmp.c @@ -3015,7 +3015,7 @@ dissect_ndmp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } static guint -get_ndmp_pdu_len(tvbuff_t *tvb, int offset) +get_ndmp_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint len; diff --git a/epan/dissectors/packet-ndps.c b/epan/dissectors/packet-ndps.c index e6c76cd077..3cdcab7555 100644 --- a/epan/dissectors/packet-ndps.c +++ b/epan/dissectors/packet-ndps.c @@ -4285,7 +4285,7 @@ dissect_ndps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree) } static guint -get_ndps_pdu_len(tvbuff_t *tvb, int offset) +get_ndps_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { return tvb_get_ntohs(tvb, offset +2) + 4; } diff --git a/epan/dissectors/packet-netsync.c b/epan/dissectors/packet-netsync.c index 06c6e29afd..1c386cab82 100644 --- a/epan/dissectors/packet-netsync.c +++ b/epan/dissectors/packet-netsync.c @@ -443,7 +443,7 @@ static gint dissect_netsync_cmd_nonexistant(tvbuff_t *tvb, gint offset, proto_t } static guint -get_netsync_pdu_len(tvbuff_t *tvb, int offset) +get_netsync_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint size = 0, size_bytes; diff --git a/epan/dissectors/packet-pgsql.c b/epan/dissectors/packet-pgsql.c index 915035a148..477e369672 100644 --- a/epan/dissectors/packet-pgsql.c +++ b/epan/dissectors/packet-pgsql.c @@ -89,7 +89,7 @@ static void dissect_pgsql_fe_msg(guchar, guint, tvbuff_t *, gint, proto_tree *); static void dissect_pgsql_be_msg(guchar, guint, tvbuff_t *, gint, proto_tree *); static void dissect_pgsql_msg(tvbuff_t *, packet_info *, proto_tree *); static void dissect_pgsql(tvbuff_t *, packet_info *, proto_tree *); -static guint pgsql_length(tvbuff_t *, int); +static guint pgsql_length(packet_info *, tvbuff_t *, int); static const value_string fe_messages[] = { { 'p', "Password message" }, @@ -389,7 +389,7 @@ dissect_pgsql(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) message starting at tvb[offset]. */ static guint -pgsql_length(tvbuff_t *tvb, int offset) +pgsql_length(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { gint n = 0; guchar type; diff --git a/epan/dissectors/packet-pvfs2.c b/epan/dissectors/packet-pvfs2.c index 6d21fb1642..2d8ddf6589 100644 --- a/epan/dissectors/packet-pvfs2.c +++ b/epan/dissectors/packet-pvfs2.c @@ -249,7 +249,7 @@ static void dissect_pvfs_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree } -static guint get_pvfs_pdu_len(tvbuff_t *tvb, int offset) +static guint get_pvfs_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint32 plen; diff --git a/epan/dissectors/packet-s5066.c b/epan/dissectors/packet-s5066.c index 9d7bff05d4..ccbccac4aa 100644 --- a/epan/dissectors/packet-s5066.c +++ b/epan/dissectors/packet-s5066.c @@ -40,7 +40,7 @@ void proto_register_s5066(void); void proto_reg_handoff_s5066(void); /* Main dissectors */ static void dissect_s5066_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -static guint get_s5066_pdu_len(tvbuff_t *tvb, int offset); +static guint get_s5066_pdu_len(packet_info *pinfo, tvbuff_t *tvb, int offset); static void dissect_s5066_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); /* Service type and address dissectors */ static guint dissect_s5066_servicetype(tvbuff_t *tvb, guint offset, proto_tree *tree); @@ -1256,7 +1256,7 @@ dissect_s5066_27(tvbuff_t *tvb, guint offset, proto_tree *tree) } static guint -get_s5066_pdu_len(tvbuff_t *tvb, int offset) +get_s5066_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint16 plen; diff --git a/epan/dissectors/packet-skinny.c b/epan/dissectors/packet-skinny.c index 37c560753b..21a9b3ec52 100644 --- a/epan/dissectors/packet-skinny.c +++ b/epan/dissectors/packet-skinny.c @@ -1170,7 +1170,7 @@ static dissector_handle_t data_handle; static dissector_handle_t rtp_handle=NULL; /* Get the length of a single SCCP PDU */ -static guint get_skinny_pdu_len(tvbuff_t *tvb, int offset) +static guint get_skinny_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint32 hdr_data_length; diff --git a/epan/dissectors/packet-slsk.c b/epan/dissectors/packet-slsk.c index d3073de549..67c7063865 100644 --- a/epan/dissectors/packet-slsk.c +++ b/epan/dissectors/packet-slsk.c @@ -294,7 +294,7 @@ static const char* get_message_type(tvbuff_t *tvb) { return message_type; } -static guint get_slsk_pdu_len(tvbuff_t *tvb, int offset) +static guint get_slsk_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint32 msg_len; msg_len = tvb_get_letohl(tvb, offset); diff --git a/epan/dissectors/packet-smpp.c b/epan/dissectors/packet-smpp.c index 171588479a..06acd04e58 100644 --- a/epan/dissectors/packet-smpp.c +++ b/epan/dissectors/packet-smpp.c @@ -70,7 +70,7 @@ /* Forward declarations */ static void dissect_smpp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); -static guint get_smpp_pdu_len(tvbuff_t *tvb, int offset); +static guint get_smpp_pdu_len(packet_info *pinfo, tvbuff_t *tvb, int offset); static void dissect_smpp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); /* @@ -1658,7 +1658,7 @@ dissect_smpp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } static guint -get_smpp_pdu_len(tvbuff_t *tvb, int offset) +get_smpp_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { return tvb_get_ntohl(tvb, offset); } diff --git a/epan/dissectors/packet-srvloc.c b/epan/dissectors/packet-srvloc.c index e1021b4f61..c400458a03 100644 --- a/epan/dissectors/packet-srvloc.c +++ b/epan/dissectors/packet-srvloc.c @@ -1302,7 +1302,7 @@ dissect_srvloc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } static guint -get_srvloc_pdu_len(tvbuff_t *tvb, int offset) +get_srvloc_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { /* * Get the length of the SRVLOC packet. diff --git a/epan/dissectors/packet-tali.c b/epan/dissectors/packet-tali.c index f183d23b30..2ec10bf156 100644 --- a/epan/dissectors/packet-tali.c +++ b/epan/dissectors/packet-tali.c @@ -82,7 +82,7 @@ static gboolean tali_desegment = TRUE; /* Code to actually dissect the packets */ static guint -get_tali_pdu_len(tvbuff_t *tvb, int offset) +get_tali_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint16 length; diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c index acc926f136..ce1b3b75f6 100644 --- a/epan/dissectors/packet-tcp.c +++ b/epan/dissectors/packet-tcp.c @@ -1424,7 +1424,7 @@ again: void tcp_dissect_pdus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean proto_desegment, guint fixed_len, - guint (*get_pdu_len)(tvbuff_t *, int), + guint (*get_pdu_len)(packet_info *, tvbuff_t *, int), dissector_t dissect_pdu) { volatile int offset = 0; @@ -1471,7 +1471,7 @@ tcp_dissect_pdus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* * Get the length of the PDU. */ - plen = (*get_pdu_len)(tvb, offset); + plen = (*get_pdu_len)(pinfo, tvb, offset); if (plen < fixed_len) { /* * The PDU length from the fixed-length portion probably didn't diff --git a/epan/dissectors/packet-tcp.h b/epan/dissectors/packet-tcp.h index bc9f87b136..1ab5ee36ae 100644 --- a/epan/dissectors/packet-tcp.h +++ b/epan/dissectors/packet-tcp.h @@ -83,7 +83,7 @@ struct tcpinfo { extern void tcp_dissect_pdus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean proto_desegment, guint fixed_len, - guint (*get_pdu_len)(tvbuff_t *, int), + guint (*get_pdu_len)(packet_info *, tvbuff_t *, int), dissector_t dissect_pdu); diff --git a/epan/dissectors/packet-tns.c b/epan/dissectors/packet-tns.c index 5fd3e23f15..538355de5b 100644 --- a/epan/dissectors/packet-tns.c +++ b/epan/dissectors/packet-tns.c @@ -197,7 +197,7 @@ static const value_string tns_control_cmds[] = { }; void proto_reg_handoff_tns(void); -static guint get_tns_pdu_len(tvbuff_t *tvb, int offset); +static guint get_tns_pdu_len(packet_info *pinfo, tvbuff_t *tvb, int offset); static void dissect_tns_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); static void dissect_tns_service_options(tvbuff_t *tvb, int offset, @@ -849,7 +849,7 @@ static void dissect_tns_control(tvbuff_t *tvb, int offset, packet_info *pinfo, } static guint -get_tns_pdu_len(tvbuff_t *tvb, int offset) +get_tns_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { /* * Get the length of the TNS message, including header diff --git a/epan/dissectors/packet-ucp.c b/epan/dissectors/packet-ucp.c index d9c567545f..f1bd032ad5 100644 --- a/epan/dissectors/packet-ucp.c +++ b/epan/dissectors/packet-ucp.c @@ -1641,7 +1641,7 @@ dissect_ucp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } static guint -get_ucp_pdu_len(tvbuff_t *tvb, int offset) +get_ucp_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint intval=0; int i; diff --git a/epan/dissectors/packet-ulp.c b/epan/dissectors/packet-ulp.c index 767b0acf69..f0c05f4a76 100644 --- a/epan/dissectors/packet-ulp.c +++ b/epan/dissectors/packet-ulp.c @@ -1,7 +1,7 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* .\packet-ulp.c */ -/* ../../tools/asn2wrs.py -u -e -p ulp -c ulp.cnf -s packet-ulp-template ULP.asn */ +/* ./packet-ulp.c */ +/* ../../tools/asn2wrs.py -e -p ulp -c ulp.cnf -s packet-ulp-template ULP.asn */ /* Input file: packet-ulp-template.c */ @@ -2145,7 +2145,7 @@ dissect_ulp_ULP_PDU(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree static void dissect_ULP_PDU_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, FALSE, pinfo); + asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); dissect_ulp_ULP_PDU(tvb, 0, &asn1_ctx, tree, hf_ulp_ULP_PDU_PDU); } @@ -2155,7 +2155,7 @@ static void dissect_ULP_PDU_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t static guint -get_ulp_pdu_len(tvbuff_t *tvb, int offset) +get_ulp_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { /* PDU length = Message length */ return tvb_get_ntohs(tvb,offset); diff --git a/epan/dissectors/packet-ulp.h b/epan/dissectors/packet-ulp.h index 86f0f2aa10..e170c4ae4b 100644 --- a/epan/dissectors/packet-ulp.h +++ b/epan/dissectors/packet-ulp.h @@ -1,7 +1,7 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* .\packet-ulp.h */ -/* ../../tools/asn2wrs.py -u -e -p ulp -c ulp.cnf -s packet-ulp-template ULP.asn */ +/* ./packet-ulp.h */ +/* ../../tools/asn2wrs.py -e -p ulp -c ulp.cnf -s packet-ulp-template ULP.asn */ /* Input file: packet-ulp-template.h */ diff --git a/epan/dissectors/packet-uma.c b/epan/dissectors/packet-uma.c index f6b5496710..68d3453311 100644 --- a/epan/dissectors/packet-uma.c +++ b/epan/dissectors/packet-uma.c @@ -1518,7 +1518,7 @@ dissect_uma(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } static guint -get_uma_pdu_len(tvbuff_t *tvb, int offset) +get_uma_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { /* PDU length = Message length + length of length indicator */ return tvb_get_ntohs(tvb,offset)+2; diff --git a/epan/dissectors/packet-winsrepl.c b/epan/dissectors/packet-winsrepl.c index 99f6663eec..2cac0b1379 100644 --- a/epan/dissectors/packet-winsrepl.c +++ b/epan/dissectors/packet-winsrepl.c @@ -726,7 +726,7 @@ dissect_winsrepl_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) } static guint -get_winsrepl_pdu_len(tvbuff_t *tvb, int offset) +get_winsrepl_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint pdu_len; diff --git a/epan/dissectors/packet-xot.c b/epan/dissectors/packet-xot.c index 4123a5ef12..7c9dd13997 100644 --- a/epan/dissectors/packet-xot.c +++ b/epan/dissectors/packet-xot.c @@ -52,7 +52,7 @@ static gboolean xot_desegment = TRUE; static dissector_handle_t x25_handle; -static guint get_xot_pdu_len(tvbuff_t *tvb, int offset) +static guint get_xot_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint16 plen; diff --git a/epan/dissectors/packet-ymsg.c b/epan/dissectors/packet-ymsg.c index c1398b9446..1c2420b926 100644 --- a/epan/dissectors/packet-ymsg.c +++ b/epan/dissectors/packet-ymsg.c @@ -314,7 +314,7 @@ static const value_string ymsg_status_vals[] = { {0, NULL} }; -static guint get_ymsg_pdu_len(tvbuff_t *tvb, int offset); +static guint get_ymsg_pdu_len(packet_info *pinfo, tvbuff_t *tvb, int offset); static void dissect_ymsg_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); /* Find the end of the current content line and return its length */ @@ -348,7 +348,7 @@ dissect_ymsg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } static guint -get_ymsg_pdu_len(tvbuff_t *tvb, int offset) +get_ymsg_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint16 plen; diff --git a/plugins/agentx/packet-agentx.c b/plugins/agentx/packet-agentx.c index 0149d89a07..f7b6b2c49c 100644 --- a/plugins/agentx/packet-agentx.c +++ b/plugins/agentx/packet-agentx.c @@ -758,7 +758,7 @@ static void dissect_rem_caps_pdu(tvbuff_t *tvb, proto_tree *tree,int offset,int } -static guint get_agentx_pdu_len(tvbuff_t *tvb, int offset) +static guint get_agentx_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint8 flags; guint32 plen; diff --git a/plugins/gryphon/packet-gryphon.c b/plugins/gryphon/packet-gryphon.c index 753a271cb4..75aad52ac3 100644 --- a/plugins/gryphon/packet-gryphon.c +++ b/plugins/gryphon/packet-gryphon.c @@ -148,7 +148,7 @@ static const char *frame_type[] = { #define FRAME_HEADER_LEN 8 static guint -get_gryphon_pdu_len(tvbuff_t *tvb, int offset) +get_gryphon_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint16 plen; int padded_len; diff --git a/plugins/opsi/packet-opsi.c b/plugins/opsi/packet-opsi.c index 6be06c57a4..e5cb0fdb8f 100644 --- a/plugins/opsi/packet-opsi.c +++ b/plugins/opsi/packet-opsi.c @@ -391,7 +391,7 @@ void decode_time_attribute(tvbuff_t *tvb, proto_tree *tree, int* hfValue, int of /****************************************************************************/ /* To find the correct size of the PDU. Needed by the desegmentation feature*/ -static guint get_opsi_pdu_len(tvbuff_t *tvb, int offset) +static guint get_opsi_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { /* * Get the length of the OPSI packet. |