5 #ifndef SRC_BGP_EXTENDED_COMMUNITY_LOAD_BALANCE_H_
6 #define SRC_BGP_EXTENDED_COMMUNITY_LOAD_BALANCE_H_
8 #include <boost/array.hpp>
9 #include <boost/system/error_code.hpp>
17 #include "bgp/bgp_peer_types.h"
18 #include "schema/xmpp_unicast_types.h"
50 #if BYTE_ORDER == BIG_ENDIAN
95 } __attribute__((packed));
99 } __attribute__((packed));
103 void Encode(autogen::LoadBalanceType *lb_type)
const;
111 explicit LoadBalance(
const LoadBalanceAttribute &attr);
112 explicit LoadBalance(
const autogen::LoadBalanceType &lb_type);
126 void ShowAttribute(ShowLoadBalance *show_load_balance)
const;
void SetSourceBias(bool flag)
static bool IsPresent(const BgpPath *path)
const LoadBalanceAttribute ToAttribute() const
std::string ToString() const
boost::array< uint8_t, kSize > bytes_type
const bool IsDefault() const
const uint64_t GetExtCommunityValue() const
bool operator!=(const LoadBalance &other) const
void SetL3SourceAddress(bool flag)
void ShowAttribute(ShowLoadBalance *show_load_balance) const
bool operator==(const LoadBalance &other) const
void SetL3DestinationAddress(bool flag)
void SetL4SourcePort(bool flag)
void FillAttribute(LoadBalanceAttribute *attr)
void SetL4DestinationPort(bool flag)
const bytes_type & GetExtCommunity() const
void SetL4Protocol(bool flag)
static uint64_t get_value(const uint8_t *data, int size)
uint8_t l3_source_address
uint8_t l3_destination_address
void Encode(autogen::LoadBalanceType *lb_type) const
bool operator!=(const LoadBalanceAttribute &other) const
const bool IsDefault() const
static const LoadBalanceAttribute kDefaultLoadBalanceAttribute
uint8_t l4_destination_port
bool operator==(const LoadBalanceAttribute &other) const