wireshark/packet-yhoo.h
Guy Harris 6bbfd97bde Add routines to:
register lists of "heuristic" dissectors, which are handed a
	frame that may or may contain a payload for the protocol they
	dissect, and that return FALSE if it's not or dissect the packet
	and return TRUE if it is;

	add a dissector to such a list;

	go through such a list, calling each dissector until either a
	dissector returns TRUE, in which case the routine returns TRUE,
	or it runs out of entries in the list, in which case the routine
	returns FALSE.

Have lists of heuristic dissectors for TCP and for COTP when used with
the Inactive Subset of CLNP, and add the GIOP and Yahoo Messenger
dissectors to the first list and the Sinec H1 dissector to the second
list.

Make the dissector name argument to "dissector_add()" and
"dissector_delete()" a "const char *" rarther than just a "char *".

Add "heur_dissector_add()", the routine to add a heuristic dissector to
a list of heuristic dissectors, to the set of routines we can export to
plugins through a table on platforms where dynamically-loaded code can't
call stuff in the main program, and initialize the element in the table
in question for "dissector_add()" (which we'd forgotten to do).

svn path=/trunk/; revision=1909
2000-05-05 09:32:36 +00:00

87 lines
2.8 KiB
C

/* packet-yhoo.h
* Definitions for packet disassembly structures and routines
*
* $Id: packet-yhoo.h,v 1.6 2000/05/05 09:32:07 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
* Joerg Mayer <jmayer@telemation.de>
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* This is from yahoolib.h from gtkyahoo */
#ifndef YAHOO_LIB_H
#define YAHOO_LIB_H
/* Service constants */
#define YAHOO_SERVICE_LOGON 1
#define YAHOO_SERVICE_LOGOFF 2
#define YAHOO_SERVICE_ISAWAY 3
#define YAHOO_SERVICE_ISBACK 4
#define YAHOO_SERVICE_IDLE 5
#define YAHOO_SERVICE_MESSAGE 6
#define YAHOO_SERVICE_IDACT 7
#define YAHOO_SERVICE_IDDEACT 8
#define YAHOO_SERVICE_MAILSTAT 9
#define YAHOO_SERVICE_USERSTAT 10
#define YAHOO_SERVICE_NEWMAIL 11
#define YAHOO_SERVICE_CHATINVITE 12
#define YAHOO_SERVICE_CALENDAR 13
#define YAHOO_SERVICE_NEWPERSONALMAIL 14
#define YAHOO_SERVICE_NEWCONTACT 15
#define YAHOO_SERVICE_ADDIDENT 16
#define YAHOO_SERVICE_ADDIGNORE 17
#define YAHOO_SERVICE_PING 18
#define YAHOO_SERVICE_GROUPRENAME 19
#define YAHOO_SERVICE_SYSMESSAGE 20
#define YAHOO_SERVICE_PASSTHROUGH2 22
#define YAHOO_SERVICE_CONFINVITE 24
#define YAHOO_SERVICE_CONFLOGON 25
#define YAHOO_SERVICE_CONFDECLINE 26
#define YAHOO_SERVICE_CONFLOGOFF 27
#define YAHOO_SERVICE_CONFADDINVITE 28
#define YAHOO_SERVICE_CONFMSG 29
#define YAHOO_SERVICE_CHATLOGON 30
#define YAHOO_SERVICE_CHATLOGOFF 31
#define YAHOO_SERVICE_CHATMSG 32
#define YAHOO_SERVICE_FILETRANSFER 70
/* Message flags */
#define YAHOO_MSGTYPE_NONE 0
#define YAHOO_MSGTYPE_NORMAL 1
#define YAHOO_MSGTYPE_BOUNCE 2
#define YAHOO_MSGTYPE_STATUS 4
#define YAHOO_MSGTYPE_OFFLINE 1515563606 /* yuck! */
struct yahoo_rawpacket
{
char version[8]; /* 7 chars and trailing null */
unsigned char len[4]; /* length - little endian */
unsigned char service[4]; /* service - little endian */
unsigned char connection_id[4]; /* connection number - little endian */
unsigned char magic_id[4]; /* magic number used for http session */
unsigned char unknown1[4];
unsigned char msgtype[4];
char nick1[36];
char nick2[36];
char content[1]; /* was zero, had problems with aix xlc */
};
#endif