diff options
author | itojun <itojun@f5534014-38df-0310-8fa8-9805f1628bb7> | 1999-11-11 21:08:52 +0000 |
---|---|---|
committer | itojun <itojun@f5534014-38df-0310-8fa8-9805f1628bb7> | 1999-11-11 21:08:52 +0000 |
commit | bf48691bf5df284784039b63e222cfa40d79d507 (patch) | |
tree | eb893f633e76fe6433b78f3aef99071762156fc2 /packet-bgp.h | |
parent | ed98e0fe531a05fc9d67b6a48126eb80dbcfe909 (diff) |
bgp improvements.
- a few more tree types
- RFC1771 NLRI printed on advertisements
- AS_PATH parsing
- lots of small cleanup on printing "byte" vs "bytes"
From: Greg Hankins <gregh@cc.gatech.edu>
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1015 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-bgp.h')
-rw-r--r-- | packet-bgp.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/packet-bgp.h b/packet-bgp.h index 620003557d..2239aecbbe 100644 --- a/packet-bgp.h +++ b/packet-bgp.h @@ -1,7 +1,7 @@ /* packet-bgp.c * Definitions for BGP packet disassembly structures and routine * - * $Id: packet-bgp.h,v 1.3 1999/11/06 01:28:50 itojun Exp $ + * $Id: packet-bgp.h,v 1.4 1999/11/11 21:08:52 itojun Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@unicom.net> @@ -25,9 +25,6 @@ #ifndef __PACKET_BGP_H__ #define __PACKET_BGP_H__ -#include "packet.h" -#include "packet-ipv6.h" - /* some handy things to know */ #define BGP_MAX_PACKET_SIZE 4096 #define BGP_MARKER_SIZE 16 @@ -75,6 +72,16 @@ struct bgp_attr { guint8 bgpa_type; }; +/* attribute flags, from RFC 1771 */ +#define BGP_ATTR_FLAG_OPTIONAL 0x80 +#define BGP_ATTR_FLAG_TRANSITIVE 0x40 +#define BGP_ATTR_FLAG_PARTIAL 0x20 +#define BGP_ATTR_FLAG_EXTENDED_LENGTH 0x10 + +/* AS_PATH segment types, from RFC 1771 */ +#define AS_SET 1 +#define AS_SEQUENCE 2 + #define BGPTYPE_ORIGIN 1 /* RFC1771 */ #define BGPTYPE_AS_PATH 2 /* RFC1771 */ #define BGPTYPE_NEXT_HOP 3 /* RFC1771 */ @@ -118,4 +125,9 @@ do { \ #define offsetof(type, member) ((size_t)(&((type *)0)->member)) #endif +/* + * Convert prefix length into number of guint8s needed for prefix. + */ +#define convert_prefix(p) (((p) + 7) / (8)) + #endif |