5 #ifndef SRC_BGP_COMMUNITY_H_
6 #define SRC_BGP_COMMUNITY_H_
8 #include <boost/array.hpp>
9 #include <boost/intrusive_ptr.hpp>
10 #include <boost/system/error_code.hpp>
11 #include <tbb/atomic.h>
36 if (ret != 0)
return ret;
38 static_cast<const CommunitySpec &>(rhs_attr).
communities);
42 virtual std::string
ToString()
const;
81 void Append(uint32_t value);
92 return ccomm->
refcount_.fetch_and_increment();
96 return ccomm->
refcount_.fetch_and_decrement();
100 int prev = ccomm->
refcount_.fetch_and_decrement();
118 CommunitySpec, CommunityCompare,
126 const std::vector<uint32_t> &value);
128 const std::vector<uint32_t> &value);
130 const std::vector<uint32_t> &value);
147 virtual std::string
ToString()
const;
191 boost::system::error_code *errorp);
288 std::copy(val.begin(), val.end(), &data[0]);
392 for (ExtCommunityList::const_iterator iter = comm.
communities_.begin();
394 boost::hash_range(hash, iter->begin(), iter->end());
431 return cextcomm->
refcount_.fetch_and_increment();
435 return cextcomm->
refcount_.fetch_and_decrement();
439 int prev = cextcomm->
refcount_.fetch_and_decrement();
503 #endif // SRC_BGP_COMMUNITY_H_
int intrusive_ptr_add_ref(const AsPath *cpath)
#define KEY_COMPARE(x, y)
#define BGP_RTGT_MAX_ID_AS2
static uint64_t get_value(const uint8_t *data, int size)
virtual int CompareTo(const BgpAttribute &rhs) const
int intrusive_ptr_del_ref(const AsPath *cpath)
#define BGP_RTGT_MIN_ID_AS4
#define BGP_RTGT_MAX_ID_AS4
#define BGP_RTGT_MIN_ID_AS2
void intrusive_ptr_release(const AsPath *cpath)