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(),
217 agent()->fabric_vrf_name(), 0,
218 physical_intf->mac(),
"");
220 agent()->fabric_policy_vrf_name(), 0,
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());
294 agent()->params()->loopback_ip() :
295 agent()->params()->vhost_addr(),
296 agent()->fabric_rt_export_peer());
299 if (
agent()->is_l3mh()) {
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(),
327 agent()->fabric_vrf_name(), 0,
328 vmware_intf->
mac(),
"");
330 agent()->fabric_policy_vrf_name(), 0,
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()) {
virtual void ProcessOptions(const std::string &config_file, const std::string &program_name)
void set_services(ServicesModule *services)
ServicesModule * services() const
void set_router_id(const Ip4Address &addr)
virtual void ModulesShutdown()
BridgeAgentRouteTable * fabric_l2_unicast_table() const
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)
const std::string & vhost_name() const
FlowStatsManager * flow_stats_manager() const
std::unique_ptr< DiagTable > diag_table_
Ip4Address GetIp4SubnetBroadcastAddress(const Ip4Address &ip_prefix, uint16_t plen)
VrfEntry * fabric_vrf() const
std::unique_ptr< KSync > ksync_
void set_vhost_interface(const Interface *intrface)
InetUnicastAgentRouteTable * fabric_inet4_unicast_table() const
static PhysicalInterface::EncapType ComputeEncapType(const string &encap)
AgentUveBase * uve() const
string program_name(string filename)
void CreateInterfaces(Interface::Transport transport)
virtual void RegisterDBClients(DB *db)
void ProcessOptions(const std::string &config_file, const std::string &program_name)
std::vector< int > SecurityGroupList
void InitXenLinkLocalIntf()
AgentDBEntry * FindActiveEntry(const DBEntry *key)
InterfaceTable * interface_table() const
std::unique_ptr< AgentUveBase > uve_
MacLearningModule * mac_learning_module() const
void Init(bool run_with_vrouter)
InetUnicastAgentRouteTable * GetInet4MplsUnicastRouteTable() const
std::unique_ptr< ServicesModule > services_
void set_pkt(PktModule *pkt)
std::unique_ptr< MacLearningModule > mac_learning_module_
const MacAddress & mac() const
void set_mac_learning_module(MacLearningModule *mac_learning_module)
DiagTable * diag_table() const
virtual void Init(bool create_vhost)
void Init(uint64_t flow_stats_interval, uint64_t flow_cache_timeout)
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)
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)
MirrorTable * mirror_table() const
const AddressList & compute_node_address_list() const
void MirrorSockInit(void)
bool ksync_enable() const
void set_crypt_interface(const Interface *interface)
void set_vhost_default_gateway(const AddressList &addr_list)
void AddVhostMplsRoute(const IpAddress &vhost_addr, const Peer *peer)
void set_vhost_prefix(const Ip4Address &addr)
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 set_vhost_prefix_len(uint32_t plen)
virtual void RegisterDBClients()
void set_vgw(VirtualGateway *vgw)
void CreateStaticVrf(const string &name)
std::unique_ptr< VirtualGateway > vgw_
boost::asio::ip::address_v4 Ip4Address
void set_compute_node_ip(const Ip4Address &addr)
AgentParam * agent_param() const
static const uint32_t kInvalidLabel
VrfTable * vrf_table() const
virtual ~ContrailInitCommon()
std::vector< Ip4Address > AddressList
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)
void Init(bool run_with_vrouter)
void VnswInterfaceListenerInit()
VirtualGateway * vgw() const
void set_diag_table(DiagTable *table)
void ProcessComputeAddress(AgentParam *param)
const std::vector< std::string > & eth_port_list() const
std::unique_ptr< PktModule > pkt_
std::vector< int > TagList