aboutsummaryrefslogtreecommitdiffstats
path: root/packet-l2tp.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-01-07 21:53:24 +0000
committerGuy Harris <guy@alum.mit.edu>2000-01-07 21:53:24 +0000
commit4f3468b09c241b98d6379fe4dd83c6e18b36f170 (patch)
treed18d37f2cfb0f26e61333d2eb4bb7482d508362e /packet-l2tp.c
parentad2ee158eb25b6a2f237a2b0b2ca4b5bdbd4224d (diff)
Indicate the RFC that specifies L2TP.
Update Gerald's e-mail address. Make some variables static. Make some *other* variables auto, as they don't need to have static storage duration. svn path=/trunk/; revision=1436
Diffstat (limited to 'packet-l2tp.c')
-rw-r--r--packet-l2tp.c57
1 files changed, 28 insertions, 29 deletions
diff --git a/packet-l2tp.c b/packet-l2tp.c
index 218746ba5a..49740502d7 100644
--- a/packet-l2tp.c
+++ b/packet-l2tp.c
@@ -1,11 +1,12 @@
/* packet-l2tp.c
- * Routines for the Layer Two Tunnelling Protocol (L2TP)
+ * Routines for Layer Two Tunnelling Protocol (L2TP) (RFC 2661) packet
+ * disassembly
* John Thomes <john@ensemblecom.com>
*
- * $Id: packet-l2tp.c,v 1.1 2000/01/07 09:10:12 guy Exp $
+ * $Id: packet-l2tp.c,v 1.2 2000/01/07 21:53:24 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@unicom.net>
+ * By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
@@ -25,10 +26,10 @@
*/
-int proto_l2tp = -1;
-int hf_l2tp_length = -1;
-int hf_l2tp_code = -1;
-int hf_l2tp_id =-1;
+static int proto_l2tp = -1;
+static int hf_l2tp_length = -1;
+static int hf_l2tp_code = -1;
+static int hf_l2tp_id =-1;
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -67,28 +68,6 @@ int hf_l2tp_id =-1;
-unsigned short ver; /* Version and more */
-unsigned short length; /* Length field */
-unsigned short tid; /* Tunnel ID */
-unsigned short cid; /* Call ID */
-unsigned short Nr; /* Next recv */
-unsigned short Ns; /* Next sent */
-
-unsigned short ver_len_hidden;
-unsigned short vendor;
-unsigned short avp_type;
-unsigned short msg_type;
-unsigned short avp_len;
-unsigned short error_type;
-unsigned short avp_ver;
-unsigned short avp_rev;
-unsigned short framing;
-unsigned short firmware_rev;
-unsigned short gen_type;
-unsigned long long_type;
-char error_string[100];
-char message_string[200];
-
static gint ett_l2tp = -1;
static gint ett_l2tp_avp = -1;
@@ -238,6 +217,26 @@ void dissect_l2tp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree
u_char *tmp_ptr; /* temp pointer used during AVP decode */
u_char *ptr; /* pointer used during l2tp decode */
int index = 2; /* keeps track of depth into the AVP */
+ unsigned short ver; /* Version and more */
+ unsigned short length; /* Length field */
+ unsigned short tid; /* Tunnel ID */
+ unsigned short cid; /* Call ID */
+ unsigned short Nr; /* Next recv */
+ unsigned short Ns; /* Next sent */
+ unsigned short ver_len_hidden;
+ unsigned short vendor;
+ unsigned short avp_type;
+ unsigned short msg_type;
+ unsigned short avp_len;
+ unsigned short error_type;
+ unsigned short avp_ver;
+ unsigned short avp_rev;
+ unsigned short framing;
+ unsigned short firmware_rev;
+ unsigned short gen_type;
+ unsigned long long_type;
+ char error_string[100];
+ char message_string[200];
ptr = (u_char * )pd; /* point to the frame */
ptr = ptr + offset; /* current offset into the decoded frame */