5 #ifndef vnsw_agent_cmn_hpp
6 #define vnsw_agent_cmn_hpp
8 #include <sys/socket.h>
9 #include <netinet/in.h>
10 #include <arpa/inet.h>
13 #include <boost/intrusive_ptr.hpp>
14 #include <boost/bind.hpp>
15 #include <boost/uuid/uuid.hpp>
16 #include <boost/uuid/uuid_io.hpp>
17 #include <boost/uuid/nil_generator.hpp>
37 #include <sandesh/sandesh_trace.h>
38 #include <sandesh/common/vns_constants.h>
64 static inline void CfgUuidSet(uint64_t ms_long, uint64_t ls_long,
66 for (
int i = 0; i < 8; i++) {
67 u.data[7 - i] = ms_long & 0xFF;
68 ms_long = ms_long >> 8;
71 for (
int i = 0; i < 8; i++) {
72 u.data[15 - i] = ls_long & 0xFF;
73 ls_long = ls_long >> 8;
78 int max_open_fds = sysconf(_SC_OPEN_MAX);
80 for(fd = 3; fd < max_open_fds; fd++)
86 #define OPER_IFMAP_TRACE(obj, ...)\
88 Oper##obj::TraceMsg(OperConfigTraceBuf, __FILE__, __LINE__, __VA_ARGS__);\
91 #define IFMAP_ERROR(obj, ...)\
93 if (LoggingDisabled()) break;\
94 obj::Send(g_vns_constants.CategoryNames.find(Category::IFMAP_AGENT)->second,\
95 SandeshLevel::SYS_ERR, __FILE__, __LINE__, ##__VA_ARGS__);\
std::string AgentBackTrace(int skip)
static bool UnregisterDBTable(DBTable *table, DBTableBase::ListenerId id)
static TaskTrigger * SafeDBUnregister(DBTable *table, DBTableBase::ListenerId id)
static void CloseTaskFds(void)
static void CfgUuidSet(uint64_t ms_long, uint64_t ls_long, boost::uuids::uuid &u)
SandeshTraceBufferPtr OperConfigTraceBuf
void Unregister(ListenerId listener)
static TaskScheduler * GetInstance()
int32_t skip(Protocol_ &prot, TType type)
boost::shared_ptr< TraceBuffer< SandeshTrace > > SandeshTraceBufferPtr