16 allocator_(allocator), index_(-1), intf_(intf),
17 intf_label_(
MplsTable::kInvalidLabel), service_ip_(), destination_ip_(),
18 active_(false), type_(type), insert_metadata_ip_(insert_metadata_ip),
27 uint16_t index,
bool ipv4) :
28 allocator_(allocator), index_(index), intf_(intf),
29 intf_label_(
MplsTable::kInvalidLabel), service_ip_(), destination_ip_(),
30 active_(false), type_(LINKLOCAL), ipv4_(ipv4) {
49 Ip4Address MetaDataIp::IndexToIpAddress<Ip4Address>(uint32_t idx) {
51 ip += (((uint32_t)idx) & 0xFFFF);
56 Ip6Address MetaDataIp::IndexToIpAddress<Ip6Address>(uint32_t idx) {
57 Ip6Address::bytes_type ip_bytes =
58 {0xFE, 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
59 (uint32_t)idx & 0xFF00,
60 (uint32_t)idx & 0x00FF};
65 uint32_t MetaDataIp::IpAddressToIndex<Ip4Address>(
const Ip4Address& ip) {
66 uint32_t idx = ip.to_ulong();
74 uint32_t MetaDataIp::IpAddressToIndex<Ip6Address>(
const Ip6Address& ip) {
75 uint32_t idx = ip.to_bytes()[15] + (ip.to_bytes()[14] << 8);
87 return IndexToIpAddress<Ip4Address>(
index_);
91 return IndexToIpAddress<Ip6Address>(
index_);
161 agent_(agent), index_table_(), start_(start), end_(end) {
168 uint16_t index =
end_ - id;
175 return (
end_ - index);
179 assert(id <= end_ && id >=
start_);
180 uint16_t index =
end_ - id;
220 Ip4Address(0), ecmp_load_balance,
false,
false,
false,
233 Ip6Address(), ecmp_load_balance,
false,
false,
false,
EntryType At(size_t index) const
void SetPathPreference(PathPreference *pref, bool ecmp, const IpAddress &dependent_ip) const
void AddLocalVmRouteReq(const Peer *peer, const string &vm_vrf, const IpAddress &addr, uint8_t plen, LocalVmRoute *data)
const boost::uuids::uuid & GetUuid() const
boost::asio::ip::address IpAddress
std::vector< int > SecurityGroupList
IpAddress service_health_check_ip() const
IpAddress GetServiceIp(const IpAddress &ip) const
InetUnicastAgentRouteTable * GetInet4UnicastRouteTable(const std::string &vrf_name)
void Remove(size_t index)
const std::string & fabric_vrf_name() const
size_t Insert(EntryType entry)
const Peer * link_local_peer() const
static void Delete(const Peer *peer, const string &vrf_name, const IpAddress &addr, uint8_t plen)
boost::asio::ip::address_v6 Ip6Address
const VnEntry * vn() const
std::vector< std::string > CommunityList
std::set< std::string > VnListType
boost::asio::ip::address_v4 Ip4Address
static const uint32_t kInvalidLabel
void DeleteMetaDataIpInfo(MetaDataIp *mip)
VrfTable * vrf_table() const
const Ip4Address & primary_ip_addr() const
void InsertMetaDataIpInfo(MetaDataIp *mip)
VmInterface::VmiType vmi_type() const
const std::string & name() const
const string & GetName() const
InetUnicastAgentRouteTable * GetInet6UnicastRouteTable(const std::string &vrf_name)
size_t InsertAtIndex(uint32_t index, EntryType entry)
std::vector< int > TagList