forked from osmocom/wireshark
![Guy Harris](/assets/img/avatar_default.png)
structure to the "packet_info" structure; only stuff that's permanently stored with each frame should be in the "frame_data" structure, and the "column_info" structure is not guaranteed to hold the column values for that frame at all times - it was only in the "frame_data" structure so that it could be passed to dissectors, and, as all dissectors are now passed a pointer to a "packet_info" structure, it could just as well be put in the "packet_info" structure. That saves memory, by shrinking the "frame_data" structure (there's one of those per frame), and also lets us clean up the code a bit. svn path=/trunk/; revision=4370
65 lines
1.5 KiB
C
65 lines
1.5 KiB
C
/* epan.h
|
|
*
|
|
* $Id: epan.h,v 1.10 2001/12/10 00:26:16 guy Exp $
|
|
*
|
|
* Ethereal Protocol Analyzer Library
|
|
*
|
|
*/
|
|
|
|
#ifndef EPAN_H
|
|
#define EPAN_H
|
|
|
|
#include <glib.h>
|
|
|
|
struct _epan_dissect_t;
|
|
|
|
/* XXX - for now */
|
|
#include "packet.h"
|
|
#include "packet_info.h"
|
|
|
|
void epan_init(const char * plugindir, void (register_all_protocols)(void),
|
|
void (register_all_handoffs)(void));
|
|
void epan_cleanup(void);
|
|
void epan_conversation_init(void);
|
|
|
|
|
|
|
|
/* A client will create one epan_t for an entire dissection session.
|
|
* A single epan_t will be used to analyze the entire sequence of packets,
|
|
* sequentially, in a single session. A session corresponds to a single
|
|
* packet trace file. The reaons epan_t exists is that some packets in
|
|
* some protocols cannot be decoded without knowledge of previous packets.
|
|
* This inter-packet "state" is stored in the epan_t.
|
|
*/
|
|
typedef struct epan_session epan_t;
|
|
|
|
epan_t*
|
|
epan_new(void);
|
|
|
|
void
|
|
epan_free(epan_t*);
|
|
|
|
|
|
|
|
|
|
/* Dissection of a single byte array. Holds tvbuff info as
|
|
* well as proto_tree info. As long as the epan_dissect_t for a byte
|
|
* array is in existence, you must not free or move that byte array,
|
|
* as the structures that the epan_dissect_t contains might have pointers
|
|
* to addresses in your byte array.
|
|
*/
|
|
typedef struct _epan_dissect_t {
|
|
tvbuff_t *tvb;
|
|
proto_tree *tree;
|
|
packet_info pi;
|
|
} epan_dissect_t;
|
|
|
|
epan_dissect_t*
|
|
epan_dissect_new(void* pseudo_header, const guint8* data, frame_data *fd,
|
|
gboolean create_proto_tree, column_info *cinfo);
|
|
|
|
void
|
|
epan_dissect_free(epan_dissect_t* edt);
|
|
|
|
#endif /* EPAN_H */
|