diff options
author | Timo Teräs <timo.teras@iki.fi> | 2016-03-30 13:44:03 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2016-03-30 14:29:40 +0300 |
commit | 8cb40c91cdfb00ddf04e88d3ecd40403890d90f7 (patch) | |
tree | 6d6a3de27525820abb740f1fa8347b6f03986bad /bgpd/bgp_attr.h | |
parent | 86c5d2ee68f7b9c00ae4aeb5c8b3c5d82c5ebffc (diff) | |
download | quagga-cumulus-take-3.tar.bz2 quagga-cumulus-take-3.tar.xz |
cumulus take-3cumulus-take-3
Diffstat (limited to 'bgpd/bgp_attr.h')
-rw-r--r-- | bgpd/bgp_attr.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/bgpd/bgp_attr.h b/bgpd/bgp_attr.h index fe6c2a1a..87310d50 100644 --- a/bgpd/bgp_attr.h +++ b/bgpd/bgp_attr.h @@ -93,6 +93,9 @@ struct attr_extra uint16_t encap_tunneltype; /* grr */ struct bgp_attr_encap_subtlv *encap_subtlvs; /* rfc5512 */ + + /* route tag */ + u_short tag; }; /* BGP core attribute structure. */ @@ -117,6 +120,7 @@ struct attr struct in_addr nexthop; u_int32_t med; u_int32_t local_pref; + ifindex_t nh_ifindex; /* Path origin attribute */ u_char origin; @@ -140,6 +144,10 @@ struct transit #define ATTR_FLAG_BIT(X) (1 << ((X) - 1)) +#define BGP_CLUSTER_LIST_LENGTH(attr) \ + (((attr)->flag & ATTR_FLAG_BIT(BGP_ATTR_CLUSTER_LIST)) ? \ + (attr)->extra->cluster->length : 0) + typedef enum { BGP_ATTR_PARSE_PROCEED = 0, BGP_ATTR_PARSE_ERROR = -1, @@ -158,6 +166,8 @@ extern bgp_attr_parse_ret_t bgp_attr_parse (struct peer *, struct attr *, extern struct attr_extra *bgp_attr_extra_get (struct attr *); extern void bgp_attr_extra_free (struct attr *); extern void bgp_attr_dup (struct attr *, struct attr *); +extern void bgp_attr_deep_dup (struct attr *, struct attr *); +extern void bgp_attr_deep_free (struct attr *); extern struct attr *bgp_attr_intern (struct attr *attr); extern void bgp_attr_unintern_sub (struct attr *); extern void bgp_attr_unintern (struct attr **); @@ -166,7 +176,7 @@ extern struct attr *bgp_attr_default_set (struct attr *attr, u_char); extern struct attr *bgp_attr_default_intern (u_char); extern struct attr *bgp_attr_aggregate_intern (struct bgp *, u_char, struct aspath *, - struct community *, int as_set); + struct community *, int as_set, u_char); extern bgp_size_t bgp_packet_attribute (struct bgp *bgp, struct peer *, struct stream *, struct attr *, struct prefix *, afi_t, safi_t, |