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>
19 #include <tbb/atomic.h>
20 #include <tbb/mutex.h>
40 #include <sandesh/sandesh_trace.h>
41 #include <sandesh/common/vns_constants.h>
67 static inline void CfgUuidSet(uint64_t ms_long, uint64_t ls_long,
69 for (
int i = 0; i < 8; i++) {
70 u.data[7 - i] = ms_long & 0xFF;
71 ms_long = ms_long >> 8;
74 for (
int i = 0; i < 8; i++) {
75 u.data[15 - i] = ls_long & 0xFF;
76 ls_long = ls_long >> 8;
81 int max_open_fds = sysconf(_SC_OPEN_MAX);
83 for(fd = 3; fd < max_open_fds; fd++)
90 #define OPER_IFMAP_TRACE(obj, ...)\
92 Oper##obj::TraceMsg(OperConfigTraceBuf, __FILE__, __LINE__, __VA_ARGS__);\
95 #define IFMAP_ERROR(obj, ...)\
97 if (LoggingDisabled()) break;\
98 obj::Send(g_vns_constants.CategoryNames.find(Category::IFMAP_AGENT)->second,\
99 SandeshLevel::SYS_ERR, __FILE__, __LINE__, ##__VA_ARGS__);\
103 #endif // vnsw_agent_cmn_hpp
static void CloseTaskFds(void)
static void CfgUuidSet(uint64_t ms_long, uint64_t ls_long, boost::uuids::uuid &u)
SandeshTraceBufferPtr OperConfigTraceBuf
boost::shared_ptr< TraceBuffer< SandeshTrace > > SandeshTraceBufferPtr
void Unregister(ListenerId listener)
static bool UnregisterDBTable(DBTable *table, DBTableBase::ListenerId id)
static TaskScheduler * GetInstance()
std::string AgentBackTrace(int skip=1)
static TaskTrigger * SafeDBUnregister(DBTable *table, DBTableBase::ListenerId id)
bool GetBuildInfo(std::string &build_info_str)
int32_t skip(Protocol_ &prot, TType type)