aboutsummaryrefslogtreecommitdiffstats
path: root/packet-radius.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-04-08 07:07:42 +0000
committerGuy Harris <guy@alum.mit.edu>2000-04-08 07:07:42 +0000
commit42107e86146c473a06a11769ef2f5a8bedc1ef88 (patch)
tree8c2187183a707d04b8678a4cbfddb5577187c015 /packet-radius.c
parent160928a318385aa2fb59af968ab1cd85847ad963 (diff)
Move calls to "dissector_add()" out of the register routines for TCP and
UDP and into the handoff registration routines for the protocols in question. Make the dissectors for those protocols static if they're not called outside the dissector's source file. Get rid of header files if all they did was declare dissectors that are now static; remove declarations of now-static dissectors from header files that do more than just declare the dissector. svn path=/trunk/; revision=1823
Diffstat (limited to 'packet-radius.c')
-rw-r--r--packet-radius.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/packet-radius.c b/packet-radius.c
index 485cc3a9f5..ef5b0a7bea 100644
--- a/packet-radius.c
+++ b/packet-radius.c
@@ -1,7 +1,7 @@
/* packet-radius.c
* Routines for RADIUS packet disassembly
*
- * $Id: packet-radius.c,v 1.10 2000/04/05 16:01:39 gram Exp $
+ * $Id: packet-radius.c,v 1.11 2000/04/08 07:07:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Johan Feyaerts
@@ -48,6 +48,11 @@ static int hf_radius_id =-1;
static gint ett_radius = -1;
static gint ett_radius_avp = -1;
+#define UDP_PORT_RADIUS 1645
+#define UDP_PORT_RADIUS_NEW 1812
+#define UDP_PORT_RADACCT 1646
+#define UDP_PORT_RADACCT_NEW 1813
+
typedef struct _e_radiushdr {
guint8 rh_code;
guint8 rh_ident;
@@ -661,7 +666,7 @@ void dissect_attribute_value_pairs(const u_char *pd, int offset, frame_data
}
}
-void dissect_radius(const u_char *pd, int offset, frame_data *fd,
+static void dissect_radius(const u_char *pd, int offset, frame_data *fd,
proto_tree
*tree)
{
@@ -763,3 +768,12 @@ proto_register_radius(void)
proto_register_field_array(proto_radius, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_radius(void)
+{
+ dissector_add("udp.port", UDP_PORT_RADIUS, dissect_radius);
+ dissector_add("udp.port", UDP_PORT_RADIUS_NEW, dissect_radius);
+ dissector_add("udp.port", UDP_PORT_RADACCT, dissect_radius);
+ dissector_add("udp.port", UDP_PORT_RADACCT_NEW, dissect_radius);
+}