32 ksync_enable_(true), services_enable_(true), packet_enable_(true),
33 uve_enable_(true), vgw_enable_(true), router_id_dep_enable_(true) {
48 (
const std::string &config_file,
const std::string &
program_name) {
82 if (
agent()->ksync()) {
90 if (
agent()->flow_stats_manager()) {
97 if(
agent()->params()->cat_is_dpdk_mocked()) {
101 if (
agent()->pkt()) {
105 if (
agent()->services()) {
109 if (
agent()->uve()) {
113 if (
agent()->ksync()) {
117 if (
agent()->mac_learning_module()) {
121 if (
agent()->flow_stats_manager()) {
123 agent()->params()->flow_cache_timeout());
130 if (
agent()->isXenMode()) {
135 if (
agent()->vgw()) {
141 if (encap ==
"none") {
153 AgentParam::AddressList::const_iterator it = addr_list.begin();
154 while (it != addr_list.end()) {
156 boost::uuids::nil_uuid(),
159 agent()->fabric_vrf_name(),
161 agent()->fabric_vn_name(),
false,
202 agent()->fabric_vrf_name(),
205 boost::uuids::nil_uuid(),
218 physical_intf->
mac(),
"");
221 physical_intf->
mac(),
"");
225 boost::uuids::nil_uuid(),
226 agent()->params()->vhost_name());
229 agent()->fabric_vrf_name(), vmi_key,
231 agent()->fabric_vn_name(),
false,
true);
234 agent()->fabric_vrf_name(), vmi_key,
238 32,
agent()->fabric_vn_name(),
false);
241 agent()->fabric_vrf_name(),
245 false,
agent()->fabric_vn_name(),
250 if (
agent()->is_l3mh()) {
261 agent()->fabric_vrf_name(),
264 boost::uuids::nil_uuid(),
270 assert(
agent()->crypt_interface());
277 if (
agent()->tsn_enabled()) {
283 agent()->vhost_interface_name());
287 assert(
agent()->vhost_interface());
304 boost::uuids::nil_uuid(),
305 agent()->params()->vhost_name());
307 agent()->fabric_vrf_name(),
308 vmi_key,
agent()->params()->loopback_ip(), 32,
309 agent()->fabric_vn_name(),
false,
317 agent()->fabric_vrf_name(),
328 vmware_intf->
mac(),
"");
331 vmware_intf->
mac(),
"");
338 if (
agent()->vgw()) {
349 if (
agent()->services()) {
354 if (
agent()->pkt()) {
369 if (
agent()->pkt()) {
373 if (
agent()->uve()) {
377 if (
agent()->ksync()) {
381 if (
agent()->oper_db()) {
393 if (
agent()->services())
403 if (
agent()->services())
406 if (
agent()->mac_learning_module()) {
412 if (
agent()->pkt()) {
418 if (
agent()->diag_table()) {
boost::asio::ip::address_v4 Ip4Address
Ip4Address GetIp4SubnetBroadcastAddress(const Ip4Address &ip_prefix, uint16_t plen)
std::vector< int > TagList
std::vector< int > SecurityGroupList
AgentDBEntry * FindActiveEntry(const DBEntry *key)
virtual void ProcessOptions(const std::string &config_file, const std::string &program_name)
AgentParam * agent_param() const
const std::string & vhost_name() const
const Ip4Address & vhost_addr() const
std::vector< Ip4Address > AddressList
const Ip4Address & loopback_ip() const
const std::vector< std::string > & eth_port_list() const
const AddressList & compute_node_address_list() const
virtual void RegisterDBClients()
InterfaceTable * interface_table() const
ServicesModule * services() const
VirtualGateway * vgw() const
BridgeAgentRouteTable * fabric_l2_unicast_table() const
void set_vhost_prefix(const Ip4Address &addr)
MacLearningModule * mac_learning_module() const
void set_crypt_interface(const Interface *interface)
FlowStatsManager * flow_stats_manager() const
AgentParam * params() const
void InitXenLinkLocalIntf()
void set_mac_learning_module(MacLearningModule *mac_learning_module)
const std::string & fabric_policy_vrf_name() const
MirrorTable * mirror_table() const
void set_vhost_default_gateway(const AddressList &addr_list)
VrfTable * vrf_table() const
AgentUveBase * uve() const
void set_vhost_prefix_len(uint32_t plen)
const Peer * fabric_rt_export_peer() const
const Peer * local_vm_peer() const
void set_pkt(PktModule *pkt)
void set_diag_table(DiagTable *table)
void set_router_id(const Ip4Address &addr)
void set_vgw(VirtualGateway *vgw)
VrfEntry * fabric_vrf() const
void set_services(ServicesModule *services)
void set_vhost_interface(const Interface *intrface)
InetUnicastAgentRouteTable * fabric_inet4_unicast_table() const
void set_compute_node_ip(const Ip4Address &addr)
DiagTable * diag_table() const
const std::string & fabric_vrf_name() const
static void AddBridgeReceiveRoute(const Peer *peer, const std::string &vrf_name, const MacAddress &mac, const std::string &vn_name, const std::string &interface, bool policy)
std::unique_ptr< DiagTable > diag_table_
void ProcessOptions(const std::string &config_file, const std::string &program_name)
virtual ~ContrailInitCommon()
std::unique_ptr< AgentUveBase > uve_
std::unique_ptr< KSync > ksync_
bool ksync_enable() const
std::unique_ptr< MacLearningModule > mac_learning_module_
std::unique_ptr< PktModule > pkt_
std::unique_ptr< ServicesModule > services_
void ProcessComputeAddress(AgentParam *param)
virtual void ModulesShutdown()
std::unique_ptr< VirtualGateway > vgw_
void Init(uint64_t flow_stats_interval, uint64_t flow_cache_timeout)
static void AddResolveRoute(const Peer *peer, const string &vrf_name, const Ip4Address &ip, const uint8_t plen, const InterfaceKey &intf_key, const uint32_t label, bool policy, const std::string &vn_name, const SecurityGroupList &sg_list, const TagList &tag_list)
static void AddVHostRecvRouteReq(const Peer *peer, const string &vrf, const InterfaceKey &interface, const IpAddress &addr, uint8_t plen, const string &vn_name, bool policy, bool native_encap)
static void AddVHostSubnetRecvRoute(const Peer *peer, const string &vrf, const InterfaceKey &interface, const Ip4Address &addr, uint8_t plen, const std::string &vn_name, bool policy)
void AddVhostMplsRoute(const IpAddress &vhost_addr, const Peer *peer)
const MacAddress & mac() const
virtual void RegisterDBClients(DB *db)
virtual void Init(bool create_vhost)
void VnswInterfaceListenerInit()
void MirrorSockInit(void)
static const uint32_t kInvalidLabel
static void Create(InterfaceTable *table, const std::string &ifname, const std::string &vrf_name, SubType subtype, EncapType encap, bool no_arp, const boost::uuids::uuid &device_uuid, const Ip4Address &ip, Interface::Transport transport_)
void Init(bool run_with_vrouter)
void Init(bool run_with_vrouter)
void CreateInterfaces(Interface::Transport transport)
InetUnicastAgentRouteTable * GetInet4MplsUnicastRouteTable() const
void CreateStaticVrf(const string &name)
static PhysicalInterface::EncapType ComputeEncapType(const string &encap)
string program_name(string filename)