aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ip.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>1999-08-28 08:31:28 +0000
committerGuy Harris <guy@alum.mit.edu>1999-08-28 08:31:28 +0000
commit18ecb7c3674e4c6499d5cb5f4877ede35ea223c3 (patch)
treee16512ecba3031219c0a19b8a4e093b33cc8f07c /packet-ip.h
parent75e0f9551716b1d0788e5e653dc50d69919991fe (diff)
PPP options in LCP, IPCP, etc. are like IP and TCP options - one octet
of option code, one octet of length (which includes the two option code and length bytes), followed by 0 or more octets of option data, with some options being fixed-length and some being variable-length. Put some stuff from the PPP control protocol option parsing code into the IP-and-TCP option parsing code, and use the latter instead of the former. (That code might also be usable for CDP as well, with some stuff added to it.) Shuffle the arguments to "dissect_ip_tcp_options()" to resemble those of various other dissectors (i.e., with the "proto_tree *" at the end). Add in code to dissect a pile of PPP options documented in various RFCs. svn path=/trunk/; revision=601
Diffstat (limited to 'packet-ip.h')
-rw-r--r--packet-ip.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/packet-ip.h b/packet-ip.h
index e458615f29..4abde3cbd8 100644
--- a/packet-ip.h
+++ b/packet-ip.h
@@ -1,7 +1,7 @@
/* packet-ip.h
* Definitions for IP packet disassembly structures and routines
*
- * $Id: packet-ip.h,v 1.4 1999/06/11 16:44:51 gram Exp $
+ * $Id: packet-ip.h,v 1.5 1999/08/28 08:31:27 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -68,17 +68,18 @@ typedef enum {
} opt_len_type;
/* Member of table of IP or TCP options. */
-typedef struct {
+typedef struct ip_tcp_opt {
int optcode; /* code for option */
char *name; /* name of option */
+ int subtree_index; /* ETT_ value for option */
opt_len_type len_type; /* type of option length field */
int optlen; /* value length should be (minimum if VARIABLE) */
- void (*dissect)(proto_tree *, const char *, const u_char *, int, guint);
+ void (*dissect)(const struct ip_tcp_opt *, const u_char *, int, guint, proto_tree *);
/* routine to dissect option */
} ip_tcp_opt;
/* Routine to dissect IP or TCP options. */
-void dissect_ip_tcp_options(proto_tree *, const u_char *, int, guint,
- ip_tcp_opt *, int, int);
+void dissect_ip_tcp_options(const u_char *, int, guint,
+ const ip_tcp_opt *, int, int, proto_tree *);
#endif