aboutsummaryrefslogtreecommitdiffstats
path: root/randpkt.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2002-10-15 02:29:54 +0000
committerGerald Combs <gerald@wireshark.org>2002-10-15 02:29:54 +0000
commit9afeafe88ec90da1b4478be5006bb2cef5edc966 (patch)
tree6a324a1c9b8ce545d5d72b3b0120738f42ef6de3 /randpkt.c
parente0a7988e6d1049b26debafbc16b88403e39e5af4 (diff)
Fix signed/unsigned type mismatches, as pointed out by Silvio.
Add BGP output to randpkt. svn path=/trunk/; revision=6420
Diffstat (limited to 'randpkt.c')
-rw-r--r--randpkt.c37
1 files changed, 35 insertions, 2 deletions
diff --git a/randpkt.c b/randpkt.c
index 342a28e..9bc7697 100644
--- a/randpkt.c
+++ b/randpkt.c
@@ -4,7 +4,7 @@
* Creates random packet traces. Useful for debugging sniffers by testing
* assumptions about the veracity of the data found in the packet.
*
- * $Id: randpkt.c,v 1.15 2002/08/28 21:00:41 jmayer Exp $
+ * $Id: randpkt.c,v 1.16 2002/10/15 02:29:54 gerald Exp $
*
* Copyright (C) 1999 by Gilbert Ramirez <gram@alumni.rice.edu>
*
@@ -62,7 +62,8 @@ enum {
PKT_UDP,
PKT_BVLC,
PKT_NCP2222,
- PKT_GIOP
+ PKT_GIOP,
+ PKT_BGP,
};
typedef struct {
@@ -261,6 +262,35 @@ guint8 pkt_giop[] = {
0x01
};
+/* Ethernet+IP+TCP, indicating BGP */
+guint8 pkt_bgp[] = {
+ 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01,
+ 0x08, 0x00,
+
+ 0x45, 0x00, 0x00, 0xa6,
+ 0x00, 0x2f, 0x40, 0x00,
+ 0x40, 0x06, 0x3c, 0x21,
+ 0x7f, 0x00, 0x00, 0x01,
+ 0x7f, 0x00, 0x00, 0x01,
+
+ 0x30, 0x39, 0x00, 0xb3,
+ 0xac, 0x02, 0x1e, 0x69,
+ 0xab, 0x74, 0xab, 0x64,
+ 0x80, 0x18, 0x79, 0x60,
+ 0xc4, 0xb8, 0x00, 0x00,
+ 0x01, 0x01, 0x08, 0x0a,
+ 0x00, 0x00, 0x48, 0xf5,
+ 0x00, 0x00, 0x48, 0xf5,
+
+ 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff,
+
+};
+
/* This little data table drives the whole program */
pkt_example examples[] = {
{ "arp", "Address Resolution Protocol",
@@ -308,6 +338,9 @@ pkt_example examples[] = {
{ "giop", "General Inter-ORB Protocol",
PKT_GIOP, pkt_giop, WTAP_ENCAP_ETHERNET, array_length(pkt_giop) },
+ { "bgp", "Border Gateway Protocol",
+ PKT_BGP, pkt_bgp, WTAP_ENCAP_ETHERNET, array_length(pkt_bgp) },
+
};