OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sandesh.h File Reference
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <arpa/inet.h>
#include <syslog.h>
#include <sys/errno.h>
#include "thrift.h"
#include "transport/thrift_transport.h"
#include "transport/thrift_memory_buffer.h"
#include "transport/thrift_fake_transport.h"
#include "transport/thrift_file_transport.h"
#include "protocol/thrift_protocol.h"
#include "protocol/thrift_binary_protocol.h"
#include "protocol/thrift_xml_protocol.h"
Include dependency graph for sandesh.h:

Go to the source code of this file.

Classes

struct  ipaddr_s
 
struct  sandesh_info_s
 

Macros

#define OS_LOG_ERR   LOG_ERR
 
#define OS_LOG_DEBUG   LOG_DEBUG
 
#define os_malloc(size)   malloc(size)
 
#define os_zalloc(size)   calloc(1, size)
 
#define os_realloc(ptr, size)   realloc(ptr, size)
 
#define os_free(ptr)   free(ptr)
 
#define os_log(level, format, arg...)   syslog(level, format, ##arg)
 

Typedefs

typedef unsigned char ct_uuid_t [16]
 
typedef struct ipaddr_s ipaddr_t
 
typedef struct sandesh_info_s sandesh_info_t
 
typedef sandesh_info_t *(* sandesh_find_info_fn )(const char *name)
 

Functions

static uint64_t os_get_value64 (const uint8_t *data)
 
static void os_put_value64 (uint8_t *data, uint64_t value)
 
sandesh_info_tsandesh_find_info (sandesh_info_t *infos, const char *name)
 
int32_t sandesh_decode (u_int8_t *buf, u_int32_t buf_len, sandesh_find_info_fn sinfo_find_fn, int *error)
 
int32_t sandesh_encode (void *sandesh, const char *sname, sandesh_find_info_fn sinfo_find_fn, u_int8_t *buf, u_int32_t buf_len, int *error)
 
int32_t sandesh_get_encoded_length (void *sandesh, const char *sname, sandesh_find_info_fn sinfo_find_fn, int *error)
 

Macro Definition Documentation

#define os_free (   ptr)    free(ptr)

Definition at line 55 of file sandesh.h.

#define os_log (   level,
  format,
  arg... 
)    syslog(level, format, ##arg)

Definition at line 56 of file sandesh.h.

#define OS_LOG_DEBUG   LOG_DEBUG

Definition at line 50 of file sandesh.h.

#define OS_LOG_ERR   LOG_ERR

Definition at line 49 of file sandesh.h.

#define os_malloc (   size)    malloc(size)

Definition at line 52 of file sandesh.h.

#define os_realloc (   ptr,
  size 
)    realloc(ptr, size)

Definition at line 54 of file sandesh.h.

#define os_zalloc (   size)    calloc(1, size)

Definition at line 53 of file sandesh.h.

Typedef Documentation

typedef unsigned char ct_uuid_t[16]

Definition at line 61 of file sandesh.h.

typedef struct ipaddr_s ipaddr_t
typedef sandesh_info_t*(* sandesh_find_info_fn)(const char *name)

Definition at line 109 of file sandesh.h.

Function Documentation

static uint64_t os_get_value64 ( const uint8_t *  data)
inlinestatic

Definition at line 71 of file sandesh.h.

static void os_put_value64 ( uint8_t *  data,
uint64_t  value 
)
inlinestatic

Definition at line 81 of file sandesh.h.

int32_t sandesh_decode ( u_int8_t *  buf,
u_int32_t  buf_len,
sandesh_find_info_fn  sinfo_find_fn,
int *  error 
)
int32_t sandesh_encode ( void *  sandesh,
const char *  sname,
sandesh_find_info_fn  sinfo_find_fn,
u_int8_t *  buf,
u_int32_t  buf_len,
int *  error 
)
sandesh_info_t* sandesh_find_info ( sandesh_info_t infos,
const char *  name 
)
int32_t sandesh_get_encoded_length ( void *  sandesh,
const char *  sname,
sandesh_find_info_fn  sinfo_find_fn,
int *  error 
)