2 * Definitions for IP packet disassembly structures and routines
4 * $Id: packet-ip.h,v 1.19 2001/04/23 17:51:33 guy Exp $
6 * Ethereal - Network traffic analyzer
7 * By Gerald Combs <gerald@ethereal.com>
8 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 #ifndef __PACKET_IP_H__
28 #define __PACKET_IP_H__
30 void capture_ip(const u_char *, int, packet_counts *);
33 NO_LENGTH, /* option has no data, hence no length */
34 FIXED_LENGTH, /* option always has the same length */
35 VARIABLE_LENGTH /* option is variable-length - optlen is minimum */
38 /* Member of table of IP or TCP options. */
39 typedef struct ip_tcp_opt {
40 int optcode; /* code for option */
41 char *name; /* name of option */
42 int *subtree_index; /* pointer to subtree index for option */
43 opt_len_type len_type; /* type of option length field */
44 int optlen; /* value length should be (minimum if VARIABLE) */
45 void (*dissect)(const struct ip_tcp_opt *, tvbuff_t *, int, guint,
46 frame_data *, proto_tree *);
47 /* routine to dissect option */
50 /* Routine to dissect IP or TCP options. */
51 void dissect_ip_tcp_options(tvbuff_t *, int, guint,
52 const ip_tcp_opt *, int, int, frame_data *, proto_tree *);
54 /* Dissector table for "ip.proto"; used by IPv6 as well as IPv4 */
55 extern dissector_table_t ip_dissector_table;