2002-10-22 08:44:33 +00:00
|
|
|
/* circuit.h
|
|
|
|
* Routines for building lists of packets that are part of a "circuit"
|
|
|
|
*
|
2004-07-18 00:24:25 +00:00
|
|
|
* $Id$
|
2002-10-22 08:44:33 +00:00
|
|
|
*
|
2006-05-21 05:12:17 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2002-10-22 08:44:33 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __CIRCUIT_H__
|
|
|
|
#define __CIRCUIT_H__
|
|
|
|
|
|
|
|
#include "packet.h" /* for circuit dissector type */
|
|
|
|
|
2007-01-18 18:43:30 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2002-10-22 08:44:33 +00:00
|
|
|
/*
|
|
|
|
* Data structure representing a circuit.
|
|
|
|
*/
|
|
|
|
typedef struct circuit_key {
|
|
|
|
circuit_type ctype;
|
|
|
|
guint32 circuit_id;
|
|
|
|
} circuit_key;
|
|
|
|
|
|
|
|
typedef struct circuit {
|
2002-11-08 01:00:07 +00:00
|
|
|
struct circuit *next; /* pointer to next circuit with given circuit ID */
|
2002-11-28 08:25:59 +00:00
|
|
|
guint32 first_frame; /* # of first frame for that circuit */
|
2002-11-08 01:00:07 +00:00
|
|
|
guint32 last_frame; /* # of last frame for that circuit */
|
2002-10-22 08:44:33 +00:00
|
|
|
guint32 index; /* unique ID for circuit */
|
|
|
|
GSList *data_list; /* list of data associated with circuit */
|
|
|
|
dissector_handle_t dissector_handle;
|
|
|
|
/* handle for protocol dissector client associated with circuit */
|
|
|
|
guint options; /* wildcard flags */
|
2002-11-08 01:00:07 +00:00
|
|
|
circuit_key *key_ptr; /* pointer to the key for this circuit */
|
2002-10-22 08:44:33 +00:00
|
|
|
} circuit_t;
|
|
|
|
|
|
|
|
extern void circuit_init(void);
|
|
|
|
|
2002-11-08 01:00:07 +00:00
|
|
|
extern circuit_t *circuit_new(circuit_type ctype, guint32 circuit_id,
|
|
|
|
guint32 first_frame);
|
2002-10-22 08:44:33 +00:00
|
|
|
|
2002-11-08 01:00:07 +00:00
|
|
|
extern circuit_t *find_circuit(circuit_type ctype, guint32 circuit_id,
|
|
|
|
guint32 frame);
|
|
|
|
|
|
|
|
extern void close_circuit(circuit_t *circuit, guint32 last_frame);
|
2002-10-22 08:44:33 +00:00
|
|
|
|
|
|
|
extern void circuit_add_proto_data(circuit_t *conv, int proto,
|
|
|
|
void *proto_data);
|
|
|
|
extern void *circuit_get_proto_data(circuit_t *conv, int proto);
|
|
|
|
extern void circuit_delete_proto_data(circuit_t *conv, int proto);
|
|
|
|
|
|
|
|
extern void circuit_set_dissector(circuit_t *circuit,
|
|
|
|
dissector_handle_t handle);
|
2002-10-31 07:12:42 +00:00
|
|
|
extern dissector_handle_t circuit_get_dissector(circuit_t *circuit);
|
2002-10-22 08:44:33 +00:00
|
|
|
extern gboolean
|
2002-11-08 01:00:07 +00:00
|
|
|
try_circuit_dissector(circuit_type ctype, guint32 circuit_id, guint32 frame,
|
|
|
|
tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
|
2002-10-22 08:44:33 +00:00
|
|
|
|
2007-01-18 18:43:30 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
2002-10-22 08:44:33 +00:00
|
|
|
|
2007-01-18 18:43:30 +00:00
|
|
|
#endif /* circuit.h */
|