Ok, megga changes this time. I think this is un-obtrusive enough that it
might even get checked in!
Now, the packet-radius dissector glances at the packet. If it has a diameter
pcc (first byte == 0xf3), it just calls the diameter-dissector instead.
The diameter dissector also registers for UDP port 2645, TCP port 2645,
and, when sub-dissectors are available, SCTP port 2645. It will dissect any
diameter messages on any of those ports. The extra UDP and TCP (and SCTP)
ports are configurable via preferences.
The included perl file just creates a .h file from a Sun Microsystems
diameter dictionary file. It doesn't really needt to be included. I'll
keep the header up to date. (I included it in the tarball since there were
some questions about it).
So, to sum up, this is very un-obtrusive to RADIUS, can monitor traffic on
any non-dissected TCP or UDP port, and should be pretty clean.
I'll be a little slow with e-mail next week (IETF), but I'll still be reading
it.
----------------cut here---------------------
? packet-diameter.c
? packet-diameter.h
? diameter-dict2h.pl
? packaging/Makefile.in
? packaging/Makefile
? packaging/rpm/Makefile.in
? packaging/rpm/Makefile
? packaging/rpm/ethereal.spec
? packaging/svr4/Makefile.in
? packaging/svr4/Makefile
? packaging/svr4/checkinstall
? packaging/svr4/pkginfo
Index: Makefile.am
===================================================================
RCS file: /cvsroot/ethereal/Makefile.am,v
retrieving revision 1.215
diff -u -r1.215 Makefile.am
--- Makefile.am 2000/07/27 11:00:46 1.215
+++ Makefile.am 2000/07/28 03:32:49
@@ -115,6 +115,7 @@
packet-q931.c \
packet-quake.c \
packet-radius.c\
+ packet-diameter.c\
packet-raw.c \
packet-rip.c \
packet-ripng.c \
Index: Makefile.nmake
===================================================================
RCS file: /cvsroot/ethereal/Makefile.nmake,v
retrieving revision 1.47
diff -u -r1.47 Makefile.nmake
--- Makefile.nmake 2000/07/27 11:00:48 1.47
+++ Makefile.nmake 2000/07/28 03:32:49
@@ -100,6 +100,7 @@
packet-q931.c \
packet-quake.c \
packet-radius.c\
+ packet-diameter.c\
packet-raw.c \
packet-rip.c \
packet-ripng.c \
Index: packet-radius.c
===================================================================
RCS file: /cvsroot/ethereal/packet-radius.c,v
retrieving revision 1.13
diff -u -r1.13 packet-radius.c
--- packet-radius.c 2000/05/31 05:07:33 1.13
+++ packet-radius.c 2000/07/28 03:32:52
@@ -48,6 +48,11 @@
static gint ett_radius = -1;
static gint ett_radius_avp = -1;
+/* Prototype for diameter dissector */
+extern void dissect_diameter(const u_char *pd, int offset, frame_data *fd,
+ proto_tree *tree);
+
+
#define UDP_PORT_RADIUS 1645
#define UDP_PORT_RADIUS_NEW 1812
#define UDP_PORT_RADACCT 1646
@@ -679,6 +684,12 @@
e_radiushdr rh;
gchar *codestrval;
+
+ if (pd[offset] == 254) {
+ /* We have a diameter packet */
+ dissect_diameter(pd, offset, fd, tree);
+ return;
+ }
memcpy(&rh,&pd[offset],sizeof(e_radiushdr));
Attachment:
diffs.tgz
Description: application/tar-gz