~ubuntu-branches/ubuntu/gutsy/wireshark/gutsy-security

« back to all changes in this revision

Viewing changes to epan/dissectors/packet-mysql.c

  • Committer: Bazaar Package Importer
  • Author(s): Frederic Peters
  • Date: 2007-04-01 08:58:40 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070401085840-or3qhrpv8alt1bwg
Tags: 0.99.5-1
* New upstream release.
* debian/patches/09_idl2wrs.dpatch: updated to patch idl2wrs.sh.in.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *
6
6
 * MySQL 4.1+ protocol by Axel Schwenke <axel@mysql.com>
7
7
 *
8
 
 * $Id: packet-mysql.c 18761 2006-07-18 21:16:02Z etxrab $
 
8
 * $Id: packet-mysql.c 20021 2006-11-30 07:15:17Z jake $
9
9
 *
10
10
 * Wireshark - Network traffic analyzer
11
11
 * By Gerald Combs <gerald@wireshark.org>
467
467
void proto_reg_handoff_mysql(void);
468
468
void proto_register_mysql(void);
469
469
static void dissect_mysql(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
470
 
static guint get_mysql_pdu_len(tvbuff_t *tvb, int offset);
 
470
static guint get_mysql_pdu_len(packet_info *pinfo, tvbuff_t *tvb, int offset);
471
471
static void dissect_mysql_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
472
472
static int mysql_dissect_login(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree, my_conn_data_t *conn_data);
473
473
static int mysql_dissect_greeting(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree, my_conn_data_t *conn_data);
901
901
                                       "Whether the MySQL dissector should reassemble MySQL buffers spanning multiple TCP segments."
902
902
                                       " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
903
903
                                       &mysql_desegment);
 
904
                               
 
905
        register_dissector("mysql", dissect_mysql_pdu, proto_mysql);                                   
904
906
}
905
907
 
906
908
 
913
915
 
914
916
 
915
917
/* dissector helper: length of PDU */
916
 
static guint get_mysql_pdu_len(tvbuff_t *tvb, int offset)
 
918
static guint get_mysql_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
917
919
{
918
920
        guint plen= tvb_get_letoh24(tvb, offset);
919
921
        return plen + 4; /* add length field + packet number */