change the signature for the get_pdu_len() function pointer passed to tcp_dissect_pdu...
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 31 Oct 2006 09:29:07 +0000 (09:29 +0000)
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 31 Oct 2006 09:29:07 +0000 (09:29 +0000)
there are many reasons why some protocols actually need to be able to access the pinfo structure while determining the pdu size

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19751 f5534014-38df-0310-8fa8-9805f1628bb7

58 files changed:
asn1/ldap/packet-ldap-template.c
asn1/pkixcmp/cmp-exp.cnf
asn1/pkixcmp/packet-cmp-template.c
asn1/ulp/packet-ulp-template.c
asn1/ulp/ulp-exp.cnf
epan/dissectors/packet-aim.c
epan/dissectors/packet-ajp13.c
epan/dissectors/packet-bittorrent.c
epan/dissectors/packet-cast.c
epan/dissectors/packet-cmp.c
epan/dissectors/packet-cmp.h
epan/dissectors/packet-cops.c
epan/dissectors/packet-dcm.c
epan/dissectors/packet-dhcp-failover.c
epan/dissectors/packet-diameter.c
epan/dissectors/packet-dlsw.c
epan/dissectors/packet-dns.c
epan/dissectors/packet-dsi.c
epan/dissectors/packet-edonkey.c
epan/dissectors/packet-enip.c
epan/dissectors/packet-giop.c
epan/dissectors/packet-gnutella.c
epan/dissectors/packet-icep.c
epan/dissectors/packet-ifcp.c
epan/dissectors/packet-ipdc.c
epan/dissectors/packet-isns.c
epan/dissectors/packet-kerberos.c
epan/dissectors/packet-kerberos.h
epan/dissectors/packet-laplink.c
epan/dissectors/packet-ldap.c
epan/dissectors/packet-lsc.c
epan/dissectors/packet-mq.c
epan/dissectors/packet-mysql.c
epan/dissectors/packet-ncp.c
epan/dissectors/packet-ndmp.c
epan/dissectors/packet-ndps.c
epan/dissectors/packet-netsync.c
epan/dissectors/packet-pgsql.c
epan/dissectors/packet-pvfs2.c
epan/dissectors/packet-s5066.c
epan/dissectors/packet-skinny.c
epan/dissectors/packet-slsk.c
epan/dissectors/packet-smpp.c
epan/dissectors/packet-srvloc.c
epan/dissectors/packet-tali.c
epan/dissectors/packet-tcp.c
epan/dissectors/packet-tcp.h
epan/dissectors/packet-tns.c
epan/dissectors/packet-ucp.c
epan/dissectors/packet-ulp.c
epan/dissectors/packet-ulp.h
epan/dissectors/packet-uma.c
epan/dissectors/packet-winsrepl.c
epan/dissectors/packet-xot.c
epan/dissectors/packet-ymsg.c
plugins/agentx/packet-agentx.c
plugins/gryphon/packet-gryphon.c
plugins/opsi/packet-opsi.c

index aff390fb301495efb3d1b10a89605b43e1a9d5ae..808977493777356e330a68a573f8dc25f26ebb50 100644 (file)
@@ -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;
index 7b448b761c6a4abd0bb0fb10e335415a184b9561..d09232df9e6b75917488438dd57909f0462eb209 100644 (file)
@@ -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
index 0c3712e8c7a6b57068fcf3b9d23d58b80c41f20c..81d4495f7d6b946b8e5db2aacbb196bbeb1b92d7 100644 (file)
@@ -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;
 
index 5c6157ddb751632d96a62feeefd304a8ede69565..a8c478506e0b0e5bb5cbdb5f22f53be5475aea78 100644 (file)
@@ -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);
index e22e8936dbd7bed32b2c5fa5adad7f0397e500b7..3d50fdbdce650dd0dd60ab2afe5aaffc88944694 100644 (file)
@@ -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
index 7740f778e4dd2e35d73f5276406cbd82409d507e..69bed55566f8782adaf5a140002516c8cf169e60 100644 (file)
@@ -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;
 
index 806692bf6c23362a3a328330b1d0be75088f6ed7..edc20a446c013f3f451aa000cae93b2b50de7534 100644 (file)
@@ -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;
index 48316c6232332f869b5341642b8b50d929580209..b49a5cea41919ccfa46b59a9218c975803f9c7ee 100644 (file)
@@ -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;
index 8af644186f24d7de97af9957864f5f58595a615f..9f71d35f5edf70d21382f19d3adf71da6c72ec33 100644 (file)
@@ -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;
 
index 2a31b39393ebbbf7f8ebd93d14baaa3d0ddbb7f7..60bae901d50f2ba172cfc07caea16b68b8d9a2f5 100644 (file)
@@ -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;
 
index 299f9bccb2d521121d72e7853d8cf1e2ac49c7f6..207e2e976a087bd88e6671c3328d8b7c86d007b9 100644 (file)
@@ -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 */
index 21b3e0bdaf9296f46fa015fa05b1699af069377e..b22984163f1c3a956856028c3ad3df8a79e8e5be 100644 (file)
@@ -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.
index cb40af24e515ba6c52a14273b80fbad3e50ff500..7a291953dd833b830f912fbb2bcc200c936ae3d1 100644 (file)
@@ -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;
 
index 812617a70c83e61bf8117a8d62b367f4b3da99dc..c271af9b75dcb68b3878477d15ff00cfc1bcc9d4 100644 (file)
@@ -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.
index dfed3cc7f9f977b4327d8d6ee5f768535f61a0b6..b43f781450a829f778af5232454b04ee3b253262 100644 (file)
@@ -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);
index 9e25e4cbae9eb12a129713f0b118bc9ed63dc799..e67d7604193a5c0a63fbd2c47f9716a8d7fa0ab1 100644 (file)
@@ -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;
 
index 5cec907299a310d93055b8feac289efbfc4a8a45..1879430ad4eca200bec05535b5ab2ca40e0f4803 100644 (file)
@@ -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;
 
index 4eba39d4401943b21834fdc56662f888995cb8f7..d95753b532932c698485d8d8370121701856069b 100644 (file)
@@ -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;
index 1a979424446b6e7606d82688b30f3d87a5966e1e..ce171bcc34fc933ca2441f5e0640f4c4af83029b 100644 (file)
@@ -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;
 
index 072f23ed21ff762f35fd4a68d1e9de690f184d01..d7112f3312a163d484ba880d5f57a2091071ebb3 100644 (file)
@@ -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;
 
index 6dbf0fe0b5ec12793585da964636bd2580888754..597fc3ff2f4a3c1dd4b591697d0822e1303fa796 100644 (file)
@@ -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;
index 1aa7eefa910f545ffac6848a96022577602db881..5dcd1c912797851894e84fa0cf1c9500d7cb2a26 100644 (file)
@@ -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(
index ffc567afa2b352016b97a2d7d121cd065213babd..4ff5f58e33abb4d30d6f8b1fa68267a261b27b23 100644 (file)
@@ -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);
 }
index 432a327a5bdc6ed39633c3a857755faef974c808..ff189eebb7bc844e5f1aeb0633adedaa881edb63 100644 (file)
@@ -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;
  
index eabdd72e660e282ad34d883247013a34e86e910e..442adf641235ce19b00d501aa43a49a593101676 100644 (file)
@@ -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;
index 0bee9271e28ae1134de2bc18d1c6b38a870595b4..632979a5d0f43d39992060ff8c083655c31c3274 100644 (file)
@@ -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;
 
index 83d70fb7e71ac976467444b535d3eaca6cf6611d..76107dbd497fea329bfe6779ffc9cd25bc823976 100644 (file)
@@ -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;
index 0b52d71e31fa74f9950575f3db8e24ee71253db5..8cc66a1553fb776e4dfcea25208221b1412ec84e 100644 (file)
@@ -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);
 
index 1f809c64f155ba8ad706bbbb8b7468b1b491af16..0612991324623082e5b533c2bd72fc4609663ce5 100644 (file)
@@ -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;
        /*
index 9489507ee6fea4cdbbb7a856443e6eeba16c0a98..2cacb83a5e59fa22296eb4c4db0ce2e8b9b19f36 100644 (file)
@@ -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;
index dd2c4b963ad7b7b403bfce419f424df2513b9efd..e294e91eb3b722fc221735681fe425dfed1e6b95 100644 (file)
@@ -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;
index d891207dc18c4c406ff0fc25ed496df24a9af374..8718572ec9bf45b117c9a23fd0bb0692bcad64ab 100644 (file)
@@ -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)
        {
index 29b1e85946960d6bbf8c105a23ac7754a0b11596..6ebc8e6ce0517e74a23633ad1ce8658ecd0f8cd7 100644 (file)
@@ -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 */
index 963dc40042177a0a0cd4603862dd37765c7651e8..2c860dbb3956ef54ef105d93f975b760799d4283 100644 (file)
@@ -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;
 
index 550f3c4138681541482531d5d4b9a892c1043929..eec2c5427eb21f36f714280f82ecdf20e6eac30d 100644 (file)
@@ -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;
 
index e6c76cd07731f9e90998b9f69af6d6e899e99fb5..3cdcab7555ae297195aaef634ea02116342dd432 100644 (file)
@@ -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;
 }
index 06c6e29afd372e336b06849dd09e99c2df7c9942..1c386cab8256ff4c3370e2965bdaadedc829ffca 100644 (file)
@@ -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;
 
index 915035a148f48d093c0af46ae8f8ced6fe642691..477e369672637dcefc3a792e8be10d4c093c667d 100644 (file)
@@ -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;
index 6d21fb1642c7c3a278dfd3b0c44a2e4581196685..2d8ddf6589fcf7cdc34ab5bde83ef6f5d47bf120 100644 (file)
@@ -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;
 
index 9d7bff05d4c97a28336cb5d6e67340094221a143..ccbccac4aaab0fa357b839cfc41bd634a5073ed1 100644 (file)
@@ -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;
 
index 37c560753b24966196a1fd8e63abe12cf9df2d7e..21a9b3ec5210e2e8795012145f590bdd65d86344 100644 (file)
@@ -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;
 
index d3073de549c96933b32ab0c4e206dac34d79df1e..67c7063865fd8aa421d747e9b32b0d30b1824512 100644 (file)
@@ -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);
index 171588479a0cfd35f5eb784761ce5975e515c89a..06acd04e58e5b9e8ff70028e939e450b5fbe6620 100644 (file)
@@ -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);
 }
index e1021b4f614e43d11630ba7028a96a556f726135..c400458a03dc69bf0de6380f9bb077755e100e6d 100644 (file)
@@ -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.
index f183d23b30a32b7512495d5f0c2442421627f521..2ec10bf156223dfb2106e327a1510610d5cd196c 100644 (file)
@@ -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;
 
index acc926f1364363badf22d02920cd10a855bb57fb..ce1b3b75f6b26a9127d5a638e801b63fbbae020b 100644 (file)
@@ -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
index bc9f87b136c174f10488fc0c6e3ec0d5cf2d7057..1ab5ee36aeb5a2e2ce904cfce3f501f530c16c37 100644 (file)
@@ -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);
 
 
index 5fd3e23f150e1581e9bbbb1afbd3c10112dae383..538355de5bb0d1fa1b0d2e9f9d2d782f31d4c433 100644 (file)
@@ -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
index d9c567545f35b34923b932829f38df7885cce597..f1bd032ad5aedd435c3d5fa52fdd6c89cecd0966 100644 (file)
@@ -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;
index 767b0acf6953597a3f7ef9d1ca96c716b95da7e6..f0c05f4a76b43170d703141c23abbfc8cd0ad733 100644 (file)
@@ -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);
index 86f0f2aa10f6364b5d459bb7f24f1a2682cb64d1..e170c4ae4b4563f592835f58eb9c8a891542482a 100644 (file)
@@ -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 */
 
index f6b54967106b09d3da92a78581a5c039eff5c2d2..68d34533115b63303a0c74b855517802f6291300 100644 (file)
@@ -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;
index 99f6663eec92bde4fdbb1e761af74966dfaf61d2..2cac0b13793dd540b18a96ff8f1ffed207c0529a 100644 (file)
@@ -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;
 
index 4123a5ef12bcb8c1ac71d1cf45e54bbef6fe20dc..7c9dd139978b684870a2d45be6d0de01cfb5a1c9 100644 (file)
@@ -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;
 
index c1398b94466636e026200510813260a54da84894..1c2420b926c8901d738322ace549e0ade4084197 100644 (file)
@@ -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;
 
index 0149d89a07dbd5a33ffaf065e3b2719130e50646..f7b6b2c49c77f3d6677842d2d9b629cb4c04f26a 100644 (file)
@@ -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;
index 753a271cb49249a7ec52ecd9169dfe20c37080f8..75aad52ac394467bbd363a7a3df243c2347f037c 100644 (file)
@@ -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;
index 6be06c57a468f356c759cfdaeac1c1706ed4e6a4..e5cb0fdb8ffa716dcb034eb240f717f3cdf30dea 100644 (file)
@@ -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.