diff options
author | Ed Warnicke <hagbard@physics.rutgers.edu> | 2001-04-01 04:11:51 +0000 |
---|---|---|
committer | Ed Warnicke <hagbard@physics.rutgers.edu> | 2001-04-01 04:11:51 +0000 |
commit | 20eee44b702dd401514522859fa29c24ddd127e1 (patch) | |
tree | e7a8012459c819bc62902b75035b5cb7b070409a /epan/frame_data.h | |
parent | 5d0c2134484af9d78b75b4ddc27014f74e48a1b4 (diff) | |
download | wireshark-20eee44b702dd401514522859fa29c24ddd127e1.tar.gz wireshark-20eee44b702dd401514522859fa29c24ddd127e1.tar.bz2 wireshark-20eee44b702dd401514522859fa29c24ddd127e1.zip |
Moved the frame_data structures and functions from packet.{h,c} to
frame_data{h,c}. Added a frame_data_init to be called by epan_init.
svn path=/trunk/; revision=3223
Diffstat (limited to 'epan/frame_data.h')
-rw-r--r-- | epan/frame_data.h | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/epan/frame_data.h b/epan/frame_data.h new file mode 100644 index 0000000000..75e216b6c8 --- /dev/null +++ b/epan/frame_data.h @@ -0,0 +1,74 @@ +/* frame_data.h + * Definitions for frame_data structures and routines + * + * $Id: frame_data.h,v 1.1 2001/04/01 04:11:50 hagbard Exp $ + * + * Ethereal - Network traffic analyzer + * By Gerald Combs <gerald@zing.org> + * 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 __FRAME_DATA_H__ +#define __FRAME_DATA_H__ + +#include "column_info.h" + + +/* XXX - some of this stuff is used only while a packet is being dissected; + should we keep that stuff in the "packet_info" structure, instead, to + save memory? */ +typedef struct _frame_data { + struct _frame_data *next; /* Next element in list */ + struct _frame_data *prev; /* Previous element in list */ + GSList *pfd; /* Per frame proto data */ + GSList *data_src; /* Frame data sources */ + guint32 num; /* Frame number */ + guint32 pkt_len; /* Packet length */ + guint32 cap_len; /* Amount actually captured */ + gint32 rel_secs; /* Relative seconds (yes, it can be negative) */ + gint32 rel_usecs; /* Relative microseconds (yes, it can be negative) */ + guint32 abs_secs; /* Absolute seconds */ + guint32 abs_usecs; /* Absolute microseconds */ + gint32 del_secs; /* Delta seconds (yes, it can be negative) */ + gint32 del_usecs; /* Delta microseconds (yes, it can be negative) */ + long file_off; /* File offset */ + column_info *cinfo; /* Column formatting information */ + int lnk_t; /* Per-packet encapsulation/data-link type */ + struct { + unsigned int passed_dfilter : 1; /* 1 = display, 0 = no display */ + unsigned int encoding : 2; /* Character encoding (ASCII, EBCDIC...) */ + unsigned int visited : 1; /* Has this packet been visited yet? 1=Yes,0=No*/ + unsigned int marked : 1; /* 1 = marked by user, 0 = normal */ + } flags; +} frame_data; + +/* Utility routines used by packet*.c */ + +void p_add_proto_data(frame_data *, int, void *); +void *p_get_proto_data(frame_data *, int); + +/* An init routine to be called by epan_init */ +void frame_data_init(void); + +/* A cleanup routine to be called by epan_cleanup */ +void frame_data_cleanup(void); + +#endif /* __FRAME_DATA__ */ + + + |