413 lines
16 KiB
C
413 lines
16 KiB
C
/* This file was automatically generated by Epilogue Technology's
|
|
* network datastructure layout tool.
|
|
*
|
|
* DO NOT MODIFY THIS FILE BY HAND.
|
|
*
|
|
* Source file information:
|
|
* Id: bgp.ldb,v 1.8 1998/02/25 15:21:39 sra Exp
|
|
* --used --
|
|
* Id: ip.ldb,v 1.17 1998/02/25 15:21:40 sra Exp
|
|
*/
|
|
|
|
#ifndef EPILOGUE_LAYOUT_BGP_H
|
|
#define EPILOGUE_LAYOUT_BGP_H
|
|
|
|
#ifndef EPILOGUE_INSTALL_H
|
|
#include <wrn/wm/common/install.h>
|
|
#endif
|
|
#ifndef EPILOGUE_TYPES_H
|
|
#include <wrn/wm/common/types.h>
|
|
#endif
|
|
#ifndef EPILOGUE_LAYOUT_LDBGLUE_H
|
|
#include <wrn/wm/util/layout/ldbglue.h>
|
|
#endif
|
|
|
|
/* Definitions for BGP_HEADER */
|
|
|
|
#define SIZEOF_BGP_HEADER (19)
|
|
#define PTR_BGP_HEADER_MARKER(_P_)\
|
|
((GLUE_CAST_PTR(_P_)))
|
|
#define SIZEOF_BGP_HEADER_MARKER (16)
|
|
#define PTR_BGP_HEADER_MARKER_ELT(_P_, _X0_)\
|
|
((GLUE_CAST_PTR(_P_))+(_X0_))
|
|
#define GET_BGP_HEADER_MARKER_ELT(_P_, _X0_)\
|
|
GLUE_GB08((GLUE_CAST_PTR(_P_))+(_X0_))
|
|
#define SET_BGP_HEADER_MARKER_ELT(_P_, _X0_, _V_)\
|
|
GLUE_SB08((GLUE_CAST_PTR(_P_))+(_X0_), GLUE_CAST08(_V_))
|
|
#define PTR_BGP_HEADER_LENGTH(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(16))
|
|
#define GET_BGP_HEADER_LENGTH(_P_)\
|
|
GLUE_GB16((GLUE_CAST_PTR(_P_))+(16))
|
|
#define SET_BGP_HEADER_LENGTH(_P_, _V_)\
|
|
GLUE_SB16((GLUE_CAST_PTR(_P_))+(16), GLUE_CAST16(_V_))
|
|
#define PTR_BGP_HEADER_TYPE(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(18))
|
|
#define GET_BGP_HEADER_TYPE(_P_)\
|
|
GLUE_GB08((GLUE_CAST_PTR(_P_))+(18))
|
|
#define SET_BGP_HEADER_TYPE(_P_, _V_)\
|
|
GLUE_SB08((GLUE_CAST_PTR(_P_))+(18), GLUE_CAST08(_V_))
|
|
#define BGP_HEADER_TYPE_is_OPEN GLUE_CAST08(1L)
|
|
#define BGP_HEADER_TYPE_is_UPDATE GLUE_CAST08(2L)
|
|
#define BGP_HEADER_TYPE_is_NOTIFICATION GLUE_CAST08(3L)
|
|
#define BGP_HEADER_TYPE_is_KEEPALIVE GLUE_CAST08(4L)
|
|
|
|
/* Definitions for BGP_NOTIFY */
|
|
|
|
#define SIZEOF_BGP_NOTIFY (21)
|
|
#define PTR_BGP_NOTIFY_CODE(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(19))
|
|
#define GET_BGP_NOTIFY_CODE(_P_)\
|
|
GLUE_GB08((GLUE_CAST_PTR(_P_))+(19))
|
|
#define SET_BGP_NOTIFY_CODE(_P_, _V_)\
|
|
GLUE_SB08((GLUE_CAST_PTR(_P_))+(19), GLUE_CAST08(_V_))
|
|
#define BGP_NOTIFY_CODE_is_HDR_ERR GLUE_CAST08(1L)
|
|
#define BGP_NOTIFY_CODE_is_OPEN_ERR GLUE_CAST08(2L)
|
|
#define BGP_NOTIFY_CODE_is_UPD_ERR GLUE_CAST08(3L)
|
|
#define BGP_NOTIFY_CODE_is_HOLD_TIMER GLUE_CAST08(4L)
|
|
#define BGP_NOTIFY_CODE_is_STATE_MACHINE GLUE_CAST08(5L)
|
|
#define BGP_NOTIFY_CODE_is_CEASE GLUE_CAST08(6L)
|
|
#define PTR_BGP_NOTIFY_HDR_ERR(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(20))
|
|
#define GET_BGP_NOTIFY_HDR_ERR(_P_)\
|
|
GLUE_GB08((GLUE_CAST_PTR(_P_))+(20))
|
|
#define SET_BGP_NOTIFY_HDR_ERR(_P_, _V_)\
|
|
GLUE_SB08((GLUE_CAST_PTR(_P_))+(20), GLUE_CAST08(_V_))
|
|
#define BGP_NOTIFY_HDR_ERR_is_CONN_NOT_SYNC GLUE_CAST08(1L)
|
|
#define BGP_NOTIFY_HDR_ERR_is_BAD_LENGTH GLUE_CAST08(2L)
|
|
#define BGP_NOTIFY_HDR_ERR_is_BAD_TYPE GLUE_CAST08(3L)
|
|
#define PTR_BGP_NOTIFY_OPEN_ERR(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(20))
|
|
#define GET_BGP_NOTIFY_OPEN_ERR(_P_)\
|
|
GLUE_GB08((GLUE_CAST_PTR(_P_))+(20))
|
|
#define SET_BGP_NOTIFY_OPEN_ERR(_P_, _V_)\
|
|
GLUE_SB08((GLUE_CAST_PTR(_P_))+(20), GLUE_CAST08(_V_))
|
|
#define BGP_NOTIFY_OPEN_ERR_is_VERSION_UNSUPPORTED GLUE_CAST08(1L)
|
|
#define BGP_NOTIFY_OPEN_ERR_is_BAD_AS GLUE_CAST08(2L)
|
|
#define BGP_NOTIFY_OPEN_ERR_is_BAD_IDENTIFIER GLUE_CAST08(3L)
|
|
#define BGP_NOTIFY_OPEN_ERR_is_PARAMETER_UNSUPPORTED GLUE_CAST08(4L)
|
|
#define BGP_NOTIFY_OPEN_ERR_is_AUTH_FAILURE GLUE_CAST08(5L)
|
|
#define BGP_NOTIFY_OPEN_ERR_is_BAD_HOLD_TIME GLUE_CAST08(6L)
|
|
#define PTR_BGP_NOTIFY_UPD_ERR(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(20))
|
|
#define GET_BGP_NOTIFY_UPD_ERR(_P_)\
|
|
GLUE_GB08((GLUE_CAST_PTR(_P_))+(20))
|
|
#define SET_BGP_NOTIFY_UPD_ERR(_P_, _V_)\
|
|
GLUE_SB08((GLUE_CAST_PTR(_P_))+(20), GLUE_CAST08(_V_))
|
|
#define BGP_NOTIFY_UPD_ERR_is_BAD_ATTRIBUTES GLUE_CAST08(1L)
|
|
#define BGP_NOTIFY_UPD_ERR_is_UNRECOGNIZED_ATTRIBUTE GLUE_CAST08(2L)
|
|
#define BGP_NOTIFY_UPD_ERR_is_MISSING_ATTRIBUTE GLUE_CAST08(3L)
|
|
#define BGP_NOTIFY_UPD_ERR_is_BAD_FLAGS GLUE_CAST08(4L)
|
|
#define BGP_NOTIFY_UPD_ERR_is_BAD_LENGTH GLUE_CAST08(5L)
|
|
#define BGP_NOTIFY_UPD_ERR_is_BAD_ORIGIN GLUE_CAST08(6L)
|
|
#define BGP_NOTIFY_UPD_ERR_is_ROUTING_LOOP GLUE_CAST08(7L)
|
|
#define BGP_NOTIFY_UPD_ERR_is_BAD_NEXT_HOP GLUE_CAST08(8L)
|
|
#define BGP_NOTIFY_UPD_ERR_is_BAD_OPTIONAL_ATTRIBUTE GLUE_CAST08(9L)
|
|
#define BGP_NOTIFY_UPD_ERR_is_BAD_NETWORK GLUE_CAST08(10L)
|
|
#define BGP_NOTIFY_UPD_ERR_is_BAD_AS_PATH GLUE_CAST08(11L)
|
|
#define PTR_BGP_NOTIFY_DATA(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(21))
|
|
#define SIZEOF_BGP_NOTIFY_DATA (0)
|
|
#define PTR_BGP_NOTIFY_DATA_ELT(_P_, _X0_)\
|
|
((GLUE_CAST_PTR(_P_))+(21)+(_X0_))
|
|
#define GET_BGP_NOTIFY_DATA_ELT(_P_, _X0_)\
|
|
GLUE_GB08((GLUE_CAST_PTR(_P_))+(21)+(_X0_))
|
|
#define SET_BGP_NOTIFY_DATA_ELT(_P_, _X0_, _V_)\
|
|
GLUE_SB08((GLUE_CAST_PTR(_P_))+(21)+(_X0_), GLUE_CAST08(_V_))
|
|
|
|
/* Definitions for BGP_ADDRESS_PREFIX */
|
|
|
|
#define SIZEOF_BGP_ADDRESS_PREFIX (1)
|
|
#define PTR_BGP_ADDRESS_PREFIX_LENGTH(_P_)\
|
|
((GLUE_CAST_PTR(_P_)))
|
|
#define GET_BGP_ADDRESS_PREFIX_LENGTH(_P_)\
|
|
GLUE_GB08((GLUE_CAST_PTR(_P_)))
|
|
#define SET_BGP_ADDRESS_PREFIX_LENGTH(_P_, _V_)\
|
|
GLUE_SB08((GLUE_CAST_PTR(_P_)), GLUE_CAST08(_V_))
|
|
#define PTR_BGP_ADDRESS_PREFIX_PREFIX(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(1))
|
|
#define SIZEOF_BGP_ADDRESS_PREFIX_PREFIX (0)
|
|
#define PTR_BGP_ADDRESS_PREFIX_PREFIX_ELT(_P_, _X0_)\
|
|
((GLUE_CAST_PTR(_P_))+(1)+(_X0_))
|
|
#define GET_BGP_ADDRESS_PREFIX_PREFIX_ELT(_P_, _X0_)\
|
|
GLUE_GB08((GLUE_CAST_PTR(_P_))+(1)+(_X0_))
|
|
#define SET_BGP_ADDRESS_PREFIX_PREFIX_ELT(_P_, _X0_, _V_)\
|
|
GLUE_SB08((GLUE_CAST_PTR(_P_))+(1)+(_X0_), GLUE_CAST08(_V_))
|
|
|
|
/* Definitions for BGP_UPDATE_REACHABLES */
|
|
|
|
#define SIZEOF_BGP_UPDATE_REACHABLES (0)
|
|
#define PTR_BGP_UPDATE_REACHABLES_PREFIXES(_P_)\
|
|
((GLUE_CAST_PTR(_P_)))
|
|
#define SIZEOF_BGP_UPDATE_REACHABLES_PREFIXES (0)
|
|
|
|
/* Definitions for AS_NUMBER */
|
|
|
|
#define SIZEOF_AS_NUMBER (2)
|
|
#define GET_AS_NUMBER(_P_)\
|
|
GLUE_GB16((GLUE_CAST_PTR(_P_)))
|
|
#define SET_AS_NUMBER(_P_, _V_)\
|
|
GLUE_SB16((GLUE_CAST_PTR(_P_)), GLUE_CAST16(_V_))
|
|
|
|
/* Definitions for BGP_KEEPALIVE_MSG */
|
|
|
|
#define SIZEOF_BGP_KEEPALIVE_MSG (19)
|
|
|
|
/* Definitions for BGP_LOCAL_PREF_ATTRIBUTE */
|
|
|
|
#define SIZEOF_BGP_LOCAL_PREF_ATTRIBUTE (4)
|
|
#define PTR_BGP_LOCAL_PREF_ATTRIBUTE_PREF(_P_)\
|
|
((GLUE_CAST_PTR(_P_)))
|
|
#define GET_BGP_LOCAL_PREF_ATTRIBUTE_PREF(_P_)\
|
|
GLUE_GB32((GLUE_CAST_PTR(_P_)))
|
|
#define SET_BGP_LOCAL_PREF_ATTRIBUTE_PREF(_P_, _V_)\
|
|
GLUE_SB32((GLUE_CAST_PTR(_P_)), GLUE_CAST32(_V_))
|
|
|
|
/* Definitions for BGP_UPDATE_UNFEASIBLES */
|
|
|
|
#define SIZEOF_BGP_UPDATE_UNFEASIBLES (2)
|
|
#define PTR_BGP_UPDATE_UNFEASIBLES_LENGTH(_P_)\
|
|
((GLUE_CAST_PTR(_P_)))
|
|
#define GET_BGP_UPDATE_UNFEASIBLES_LENGTH(_P_)\
|
|
GLUE_GB16((GLUE_CAST_PTR(_P_)))
|
|
#define SET_BGP_UPDATE_UNFEASIBLES_LENGTH(_P_, _V_)\
|
|
GLUE_SB16((GLUE_CAST_PTR(_P_)), GLUE_CAST16(_V_))
|
|
#define PTR_BGP_UPDATE_UNFEASIBLES_PREFIXES(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(2))
|
|
#define SIZEOF_BGP_UPDATE_UNFEASIBLES_PREFIXES (0)
|
|
|
|
/* Definitions for BGP_UPDATE_ATTRIBUTES */
|
|
|
|
#define SIZEOF_BGP_UPDATE_ATTRIBUTES (2)
|
|
#define PTR_BGP_UPDATE_ATTRIBUTES_LENGTH(_P_)\
|
|
((GLUE_CAST_PTR(_P_)))
|
|
#define GET_BGP_UPDATE_ATTRIBUTES_LENGTH(_P_)\
|
|
GLUE_GB16((GLUE_CAST_PTR(_P_)))
|
|
#define SET_BGP_UPDATE_ATTRIBUTES_LENGTH(_P_, _V_)\
|
|
GLUE_SB16((GLUE_CAST_PTR(_P_)), GLUE_CAST16(_V_))
|
|
#define PTR_BGP_UPDATE_ATTRIBUTES_ATTRIBUTES(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(2))
|
|
#define SIZEOF_BGP_UPDATE_ATTRIBUTES_ATTRIBUTES (0)
|
|
|
|
/* Definitions for BGP_OPEN_MSG */
|
|
|
|
#define SIZEOF_BGP_OPEN_MSG (29)
|
|
#define PTR_BGP_OPEN_MSG_VERSION(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(19))
|
|
#define GET_BGP_OPEN_MSG_VERSION(_P_)\
|
|
GLUE_GB08((GLUE_CAST_PTR(_P_))+(19))
|
|
#define SET_BGP_OPEN_MSG_VERSION(_P_, _V_)\
|
|
GLUE_SB08((GLUE_CAST_PTR(_P_))+(19), GLUE_CAST08(_V_))
|
|
#define PTR_BGP_OPEN_MSG_MY_AS(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(20))
|
|
#define GET_BGP_OPEN_MSG_MY_AS(_P_)\
|
|
GLUE_GB16((GLUE_CAST_PTR(_P_))+(20))
|
|
#define SET_BGP_OPEN_MSG_MY_AS(_P_, _V_)\
|
|
GLUE_SB16((GLUE_CAST_PTR(_P_))+(20), GLUE_CAST16(_V_))
|
|
#define PTR_BGP_OPEN_MSG_HOLD_TIME(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(22))
|
|
#define GET_BGP_OPEN_MSG_HOLD_TIME(_P_)\
|
|
GLUE_GB16((GLUE_CAST_PTR(_P_))+(22))
|
|
#define SET_BGP_OPEN_MSG_HOLD_TIME(_P_, _V_)\
|
|
GLUE_SB16((GLUE_CAST_PTR(_P_))+(22), GLUE_CAST16(_V_))
|
|
#define PTR_BGP_OPEN_MSG_IDENTIFIER(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(24))
|
|
#define GET_BGP_OPEN_MSG_IDENTIFIER(_P_)\
|
|
GLUE_GB32((GLUE_CAST_PTR(_P_))+(24))
|
|
#define SET_BGP_OPEN_MSG_IDENTIFIER(_P_, _V_)\
|
|
GLUE_SB32((GLUE_CAST_PTR(_P_))+(24), GLUE_CAST32(_V_))
|
|
#define PTR_BGP_OPEN_MSG_PARAMETERS_LENGTH(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(28))
|
|
#define GET_BGP_OPEN_MSG_PARAMETERS_LENGTH(_P_)\
|
|
GLUE_GB08((GLUE_CAST_PTR(_P_))+(28))
|
|
#define SET_BGP_OPEN_MSG_PARAMETERS_LENGTH(_P_, _V_)\
|
|
GLUE_SB08((GLUE_CAST_PTR(_P_))+(28), GLUE_CAST08(_V_))
|
|
#define PTR_BGP_OPEN_MSG_PARAMETERS(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(29))
|
|
#define SIZEOF_BGP_OPEN_MSG_PARAMETERS (0)
|
|
|
|
/* Definitions for BGP_OPEN_PARAM */
|
|
|
|
#define SIZEOF_BGP_OPEN_PARAM (3)
|
|
#define PTR_BGP_OPEN_PARAM_TYPE(_P_)\
|
|
((GLUE_CAST_PTR(_P_)))
|
|
#define GET_BGP_OPEN_PARAM_TYPE(_P_)\
|
|
GLUE_GB08((GLUE_CAST_PTR(_P_)))
|
|
#define SET_BGP_OPEN_PARAM_TYPE(_P_, _V_)\
|
|
GLUE_SB08((GLUE_CAST_PTR(_P_)), GLUE_CAST08(_V_))
|
|
#define BGP_OPEN_PARAM_TYPE_is_AUTH GLUE_CAST08(1L)
|
|
#define PTR_BGP_OPEN_PARAM_LENGTH(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(1))
|
|
#define GET_BGP_OPEN_PARAM_LENGTH(_P_)\
|
|
GLUE_GB08((GLUE_CAST_PTR(_P_))+(1))
|
|
#define SET_BGP_OPEN_PARAM_LENGTH(_P_, _V_)\
|
|
GLUE_SB08((GLUE_CAST_PTR(_P_))+(1), GLUE_CAST08(_V_))
|
|
#define PTR_BGP_OPEN_PARAM_AUTH(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(2))
|
|
#define SIZEOF_BGP_OPEN_PARAM_AUTH (1)
|
|
#define PTR_BGP_OPEN_PARAM_AUTH_CODE(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(2))
|
|
#define GET_BGP_OPEN_PARAM_AUTH_CODE(_P_)\
|
|
GLUE_GB08((GLUE_CAST_PTR(_P_))+(2))
|
|
#define SET_BGP_OPEN_PARAM_AUTH_CODE(_P_, _V_)\
|
|
GLUE_SB08((GLUE_CAST_PTR(_P_))+(2), GLUE_CAST08(_V_))
|
|
#define PTR_BGP_OPEN_PARAM_AUTH_DATA(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(3))
|
|
#define SIZEOF_BGP_OPEN_PARAM_AUTH_DATA (0)
|
|
#define PTR_BGP_OPEN_PARAM_AUTH_DATA_ELT(_P_, _X0_)\
|
|
((GLUE_CAST_PTR(_P_))+(3)+(_X0_))
|
|
#define GET_BGP_OPEN_PARAM_AUTH_DATA_ELT(_P_, _X0_)\
|
|
GLUE_GB08((GLUE_CAST_PTR(_P_))+(3)+(_X0_))
|
|
#define SET_BGP_OPEN_PARAM_AUTH_DATA_ELT(_P_, _X0_, _V_)\
|
|
GLUE_SB08((GLUE_CAST_PTR(_P_))+(3)+(_X0_), GLUE_CAST08(_V_))
|
|
|
|
/* Definitions for BGP_UPDATE_MSG */
|
|
|
|
#define SIZEOF_BGP_UPDATE_MSG (19)
|
|
#define PTR_BGP_UPDATE_MSG_INFO(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(19))
|
|
#define SIZEOF_BGP_UPDATE_MSG_INFO (0)
|
|
|
|
/* Definitions for BGP_ATOMIC_AGGREGATE_ATTRIBUTE */
|
|
|
|
#define SIZEOF_BGP_ATOMIC_AGGREGATE_ATTRIBUTE (0)
|
|
|
|
/* Definitions for BGP_AS_PATH_ATTRIBUTE */
|
|
|
|
#define SIZEOF_BGP_AS_PATH_ATTRIBUTE (0)
|
|
#define PTR_BGP_AS_PATH_ATTRIBUTE_SEGMENTS(_P_)\
|
|
((GLUE_CAST_PTR(_P_)))
|
|
#define SIZEOF_BGP_AS_PATH_ATTRIBUTE_SEGMENTS (0)
|
|
|
|
/* Definitions for BGP_MULTI_EXIT_DISC_ATTRIBUTE */
|
|
|
|
#define SIZEOF_BGP_MULTI_EXIT_DISC_ATTRIBUTE (4)
|
|
#define PTR_BGP_MULTI_EXIT_DISC_ATTRIBUTE_METRIC(_P_)\
|
|
((GLUE_CAST_PTR(_P_)))
|
|
#define GET_BGP_MULTI_EXIT_DISC_ATTRIBUTE_METRIC(_P_)\
|
|
GLUE_GB32((GLUE_CAST_PTR(_P_)))
|
|
#define SET_BGP_MULTI_EXIT_DISC_ATTRIBUTE_METRIC(_P_, _V_)\
|
|
GLUE_SB32((GLUE_CAST_PTR(_P_)), GLUE_CAST32(_V_))
|
|
|
|
/* Definitions for BGP_ORIGIN_ATTRIBUTE */
|
|
|
|
#define SIZEOF_BGP_ORIGIN_ATTRIBUTE (1)
|
|
#define GET_BGP_ORIGIN_ATTRIBUTE(_P_)\
|
|
GLUE_GB08((GLUE_CAST_PTR(_P_)))
|
|
#define SET_BGP_ORIGIN_ATTRIBUTE(_P_, _V_)\
|
|
GLUE_SB08((GLUE_CAST_PTR(_P_)), GLUE_CAST08(_V_))
|
|
#define BGP_ORIGIN_ATTRIBUTE_is_IGP GLUE_CAST08(0L)
|
|
#define BGP_ORIGIN_ATTRIBUTE_is_EGP GLUE_CAST08(1L)
|
|
#define BGP_ORIGIN_ATTRIBUTE_is_INCOMPLETE GLUE_CAST08(2L)
|
|
|
|
/* Definitions for BGP_ATTRIBUTE */
|
|
|
|
#define SIZEOF_BGP_ATTRIBUTE (4)
|
|
/* Can't define PTR_BGP_ATTRIBUTE_OPTIONAL because:
|
|
Size 1 is not a multiple of 8. */
|
|
#define GET_BGP_ATTRIBUTE_OPTIONAL(_P_)\
|
|
(GLUE_GB08((GLUE_CAST_PTR(_P_))) & GLUE_CAST08(0x80L))
|
|
#define SET_BGP_ATTRIBUTE_OPTIONAL(_P_, _V_)\
|
|
GLUE_SB08((GLUE_CAST_PTR(_P_)), ((_V_) ? GLUE_GB08((GLUE_CAST_PTR(_P_))) | GLUE_CAST08(0x80L) : GLUE_GB08((GLUE_CAST_PTR(_P_))) & ~GLUE_CAST08(0x80L)))
|
|
/* Can't define PTR_BGP_ATTRIBUTE_TRANSITIVE because:
|
|
Size 1 is not a multiple of 8. */
|
|
#define GET_BGP_ATTRIBUTE_TRANSITIVE(_P_)\
|
|
(GLUE_GB08((GLUE_CAST_PTR(_P_))) & GLUE_CAST08(0x40L))
|
|
#define SET_BGP_ATTRIBUTE_TRANSITIVE(_P_, _V_)\
|
|
GLUE_SB08((GLUE_CAST_PTR(_P_)), ((_V_) ? GLUE_GB08((GLUE_CAST_PTR(_P_))) | GLUE_CAST08(0x40L) : GLUE_GB08((GLUE_CAST_PTR(_P_))) & ~GLUE_CAST08(0x40L)))
|
|
/* Can't define PTR_BGP_ATTRIBUTE_PARTIAL because:
|
|
Size 1 is not a multiple of 8. */
|
|
#define GET_BGP_ATTRIBUTE_PARTIAL(_P_)\
|
|
(GLUE_GB08((GLUE_CAST_PTR(_P_))) & GLUE_CAST08(0x20L))
|
|
#define SET_BGP_ATTRIBUTE_PARTIAL(_P_, _V_)\
|
|
GLUE_SB08((GLUE_CAST_PTR(_P_)), ((_V_) ? GLUE_GB08((GLUE_CAST_PTR(_P_))) | GLUE_CAST08(0x20L) : GLUE_GB08((GLUE_CAST_PTR(_P_))) & ~GLUE_CAST08(0x20L)))
|
|
/* Can't define PTR_BGP_ATTRIBUTE_EXTENDED because:
|
|
Size 1 is not a multiple of 8. */
|
|
#define GET_BGP_ATTRIBUTE_EXTENDED(_P_)\
|
|
(GLUE_GB08((GLUE_CAST_PTR(_P_))) & GLUE_CAST08(0x10L))
|
|
#define SET_BGP_ATTRIBUTE_EXTENDED(_P_, _V_)\
|
|
GLUE_SB08((GLUE_CAST_PTR(_P_)), ((_V_) ? GLUE_GB08((GLUE_CAST_PTR(_P_))) | GLUE_CAST08(0x10L) : GLUE_GB08((GLUE_CAST_PTR(_P_))) & ~GLUE_CAST08(0x10L)))
|
|
#define PTR_BGP_ATTRIBUTE_TYPE(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(1))
|
|
#define GET_BGP_ATTRIBUTE_TYPE(_P_)\
|
|
GLUE_GB08((GLUE_CAST_PTR(_P_))+(1))
|
|
#define SET_BGP_ATTRIBUTE_TYPE(_P_, _V_)\
|
|
GLUE_SB08((GLUE_CAST_PTR(_P_))+(1), GLUE_CAST08(_V_))
|
|
#define BGP_ATTRIBUTE_TYPE_is_ORIGIN GLUE_CAST08(1L)
|
|
#define BGP_ATTRIBUTE_TYPE_is_AS_PATH GLUE_CAST08(2L)
|
|
#define BGP_ATTRIBUTE_TYPE_is_NEXT_HOP GLUE_CAST08(3L)
|
|
#define BGP_ATTRIBUTE_TYPE_is_MULTI_EXIT_DISC GLUE_CAST08(4L)
|
|
#define BGP_ATTRIBUTE_TYPE_is_LOCAL_PREF GLUE_CAST08(5L)
|
|
#define BGP_ATTRIBUTE_TYPE_is_ATOMIC_AGGREGATE GLUE_CAST08(6L)
|
|
#define BGP_ATTRIBUTE_TYPE_is_AGGREGATOR GLUE_CAST08(7L)
|
|
#define PTR_BGP_ATTRIBUTE_SHORT(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(2))
|
|
#define SIZEOF_BGP_ATTRIBUTE_SHORT (1)
|
|
#define PTR_BGP_ATTRIBUTE_SHORT_LENGTH(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(2))
|
|
#define GET_BGP_ATTRIBUTE_SHORT_LENGTH(_P_)\
|
|
GLUE_GB08((GLUE_CAST_PTR(_P_))+(2))
|
|
#define SET_BGP_ATTRIBUTE_SHORT_LENGTH(_P_, _V_)\
|
|
GLUE_SB08((GLUE_CAST_PTR(_P_))+(2), GLUE_CAST08(_V_))
|
|
#define PTR_BGP_ATTRIBUTE_SHORT_DATA(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(3))
|
|
#define SIZEOF_BGP_ATTRIBUTE_SHORT_DATA (0)
|
|
#define PTR_BGP_ATTRIBUTE_LONG(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(2))
|
|
#define SIZEOF_BGP_ATTRIBUTE_LONG (2)
|
|
#define PTR_BGP_ATTRIBUTE_LONG_LENGTH(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(2))
|
|
#define GET_BGP_ATTRIBUTE_LONG_LENGTH(_P_)\
|
|
GLUE_GB16((GLUE_CAST_PTR(_P_))+(2))
|
|
#define SET_BGP_ATTRIBUTE_LONG_LENGTH(_P_, _V_)\
|
|
GLUE_SB16((GLUE_CAST_PTR(_P_))+(2), GLUE_CAST16(_V_))
|
|
#define PTR_BGP_ATTRIBUTE_LONG_DATA(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(4))
|
|
#define SIZEOF_BGP_ATTRIBUTE_LONG_DATA (0)
|
|
|
|
/* Definitions for BGP_NEXT_HOP_ATTRIBUTE */
|
|
|
|
#define SIZEOF_BGP_NEXT_HOP_ATTRIBUTE (4)
|
|
#define PTR_BGP_NEXT_HOP_ATTRIBUTE_ROUTER(_P_)\
|
|
((GLUE_CAST_PTR(_P_)))
|
|
|
|
/* Definitions for BGP_PATH_SEGMENT */
|
|
|
|
#define SIZEOF_BGP_PATH_SEGMENT (2)
|
|
#define PTR_BGP_PATH_SEGMENT_TYPE(_P_)\
|
|
((GLUE_CAST_PTR(_P_)))
|
|
#define GET_BGP_PATH_SEGMENT_TYPE(_P_)\
|
|
GLUE_GB08((GLUE_CAST_PTR(_P_)))
|
|
#define SET_BGP_PATH_SEGMENT_TYPE(_P_, _V_)\
|
|
GLUE_SB08((GLUE_CAST_PTR(_P_)), GLUE_CAST08(_V_))
|
|
#define BGP_PATH_SEGMENT_TYPE_is_AS_SET GLUE_CAST08(1L)
|
|
#define BGP_PATH_SEGMENT_TYPE_is_AS_SEQUENCE GLUE_CAST08(2L)
|
|
#define PTR_BGP_PATH_SEGMENT_LENGTH(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(1))
|
|
#define GET_BGP_PATH_SEGMENT_LENGTH(_P_)\
|
|
GLUE_GB08((GLUE_CAST_PTR(_P_))+(1))
|
|
#define SET_BGP_PATH_SEGMENT_LENGTH(_P_, _V_)\
|
|
GLUE_SB08((GLUE_CAST_PTR(_P_))+(1), GLUE_CAST08(_V_))
|
|
#define PTR_BGP_PATH_SEGMENT_AS(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(2))
|
|
#define SIZEOF_BGP_PATH_SEGMENT_AS (0)
|
|
#define PTR_BGP_PATH_SEGMENT_AS_ELT(_P_, _X0_)\
|
|
((GLUE_CAST_PTR(_P_))+(2)+(2)*(_X0_))
|
|
#define GET_BGP_PATH_SEGMENT_AS_ELT(_P_, _X0_)\
|
|
GLUE_GB16((GLUE_CAST_PTR(_P_))+(2)+(2)*(_X0_))
|
|
#define SET_BGP_PATH_SEGMENT_AS_ELT(_P_, _X0_, _V_)\
|
|
GLUE_SB16((GLUE_CAST_PTR(_P_))+(2)+(2)*(_X0_), GLUE_CAST16(_V_))
|
|
|
|
/* Definitions for BGP_AGGREGATOR_ATTRIBUTE */
|
|
|
|
#define SIZEOF_BGP_AGGREGATOR_ATTRIBUTE (6)
|
|
#define PTR_BGP_AGGREGATOR_ATTRIBUTE_AS(_P_)\
|
|
((GLUE_CAST_PTR(_P_)))
|
|
#define GET_BGP_AGGREGATOR_ATTRIBUTE_AS(_P_)\
|
|
GLUE_GB16((GLUE_CAST_PTR(_P_)))
|
|
#define SET_BGP_AGGREGATOR_ATTRIBUTE_AS(_P_, _V_)\
|
|
GLUE_SB16((GLUE_CAST_PTR(_P_)), GLUE_CAST16(_V_))
|
|
#define PTR_BGP_AGGREGATOR_ATTRIBUTE_ADDRESS(_P_)\
|
|
((GLUE_CAST_PTR(_P_))+(2))
|
|
|
|
#endif /* EPILOGUE_LAYOUT_BGP_H */
|