5 #ifndef vnsw_agent_dns_proto_hpp
6 #define vnsw_agent_dns_proto_hpp
10 #include "vnc_cfg_types.h"
37 DnsIpc(uint8_t *msg, std::size_t len, uint16_t
id,
56 const std::string &ovdns,
const std::string &dom,
57 uint32_t ttl_value,
bool is_floating)
91 return lhs->
itf < rhs->
itf;
138 typedef std::set<DnsFipEntryPtr, DnsFipEntryCmp>
DnsFipSet;
145 typedef std::map<const VmInterface *, IpVdnsMap>
VmDataMap;
146 typedef std::pair<const VmInterface *, IpVdnsMap>
VmDataPair;
158 boost::asio::io_context &
io);
162 const std::string &vdns_name,
163 const autogen::VirtualDnsType &vdns_type,
164 bool is_floating,
bool is_delete);
171 void SendDnsIpc(uint8_t *pkt, std::size_t length);
177 const std::string &old_vdns,
178 const std::string &new_dom,
179 uint32_t ttl,
bool is_floating);
230 void ProcessNotify(std::string name,
bool is_deleted,
bool is_ipam);
233 const Ip6Address &ip6, std::string &vdns_name,
234 const autogen::VirtualDnsType &vdns_type);
236 const autogen::VirtualDnsType &vdns_type);
238 const std::string &vm_name,
239 const std::string &vdns_name,
242 bool is_floating,
bool is_deleted);
244 std::string &new_vdns_name,
245 std::string &old_vdns_name,
246 const autogen::VirtualDnsType &vdns_type,
249 const Ip6Address &v6_addr, std::string &vdns_name,
250 autogen::VirtualDnsType &vdns_type);
252 const autogen::VirtualDnsType &vdns_type,
253 const IpAddress &ip, std::string &fip_name)
const;
boost::asio::ip::address_v6 Ip6Address
boost::asio::ip::address IpAddress
boost::asio::ip::address_v4 Ip4Address
bool operator()(const DnsFipEntryPtr &lhs, const DnsFipEntryPtr &rhs) const
std::pair< uint32_t, int16_t > DnsBindQueryIndexPair
void DelDnsQuery(uint16_t xid)
const DnsFipSet & fip_list() const
DefaultServerList GetDefaultServerList()
void InterfaceNotify(DBEntryBase *entry)
bool SendUpdateDnsEntry(const VmInterface *vmitf, const std::string &name, const Ip4Address &ip, uint32_t plen, const Ip6Address &ip6, uint32_t plen6, const std::string &vdns_name, const autogen::VirtualDnsType &vdns_type, bool is_floating, bool is_delete)
void CheckForFipUpdate(DnsFipEntry *entry, std::string &vdns_name, const autogen::VirtualDnsType &vdns_type)
DBTableBase::ListenerId vrf_table_listener_id_
DISALLOW_COPY_AND_ASSIGN(DnsProto)
void AddDnsQueryIndex(uint16_t xid, int16_t srv_idx)
@ DNS_XMPP_UPDATE_RESPONSE
@ DNS_XMPP_SEND_UPDATE_ALL
bool UpdateDnsEntry(const VmInterface *vmitf, const VnEntry *vn, const std::string &vm_name, const std::string &vdns_name, const Ip4Address &ip, const Ip6Address &ip6, bool is_floating, bool is_deleted)
DBTableBase::ListenerId lid_
DefaultServerList BuildDefaultServerListImpl()
static const uint32_t kDnsDefaultTtl
std::map< uint32_t, DnsHandler * > DnsBindQueryMap
bool IsDnsQueryInProgress(uint16_t xid)
void SendDnsIpc(uint8_t *pkt, std::size_t length)
const DnsUpdateSet & update_set() const
void IncrStatsRetransmitReq()
void VdnsNotify(IFMapNode *node)
const VmDataMap & all_vms() const
void set_timeout(uint32_t timeout)
DnsHandler * GetDnsQueryHandler(uint16_t xid)
std::pair< uint32_t, DnsHandler * > DnsBindQueryPair
bool BuildDefaultServerList()
std::map< const VmInterface *, IpVdnsMap > VmDataMap
void SendDnsUpdateIpc(DnsUpdateData *data, DnsAgentXmpp::XmppType type, const VmInterface *vm, bool floating)
void AddVmRequest(DnsHandler::QueryKey *key)
ProtoHandler * AllocProtoHandler(boost::shared_ptr< PktInfo > info, boost::asio::io_context &io)
std::set< DnsUpdateIpc *, UpdateCompare > DnsUpdateSet
void DelDnsQueryIndex(uint16_t xid)
void set_max_retries(uint32_t retries)
bool GetFipName(const VmInterface *vmitf, const autogen::VirtualDnsType &vdns_type, const IpAddress &ip, std::string &fip_name) const
void AddUpdateRequest(DnsUpdateIpc *ipc)
std::map< uint32_t, std::string > IpVdnsMap
bool MoveVDnsEntry(const VmInterface *vmitf, std::string &new_vdns_name, std::string &old_vdns_name, const autogen::VirtualDnsType &vdns_type, bool is_floating)
bool IsDnsHandlerInUse(DnsHandler *handler)
DnsVmRequestSet curr_vm_requests_
void VnNotify(DBEntryBase *entry)
uint32_t max_retries() const
std::set< DnsFipEntryPtr, DnsFipEntryCmp > DnsFipSet
const DnsStats & GetStats() const
static const Ip4Address ip4_unspec_
std::map< uint32_t, int16_t > DnsBindQueryIndexMap
DnsBindQueryIndexMap dns_query_index_map_
void ProcessNotify(std::string name, bool is_deleted, bool is_ipam)
bool GetVdnsData(const VnEntry *vn, const Ip4Address &v4_addr, const Ip6Address &v6_addr, std::string &vdns_name, autogen::VirtualDnsType &vdns_type)
bool IsVmRequestDuplicate(DnsHandler::QueryKey *key)
void AddDnsQuery(uint16_t xid, DnsHandler *handler)
DnsBindQueryMap dns_query_map_
std::set< DnsHandler::QueryKey > DnsVmRequestSet
void DelUpdateRequest(DnsUpdateIpc *ipc)
void IpamNotify(IFMapNode *node)
DBTableBase::ListenerId Vnlid_
void CheckForUpdate(IpVdnsMap &ipvdns, const VmInterface *vmitf, const VnEntry *vn, const Ip4Address &ip, const Ip6Address &ip6, std::string &vdns_name, const autogen::VirtualDnsType &vdns_type)
std::pair< uint32_t, std::string > IpVdnsPair
bool UpdateFloatingIp(const VmInterface *vmitf, const VnEntry *vn, const IpAddress &ip, bool is_deleted)
boost::shared_ptr< DnsFipEntry > DnsFipEntryPtr
DnsProto(Agent *agent, boost::asio::io_context &io)
DefaultServerList def_server_list_
int16_t GetDnsQueryServerIndex(uint16_t xid)
Timer * default_slist_timer_
static const Ip6Address ip6_unspec_
void VrfNotify(DBEntryBase *entry)
std::pair< const VmInterface *, IpVdnsMap > VmDataPair
std::vector< IpAddress > DefaultServerList
void DelDnsQueryHandler(DnsHandler *handler)
static const uint32_t kDnsDefaultSlistInterval
void DelVmRequest(DnsHandler::QueryKey *key)
DnsUpdateIpc * FindUpdateRequest(DnsUpdateIpc *ipc)
bool IsLess(const DnsFipEntry *rhs) const
const VmInterface * interface_
DnsFipEntry(const VnEntry *vn, const IpAddress &fip, const VmInterface *itf)
DnsIpc(uint8_t *msg, std::size_t len, uint16_t id, DnsHandler *h, InterTaskMessage cmd)
DnsUpdateAllIpc(AgentDnsXmppChannel *ch)
AgentDnsXmppChannel * channel
DnsUpdateIpc(DnsAgentXmpp::XmppType type, DnsUpdateData *data, const VmInterface *vm, bool floating)
DnsUpdateIpc(const VmInterface *vm, const std::string &nvdns, const std::string &ovdns, const std::string &dom, uint32_t ttl_value, bool is_floating)
DnsUpdateData * xmpp_data
bool operator()(DnsUpdateIpc *const &lhs, DnsUpdateIpc *const &rhs) const