|
OpenSDN source code
|
#include <sandesh.h>


Classes | |
| struct | SandeshRole |
Public Types | |
| typedef WorkQueue< SandeshRequest * > | SandeshRxQueue |
| typedef WorkQueue< SandeshElement > | SandeshQueue |
| typedef WorkQueue< boost::shared_ptr< contrail::sandesh::transport::TMemoryBuffer > > | SandeshBufferQueue |
| typedef boost::asio::ip::tcp::endpoint | Endpoint |
| typedef boost::function< void(Sandesh *)> | SandeshCallback |
| typedef boost::tuple< size_t, SandeshLevel::type, bool, bool > | QueueWaterMarkInfo |
| typedef std::map< std::string, std::map< std::string, std::string > > | DerivedStats |
Public Member Functions | |
| virtual size_t | GetSize () const =0 |
| virtual void | Release () |
| virtual void | Log () const =0 |
| virtual void | ForcedLog () const =0 |
| virtual std::string | ToString () const =0 |
| virtual std::string | ModuleName () const =0 |
| virtual int32_t | Read (boost::shared_ptr< contrail::sandesh::protocol::TProtocol > iprot)=0 |
| virtual int32_t | Write (boost::shared_ptr< contrail::sandesh::protocol::TProtocol > oprot) const =0 |
| virtual const uint32_t | seqnum () |
| virtual const int32_t | versionsig () const =0 |
| virtual const char * | Name () const |
| bool | Enqueue (SandeshQueue *queue) |
| virtual int32_t | WriteBinary (u_int8_t *buf, u_int32_t buf_len, int *error) |
| virtual int32_t | ReadBinary (u_int8_t *buf, u_int32_t buf_len, int *error) |
| virtual int32_t | WriteBinaryToFile (const std::string &path, int *error) |
| virtual int32_t | ReadBinaryFromFile (const std::string &path, int *error) |
| bool | IsLoggingAllowed () const |
| time_t | timestamp () const |
| void | set_context (std::string context) |
| std::string | context () const |
| void | set_scope (std::string scope) |
| std::string | scope () const |
| SandeshType::type | type () const |
| void | set_hints (int32_t hints) |
| int32_t | hints () const |
| void | set_level (SandeshLevel::type level) |
| SandeshLevel::type | level () const |
| void | set_category (std::string category) |
| std::string | category () const |
Static Public Member Functions | |
| static bool | InitGenerator (const std::string &module, const std::string &source, const std::string &node_type, const std::string &instance_id, EventManager *evm, unsigned short http_port, const std::vector< std::string > &collectors, SandeshContext *client_context=NULL, DerivedStats ds=DerivedStats(), const SandeshConfig &config=SandeshConfig()) |
| static bool | InitGenerator (const std::string &module, const std::string &source, const std::string &node_type, const std::string &instance_id, EventManager *evm, unsigned short http_port, SandeshContext *client_context=NULL, DerivedStats ds=DerivedStats(), const SandeshConfig &config=SandeshConfig()) |
| static void | RecordPort (const std::string &name, const std::string &module, unsigned short port) |
| static bool | InitCollector (const std::string &module, const std::string &source, const std::string &node_type, const std::string &instance_id, EventManager *evm, const std::string &collector_ip, int collector_port, unsigned short http_port, SandeshContext *client_context=NULL, const SandeshConfig &config=SandeshConfig()) |
| static bool | InitGeneratorTest (const std::string &module, const std::string &source, const std::string &node_type, const std::string &instance_id, EventManager *evm, unsigned short http_port, SandeshContext *client_context=NULL, const SandeshConfig &config=SandeshConfig()) |
| static bool | ConnectToCollector (const std::string &collector_ip, int collector_port, bool periodicuve=false) |
| static void | ReConfigCollectors (const std::vector< std::string > &collector_list) |
| static void | Uninit () |
| static void | SetDscpValue (uint8_t value) |
| static void | DisableFlowCollection (bool disable) |
| static bool | IsFlowCollectionDisabled () |
| static void | DisableSendingAllMessages (bool disable) |
| static bool | IsSendingAllMessagesDisabled () |
| static void | DisableSendingObjectLogs (bool disable) |
| static bool | IsSendingObjectLogsDisabled () |
| static bool | IsSendingSystemLogsDisabled () |
| static void | DisableSendingFlows (bool disable) |
| static bool | IsSendingFlowsDisabled () |
| static void | set_send_rate_limit (int rate_limit) |
| static uint32_t | get_send_rate_limit () |
| static void | SetLoggingParams (bool enable_local_log, std::string category, std::string level, bool enable_trace_print=false, bool enable_flow_log=false, bool enable_session_syslog=false) |
| static void | SetLoggingParams (bool enable_local_log, std::string category, SandeshLevel::type level, bool enable_trace_print=false, bool enable_flow_log=false) |
| static void | SetLoggingLevel (std::string level) |
| static void | SetLoggingLevel (SandeshLevel::type level) |
| static SandeshLevel::type | LoggingLevel () |
| static SandeshLevel::type | LoggingUtLevel () |
| static bool | IsLocalLoggingEnabled () |
| static void | SetLocalLogging (bool enable) |
| static bool | IsFlowLoggingEnabled () |
| static bool | IsSloSyslogEnabled () |
| static void | SetFlowLogging (bool enable) |
| static void | SetSessionSyslogging (bool enable_session_syslog) |
| static bool | IsTracePrintEnabled () |
| static void | SetTracePrint (bool enable) |
| static void | SetLoggingCategory (std::string category) |
| static std::string | LoggingCategory () |
| static void | SetSendQueue (bool enable) |
| static bool | IsSendQueueEnabled () |
| static bool | IsConnectToCollectorEnabled () |
| static SandeshLevel::type | SendingLevel () |
| static int32_t | ReceiveBinaryMsgOne (u_int8_t *buf, u_int32_t buf_len, int *error, SandeshContext *client_context) |
| static int32_t | ReceiveBinaryMsg (u_int8_t *buf, u_int32_t buf_len, int *error, SandeshContext *client_context) |
| static bool | SendReady (SandeshConnection *sconn=NULL) |
| static void | UpdateRxMsgStats (const std::string &msg_name, uint64_t bytes) |
| static void | UpdateRxMsgFailStats (const std::string &msg_name, uint64_t bytes, SandeshRxDropReason::type dreason) |
| static void | UpdateTxMsgStats (const std::string &msg_name, uint64_t bytes) |
| static void | UpdateTxMsgFailStats (const std::string &msg_name, uint64_t bytes, SandeshTxDropReason::type dreason) |
| static void | GetMsgStats (std::vector< SandeshMessageTypeStats > *mtype_stats, SandeshMessageStats *magg_stats) |
| static void | GetMsgStats (boost::ptr_map< std::string, SandeshMessageTypeStats > *mtype_stats, SandeshMessageStats *magg_stats) |
| static const char * | SandeshRoleToString (SandeshRole::type role) |
| static bool | IsLoggingDroppedAllowed (SandeshType::type) |
| static void | set_source (std::string &source) |
| static std::string | source () |
| static void | set_module (std::string &module) |
| static std::string | module () |
| static void | set_instance_id (std::string &instance_id) |
| static std::string | instance_id () |
| static void | set_node_type (std::string &node_type) |
| static std::string | node_type () |
| static SandeshRole::type | role () |
| static int | http_port () |
| static SandeshRxQueue * | recv_queue () |
| static SandeshContext * | client_context () |
| static void | set_client_context (SandeshContext *context) |
| static SandeshContext * | module_context (const std::string &module_name) |
| static void | set_module_context (const std::string &module_name, SandeshContext *context) |
| static void | set_response_callback (SandeshCallback response_cb) |
| static SandeshCallback | response_callback () |
| static SandeshClient * | client () |
| static SandeshConfig & | config () |
| static const char * | LevelToString (SandeshLevel::type level) |
| static SandeshLevel::type | StringToLevel (std::string level) |
| static log4cplus::Logger & | logger () |
| static log4cplus::Logger & | slo_logger () |
| static log4cplus::Logger & | sampled_logger () |
| static void | set_logger_appender (const std::string &file_name, long max_file_size, int max_backup_index, const std::string &syslog_facility, const std::vector< std::string > &destn, const std::string &ident, bool is_sampled_logger) |
| static void | set_send_to_collector_flags (const std::vector< std::string > &sampled_destination, const std::vector< std::string > &slo_destination) |
| static bool | is_send_slo_to_collector_enabled () |
| static bool | is_send_sampled_to_collector_enabled () |
| static bool | is_send_slo_to_logger_enabled () |
| static bool | is_send_sampled_to_logger_enabled () |
Protected Member Functions | |
| void | set_timestamp (time_t timestamp) |
| void | set_type (SandeshType::type type) |
| void | set_name (const char *name) |
| Sandesh (SandeshType::type type, const std::string &name, uint32_t seqno) | |
| Sandesh (SandeshType::type type, const std::string &name, uint32_t seqno, bool no_time_stamp) | |
| virtual | ~Sandesh () |
| virtual bool | Dispatch (SandeshConnection *sconn=NULL) |
| virtual bool | SendEnqueue () |
Static Protected Member Functions | |
| static bool | HandleTest (SandeshLevel::type level, const std::string &category) |
| static bool | IsUnitTest () |
| static bool | IsLevelUT (SandeshLevel::type level) |
| static bool | IsLevelCategoryLoggingAllowed (SandeshType::type type, SandeshLevel::type level, const std::string &category) |
Static Protected Attributes | |
| static SandeshCallback | response_callback_ = 0 |
| static SandeshClient * | client_ = NULL |
Private Types | |
| typedef std::map< std::string, SandeshContext * > | ModuleContextMap |
Static Private Member Functions | |
| static void | InitReceive (int recv_task_inst=-1) |
| static void | InitClient (EventManager *evm, Endpoint server, const SandeshConfig &config, bool periodicuve) |
| static bool | InitClient (EventManager *evm, const std::vector< std::string > &collectors, const SandeshConfig &config) |
| static bool | ProcessRecv (SandeshRequest *) |
| static bool | Initialize (SandeshRole::type role, const std::string &module, const std::string &source, const std::string &node_type, const std::string &instance_id, EventManager *evm, unsigned short http_port, SandeshContext *client_context=NULL, const SandeshConfig &config=SandeshConfig()) |
Private Attributes | |
| const uint32_t | seqnum_ |
| std::string | context_ |
| time_t | timestamp_ |
| std::string | scope_ |
| SandeshType::type | type_ |
| int32_t | hints_ |
| SandeshLevel::type | level_ |
| std::string | category_ |
| std::string | name_ |
Friends | |
| class | SandeshTracePerfTest |
Definition at line 133 of file cpp/sandesh.h.
| typedef std::map<std::string, std::map<std::string,std::string> > Sandesh::DerivedStats |
Definition at line 151 of file cpp/sandesh.h.
| typedef boost::asio::ip::tcp::endpoint Sandesh::Endpoint |
Definition at line 140 of file cpp/sandesh.h.
|
private |
Definition at line 391 of file cpp/sandesh.h.
| typedef boost::tuple<size_t, SandeshLevel::type, bool, bool> Sandesh::QueueWaterMarkInfo |
Definition at line 150 of file cpp/sandesh.h.
| typedef WorkQueue< boost::shared_ptr<contrail::sandesh::transport::TMemoryBuffer> > Sandesh::SandeshBufferQueue |
Definition at line 139 of file cpp/sandesh.h.
| typedef boost::function<void (Sandesh *)> Sandesh::SandeshCallback |
Definition at line 141 of file cpp/sandesh.h.
| typedef WorkQueue<SandeshElement> Sandesh::SandeshQueue |
Definition at line 136 of file cpp/sandesh.h.
| typedef WorkQueue<SandeshRequest *> Sandesh::SandeshRxQueue |
Definition at line 135 of file cpp/sandesh.h.
|
inlineprotected |
Definition at line 349 of file cpp/sandesh.h.
|
inlineprotected |
|
inlineprotectedvirtual |
Definition at line 371 of file cpp/sandesh.h.
|
inline |
Definition at line 323 of file cpp/sandesh.h.
|
inlinestatic |
Definition at line 309 of file cpp/sandesh.h.
|
inlinestatic |
Definition at line 302 of file cpp/sandesh.h.
|
inlinestatic |
Definition at line 310 of file cpp/sandesh.h.
|
static |
|
inline |
Definition at line 314 of file cpp/sandesh.h.
|
static |
Definition at line 486 of file sandesh.cc.
|
static |
Definition at line 494 of file sandesh.cc.
|
static |
Definition at line 518 of file sandesh.cc.
|
static |
Definition at line 506 of file sandesh.cc.
|
protectedvirtual |
Reimplemented in SandeshUVE, SandeshTrace, and SandeshResponse.
Definition at line 729 of file sandesh.cc.

| bool Sandesh::Enqueue | ( | SandeshQueue * | queue | ) |
|
pure virtual |
|
static |
Definition at line 542 of file sandesh.cc.
|
static |
Definition at line 905 of file sandesh.cc.
|
static |
Definition at line 898 of file sandesh.cc.
|
pure virtual |
|
staticprotected |
Definition at line 968 of file sandesh.cc.
|
inline |
Definition at line 319 of file cpp/sandesh.h.
|
inlinestatic |
Definition at line 300 of file cpp/sandesh.h.
|
staticprivate |
|
staticprivate |
Definition at line 125 of file sandesh.cc.
|
static |
Definition at line 294 of file sandesh.cc.
|
static |
|
static |
|
static |
Definition at line 312 of file sandesh.cc.
|
staticprivate |
|
staticprivate |
|
inlinestatic |
Definition at line 296 of file cpp/sandesh.h.
|
inlinestatic |
Definition at line 340 of file cpp/sandesh.h.
|
inlinestatic |
Definition at line 342 of file cpp/sandesh.h.
|
inlinestatic |
Definition at line 339 of file cpp/sandesh.h.
|
inlinestatic |
Definition at line 341 of file cpp/sandesh.h.
|
inlinestatic |
Definition at line 245 of file cpp/sandesh.h.
|
inlinestatic |
Definition at line 202 of file cpp/sandesh.h.
|
inlinestatic |
Definition at line 228 of file cpp/sandesh.h.
|
staticprotected |
Definition at line 823 of file sandesh.cc.
|
staticprotected |
Definition at line 818 of file sandesh.cc.
|
inlinestatic |
Definition at line 226 of file cpp/sandesh.h.
| bool Sandesh::IsLoggingAllowed | ( | ) | const |
Definition at line 837 of file sandesh.cc.
|
static |
Definition at line 846 of file sandesh.cc.
|
static |
Definition at line 502 of file sandesh.cc.
|
static |
Definition at line 526 of file sandesh.cc.
|
static |
Definition at line 514 of file sandesh.cc.
|
static |
Definition at line 530 of file sandesh.cc.
|
inlinestatic |
Definition at line 242 of file cpp/sandesh.h.
|
inlinestatic |
Definition at line 229 of file cpp/sandesh.h.
|
inlinestatic |
Definition at line 232 of file cpp/sandesh.h.
|
inlinestaticprotected |
Definition at line 378 of file cpp/sandesh.h.
|
inline |
Definition at line 321 of file cpp/sandesh.h.
|
static |
Definition at line 854 of file sandesh.cc.
|
pure virtual |
|
inlinestatic |
Definition at line 326 of file cpp/sandesh.h.
|
inlinestatic |
Definition at line 235 of file cpp/sandesh.h.
|
inlinestatic |
Definition at line 224 of file cpp/sandesh.h.
|
inlinestatic |
Definition at line 225 of file cpp/sandesh.h.
|
inlinestatic |
Definition at line 294 of file cpp/sandesh.h.
|
static |
Definition at line 951 of file sandesh.cc.
|
pure virtual |
|
inlinevirtual |
Definition at line 280 of file cpp/sandesh.h.
|
inlinestatic |
Definition at line 298 of file cpp/sandesh.h.
|
staticprivate |
|
pure virtual |
|
virtual |
Definition at line 592 of file sandesh.cc.
|
virtual |
Definition at line 627 of file sandesh.cc.
|
static |
Definition at line 686 of file sandesh.cc.
|
static |
|
static |
Definition at line 232 of file sandesh.cc.
|
static |
Definition at line 193 of file sandesh.cc.
|
inlinestatic |
Definition at line 301 of file cpp/sandesh.h.
|
inlinevirtual |
Reimplemented in SandeshRequest.
Definition at line 269 of file cpp/sandesh.h.
|
inlinestatic |
Definition at line 308 of file cpp/sandesh.h.
|
inlinestatic |
Definition at line 299 of file cpp/sandesh.h.
|
inlinestatic |
Definition at line 328 of file cpp/sandesh.h.
|
static |
Definition at line 102 of file sandesh.cc.
|
inline |
Definition at line 316 of file cpp/sandesh.h.
|
protectedvirtual |
|
static |
|
static |
|
inlinevirtual |
Reimplemented in SandeshTrace.
Definition at line 278 of file cpp/sandesh.h.
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
static |
|
inlinestatic |
|
static |
Definition at line 959 of file sandesh.cc.
|
inlineprotected |
Definition at line 347 of file cpp/sandesh.h.
|
inlinestatic |
|
inlinestatic |
Definition at line 307 of file cpp/sandesh.h.
|
inline |
|
static |
Definition at line 534 of file sandesh.cc.
|
static |
Definition at line 1058 of file sandesh.cc.
|
inlinestatic |
|
inlineprotected |
|
inlineprotected |
|
static |
|
static |
Definition at line 467 of file sandesh.cc.
|
static |
Definition at line 449 of file sandesh.cc.
|
static |
Definition at line 440 of file sandesh.cc.
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 912 of file sandesh.cc.
|
static |
Definition at line 476 of file sandesh.cc.
|
static |
Definition at line 458 of file sandesh.cc.
|
inlinestatic |
Definition at line 327 of file cpp/sandesh.h.
|
inlinestatic |
Definition at line 292 of file cpp/sandesh.h.
|
static |
Definition at line 863 of file sandesh.cc.
|
inline |
Definition at line 312 of file cpp/sandesh.h.
|
pure virtual |
|
inline |
Definition at line 317 of file cpp/sandesh.h.
|
static |
|
static |
Definition at line 880 of file sandesh.cc.
|
static |
Definition at line 874 of file sandesh.cc.
|
static |
Definition at line 892 of file sandesh.cc.
|
static |
Definition at line 886 of file sandesh.cc.
|
pure virtual |
|
pure virtual |
|
virtual |
Definition at line 573 of file sandesh.cc.
|
virtual |
Definition at line 610 of file sandesh.cc.
|
friend |
Definition at line 389 of file cpp/sandesh.h.
|
private |
Definition at line 447 of file cpp/sandesh.h.
|
staticprotected |
Definition at line 382 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 417 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 435 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 426 of file cpp/sandesh.h.
|
private |
Definition at line 441 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 434 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 436 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 438 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 437 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 420 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 419 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 421 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 425 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 427 of file cpp/sandesh.h.
|
private |
Definition at line 445 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 414 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 413 of file cpp/sandesh.h.
|
private |
Definition at line 446 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 431 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 424 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 422 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 423 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 410 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 418 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 429 of file cpp/sandesh.h.
|
private |
Definition at line 448 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 412 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 415 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 416 of file cpp/sandesh.h.
|
staticprotected |
Definition at line 381 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 409 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 433 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 451 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 453 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 449 of file cpp/sandesh.h.
|
private |
Definition at line 443 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 428 of file cpp/sandesh.h.
|
private |
Definition at line 440 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 432 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 450 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 452 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 411 of file cpp/sandesh.h.
|
staticprivate |
Definition at line 430 of file cpp/sandesh.h.
|
private |
Definition at line 442 of file cpp/sandesh.h.
|
private |
Definition at line 444 of file cpp/sandesh.h.