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/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>
49 using namespace boost::placeholders;
66 static inline void CfgUuidSet(uint64_t ms_long, uint64_t ls_long,
68 for (
int i = 0; i < 8; i++) {
69 u.data[7 - i] = ms_long & 0xFF;
70 ms_long = ms_long >> 8;
73 for (
int i = 0; i < 8; i++) {
74 u.data[15 - i] = ls_long & 0xFF;
75 ls_long = ls_long >> 8;
80 int max_open_fds = sysconf(_SC_OPEN_MAX);
82 for(fd = 3; fd < max_open_fds; fd++)
88 #define OPER_IFMAP_TRACE(obj, ...)\
90 Oper##obj::TraceMsg(OperConfigTraceBuf, __FILE__, __LINE__, __VA_ARGS__);\
93 #define IFMAP_ERROR(obj, ...)\
95 if (LoggingDisabled()) break;\
96 obj::Send(g_vns_constants.CategoryNames.find(Category::IFMAP_AGENT)->second,\
97 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