bgp.h revision 3f54fd611f536639ec30dd53c48e5ec1897cc7d9
/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 2000-2012 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* bgp data interface
*
* Glenn Fowler
* AT&T Research
*/
#ifndef _BGP_H
#define _BGP_H
#include <ast_common.h>
#include <ip6.h>
/*
* attributes (even, 1 bit set)
*/
/*
* indices (odd, 2 bits set)
*/
#define BGP_LAST 67
/*
* field set bits
*/
#define BGP_SET_agg_addr32v4 (1<<0)
/*
* BGP_type
*/
#define BGP_TYPE_announce 'A'
#define BGP_TYPE_keepalive 'K'
#define BGP_TYPE_notification 'N'
#define BGP_TYPE_open 'O'
#define BGP_TYPE_state_change 'S'
#define BGP_TYPE_table_dump 'T'
#define BGP_TYPE_withdraw 'W'
/*
* BGP_origin
*/
#define BGP_ORIGIN_incomplete '?'
#define BGP_ORIGIN_egp 'e'
#define BGP_ORIGIN_igp 'i'
struct Bgpvec_s /* vector data */
{
};
{
};
/* BGP_TYPE_state_change */
/* BGP_TYPE_open */
#define open_version med
/* BGP_TYPE_notification */
#define note_subcode dpa_as
struct Bgproute_s
{
/* 128/32 bit members */
/* 32 bit members */
/* 16 bit members */
/* 8 bit members */
unsigned char bits; /* prefix bits */
unsigned char type; /* BGP_TYPE_* */
unsigned char origin; /* BGP_ORIGIN_* */
unsigned char blocks; /* # blocks for this record */
unsigned char afi; /* announce afi */
unsigned char safi; /* announce subsequent afi */
unsigned char p1; /* parameter 1 */
unsigned char rd_type; /* nlri rd type */
/* unaligned fixed buffer members */
};
#endif