dessert.h File Reference

#include <net/if.h>
#include <net/ethernet.h>
#include <pcap.h>
#include <stdint.h>
#include <syslog.h>
#include <stdlib.h>
#include <libcli.h>
Include dependency graph for dessert.h:

Go to the source code of this file.

Data Structures

struct  dessert_msg
 Structure of the DES-SERT Message. More...
struct  dessert_msg_proc
 Processing buffer for a dessert_msg_t. More...
struct  dessert_ext
 a extension record to add to a dessert_msg More...
struct  dessert_meshif
 an interface used for dessert_msg frames More...
struct  dessert_sysif
 A tun/tap interface used to inject packets to dessert implemented daemons. More...
struct  dessert_periodic
 definition of a periodic tasklist entry More...
struct  dessert_agentx_appstats
 An abstract data type representing some statistical datum. More...
struct  dessert_agentx_appparams
 An abstract data type representing some parameter. More...
struct  dessert_agentx_appstats_cb_entry
 A callback entry representing a statistical datum. More...
struct  dessert_agentx_appparams_cb_entry
 A callback entry representing a parameter. More...

Defines

#define DESSERT_ETHPROTO   0x8042
 ethernet protocol used on layer 2
#define DESSERT_MAXFRAMELEN   ETHER_MAX_LEN
 maximum frame size to assemble as dessert_msg
#define DESSERT_MAXEXTDATALEN   253
 maximum size of the data part in dessert_ext
#define DESSERT_PROTO_STRLEN   4
 length of protocol string used in dessert_msg
#define DESSERT_LBUF_LEN   1024
 size of local message processing buffer
#define DESSERT_OK   0
 return code for many dessert_* functions
#define DESSERT_ERR   1
 return code for many dessert_* functions
#define DESSERT_FRAMEID_MAX   ((uint64_t)-1)
 type for local unique packet identification
#define DESSERT_OPT_DAEMONIZE   0x0100
 flag for dessert_init - daemonize when calling disables logging to STDERR
#define DESSERT_OPT_NODAEMONIZE   0x0200
 flag for dessert_init - do not daemonize when calling
#define DESSERT_LOG_SYSLOG   0x0001
 flag for dessert_logcfg - enable syslog logging
#define DESSERT_LOG_NOSYSLOG   0x0002
 flag for dessert_logcfg - disable syslog logging
#define DESSERT_LOG_FILE   0x0004
 flag for dessert_logcfg - enable logfile logging
#define DESSERT_LOG_NOFILE   0x0008
 flag for dessert_logcfg - disable logfile logging
#define DESSERT_LOG_STDERR   0x0010
 flag for dessert_logcfg - enable logging to stderr
#define DESSERT_LOG_NOSTDERR   0x0020
 flag for dessert_logcfg - disable logging to stderr
#define DESSERT_LOG_RBUF   0x0040
 flag for dessert_logcfg - enable logging to ringbuffer
#define DESSERT_LOG_NORBUF   0x0080
 flag for dessert_logcfg - disable logging to ringbuffer
#define DESSERT_LOG_DEBUG   0x0100
 flag for dessert_logcfg - enable debug loglevel
#define DESSERT_LOG_NODEBUG   0x0200
 flag for dessert_logcfg - disable debug loglevel
#define dessert_debug(...)   _dessert_log(LOG_DEBUG, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
 log at DEBUG level
#define dessert_info(...)   _dessert_log(LOG_INFO, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
 log at INFO level
#define dessert_notice(...)   _dessert_log(LOG_NOTICE, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
 log at NOTICE level
#define dessert_warn(...)   _dessert_log(LOG_WARNING, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
 log at WARNING level
#define dessert_warning(...)   _dessert_log(LOG_WARNING, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
 log at WARNING level
#define dessert_err(...)   _dessert_log(LOG_ERR, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
 log at ERR level
#define dessert_crit(...)   _dessert_log(LOG_CRIT, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
 log at CRIT level
#define dessert_alert(...)   _dessert_log(LOG_ALERT, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
 log at ALERT level
#define dessert_emerg(...)   _dessert_log(LOG_EMERG, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
 log at EMERG level
#define DESSERT_MSG_NEEDNOSPARSE   1
 return code for dessert_meshrxcb_t - forces to copy the message and call again
#define DESSERT_MSG_NEEDMSGPROC   2
 return code for dessert_meshrxcb_t - forces to generate processing info and call again
#define DESSERT_MSG_KEEP   0
 return code for dessert_meshrxcb_t and dessert_sysrxcb_t
#define DESSERT_MSG_DROP   -1
 return code for dessert_meshrxcb_t and dessert_sysrxcb_t
#define DESSERT_IF_PROMISC   0x0
 flag for dessert_meshif_add - set interface in promiscuous-mode (default)
#define DESSERT_IF_NOPROMISC   0x1
 flag for dessert_meshif_add - do not set interface in promiscuous-mode
#define DESSERT_IF_FILTER   0x0
 flag for dessert_meshif_add - filter out non-des-sert frames in libpcap (default)
#define DESSERT_IF_NOFILTER   0x2
 flag for dessert_meshif_add - do not filter out non-des-sert frames in libpcap
#define DESSERT_TUN   0x00
 flag for dessert_sysif_init - open tun (ip/ipv6) device
#define DESSERT_TAP   0x01
 flag for dessert_sysif_init - open tap (ethernet) device
#define DESSERT_MAKE_DEFSRC   0x02
 flag for dessert_sysif_init - set dessert_l25_defsrc to mac of tap device
#define _DESSERT_TAP_NOMAC   0x80
 flag for dessert_sysif_init - get mac for tap failed - try mac in src of first packet
#define DESSERT_FLAG_SPARSE   0x1
 flag for dessert_msg.flags - message len is hlen+plen if not set buffer len is assumed as DESSERT_MAXFRAMELEN + DESSERT_MSGPROCLEN
#define DESSERT_LFLAG_SRC_SELF   0x0002
 flag for dessert_msg_proc.lflags - l25 src is one of our interfaces
#define DESSERT_LFLAG_DST_MULTICAST   0x0004
 flag for dessert_msg_proc.lflags - l25 dst is multicast address
#define DESSERT_LFLAG_DST_SELF   0x0008
 flag for dessert_msg_proc.lflags - l25 dst is one of our interfaces
#define DESSERT_LFLAG_DST_BROADCAST   0x0010
 flag for dessert_msg_proc.lflags - l25 dst is broadcast
#define DESSERT_LFLAG_PREVHOP_SELF   0x0020
 flag for dessert_msg_proc.lflags - l2 src is one of our interfaces
#define DESSERT_LFLAG_NEXTHOP_SELF   0x0040
 flag for dessert_msg_proc.lflags - l2 dst is one of our interfaces
#define DESSERT_LFLAG_NEXTHOP_BROADCAST   0x0080
 flag for dessert_msg_proc.lflags - l2 dst is broadcast
#define DESSERT_LFLAG_DST_SELF_OVERHEARD   0x0100
 flag for dessert_msg_proc.lflags - l25 dst is one of our interfaces, but we received the message not via the indented interface, e.g.
#define DESSERT_LFLAG_NEXTHOP_SELF_OVERHEARD   0x0200
 flag for dessert_msg_proc.lflags - l2 dst is one of our interfaces, but we received the message not via the indented interface, e.g.
#define DESSERT_EXTLEN   (sizeof(struct dessert_ext) - DESSERT_MAXEXTDATALEN)
 length of dessert_ext header
#define DESSERT_MSG_TRACE_HOST   (ETHER_ADDR_LEN)
 packet tracing flag - only record hosts
#define DESSERT_MSG_TRACE_IFACE   (3*ETHER_ADDR_LEN)
 packet tracing flag - record interfaces
#define DESSERT_APPSTATS_VALUETYPE_BOOL   0
 Flag indicating the dessert_agentx_appstats_t is of type bool.
#define DESSERT_APPSTATS_VALUETYPE_INT32   1
 Flag indicating the dessert_agentx_appstats_t is of type int32.
#define DESSERT_APPSTATS_VALUETYPE_UINT32   2
 Flag indicating the dessert_agentx_appstats_t is of type uint32.
#define DESSERT_APPSTATS_VALUETYPE_COUNTER64   3
 Flag indicating the dessert_agentx_appstats_t is of type counter64.
#define DESSERT_APPSTATS_VALUETYPE_OCTETSTRING   4
 Flag indicating the dessert_agentx_appstats_t is of type octetstring.
#define DESSERT_APPSTATS_NODEORLINK_NONE   0
 Flag indicating the dessert_agentx_appstats_t does not contain information regarding a node or a link.
#define DESSERT_APPSTATS_NODEORLINK_NODE   1
 Flag indicating the dessert_agentx_appstats_t contains information regarding a node.
#define DESSERT_APPSTATS_NODEORLINK_LINK   2
 Flag indicating the dessert_agentx_appstats_t contains information regarding a link.
#define DESSERT_APPSTATS_BOOL_TRUE   1
 What is considered to be TRUE in a dessert_agentx_appstats_t.
#define DESSERT_APPSTATS_BOOL_FALSE   0
 What is considered to be FALSE in a dessert_agentx_appstats_t.
#define DESSERT_APPPARAMS_VALUETYPE_BOOL   0
 Flag indicating the dessert_agentx_appparams_t is of type bool.
#define DESSERT_APPPARAMS_VALUETYPE_INT32   1
 Flag indicating the dessert_agentx_appparams_t is of type int32.
#define DESSERT_APPPARAMS_VALUETYPE_UINT32   2
 Flag indicating the dessert_agentx_appparams_t is of type uint32.
#define DESSERT_APPPARAMS_VALUETYPE_OCTETSTRING   3
 Flag indicating the dessert_agentx_appparams_t is of type octetstring.
#define DESSERT_APPPARAMS_BOOL_TRUE   1
 What is considered to be TRUE in a dessert_agentx_appparams_t.
#define DESSERT_APPPARAMS_BOOL_FALSE   0
 What is considered to be FALSE in a dessert_agentx_appparams_t.
#define DESSERT_APPSTATS_CB_BULK   1
 Flag indicating if a appstats callback entry is of type bulk.
#define DESSERT_APPSTATS_CB_NOBULK   2
 Flag indicating if a appstats callback entry is of type nobulk.
#define MESHIFLIST_ITERATOR_START(__interface)
 A convenience macro to safely iterate the list of mesh interfaces.
#define MESHIFLIST_ITERATOR_STOP   } pthread_rwlock_unlock(&dessert_cfglock)
 A convenience macro to safely iterate the list of mesh interfaces.
#define TIMEVAL_ADD(__tv, __sec, __usec)
 A convenience macro to safely add __sec seconds and __usec microseconds to the struct timeval __tv in an invariant respecting manner.
#define likely(x)   (__builtin_expect((x),1))
 Branch prediction optimization macros.
#define unlikely(x)   (__builtin_expect((x),0))
 Branch prediction optimization macros.
#define __dessert_assert(func, file, line, e)   ((void)_dessert_log(LOG_EMERG, func, file, line, "assertion `%s' failed!\n", e), abort)
#define assert(e)   (__builtin_expect(!(e), 0) ? __dessert_assert(__FUNCTION__, __FILE__, __LINE__, #e) : (void)0)
 Assertion Macro.

Typedefs

typedef uint64_t dessert_frameid_t
 runtime-unique frame id
typedef struct dessert_msg dessert_msg_t
 Structure of the DES-SERT Message.
typedef struct dessert_msg_proc dessert_msg_proc_t
 Processing buffer for a dessert_msg_t.
typedef struct dessert_ext dessert_ext_t
 a extension record to add to a dessert_msg
typedef struct dessert_meshif dessert_meshif_t
 an interface used for dessert_msg frames
typedef struct dessert_sysif dessert_sysif_t
 A tun/tap interface used to inject packets to dessert implemented daemons.
typedef int dessert_meshrxcb_t (dessert_msg_t *msg, size_t len, dessert_msg_proc_t *proc, const dessert_meshif_t *iface, dessert_frameid_t id)
 Callback type to call if a packed is received via a dessert mesh interface.
typedef int dessert_sysrxcb_t (dessert_msg_t *msg, size_t len, dessert_msg_proc_t *proc, dessert_sysif_t *sysif, dessert_frameid_t id)
 Callback type to call if a packed should be injected into dessert via a tun/tap interface.
typedef int dessert_periodiccallback_t (void *data, struct timeval *scheduled, struct timeval *interval)
 callbacks type to call in a periodic task
typedef struct dessert_periodic dessert_periodic_t
 definition of a periodic tasklist entry
typedef struct
dessert_agentx_appstats 
dessert_agentx_appstats_t
 An abstract data type representing some statistical datum.
typedef struct
dessert_agentx_appparams 
dessert_agentx_appparams_t
 An abstract data type representing some parameter.
typedef int dessert_agentx_appstatscb_get_t (struct dessert_agentx_appstats *appstats)
 Callback type to call if the AppstatsTable is asked for by some snmp client.
typedef int dessert_agentx_appparamscb_get_t (struct dessert_agentx_appparams *appparams)
 Callback type to call if the AppparamsTable is asked for by some snmp client.
typedef int dessert_agentx_appparamscb_set_t (struct dessert_agentx_appparams *appparams)
 Callback type to call if the specific row represented by this callback is going to be set by some snmp client.
typedef struct
dessert_agentx_appstats_cb_entry 
dessert_agentx_appstats_cb_entry_t
 A callback entry representing a statistical datum.
typedef struct
dessert_agentx_appparams_cb_entry 
dessert_agentx_appparams_cb_entry_t
 A callback entry representing a parameter.

Enumerations

enum  dessert_extensions {
  DESSERT_EXT_ANY = 0x00, DESSERT_EXT_ETH = 0x01, DESSERT_EXT_TRACE_REQ = 0x02, DESSERT_EXT_TRACE_RPL = 0x03,
  DESSERT_EXT_PING = 0x04, DESSERT_EXT_PONG = 0x05, DESSERT_EXT_USER = 0x40
}
 

Reserved extension type values.

More...

Functions

int dessert_init (const char *proto, int version, uint16_t opts)
 Initializes dessert framework and sets up logging.
int dessert_pid (char *pidfile)
 Write pid to file.
int dessert_run (void)
 main loop - wait until dessert_exit() is called or killed
void dessert_exit (void)
 Causes dessert_run() to break out of the main loop.
int dessert_cli_run (void)
 Start up the command line interface.
FILE * dessert_cli_get_cfg (int argc, char **argv)
 Get pointer to config file.
int dessert_set_cli_port (uint16_t port)
 Set CLI port.
int dessert_logcfg (uint16_t opts)
 Configure dessert logging framework and sets up logging.
void _dessert_log (int level, const char *func, const char *file, int line, const char *fmt,...)
 internal log function
int dessert_meshsend (const dessert_msg_t *msgin, const dessert_meshif_t *iface)
 Sends a dessert message via the specified interface or all interfaces.
int dessert_meshsend_allbutone (const dessert_msg_t *msgin, const dessert_meshif_t *iface)
 Sends a dessert message via all interfaces, except via the specified interface.
int dessert_meshsend_hwaddr (const dessert_msg_t *msgin, const uint8_t hwaddr[ETHER_ADDR_LEN])
 Sends a dessert message via the interface which is identified by the given hardware address.
int dessert_meshsend_randomized (const dessert_msg_t *msgin)
 Sends a dessert message via all interfaces in a randomized fashion.
int dessert_meshsend_fast (dessert_msg_t *msg, const dessert_meshif_t *iface)
 Sends a dessert message fast via the specified interface or all interfaces.
int dessert_meshsend_fast_allbutone (dessert_msg_t *msg, const dessert_meshif_t *iface)
 Sends a dessert message fast via all interfaces, except the specified interface.
int dessert_meshsend_fast_hwaddr (dessert_msg_t *msg, const uint8_t hwaddr[ETHER_ADDR_LEN])
 Sends a dessert message fast via the interface specified by the given hardware address.
int dessert_meshsend_fast_randomized (dessert_msg_t *msgin)
 Sends a dessert message fast via all interfaces in a randomized fashion.
int dessert_meshsend_raw (dessert_msg_t *msg, const dessert_meshif_t *iface)
 Sends a dessert message msg via the specified interface iface or all interfaces.
int dessert_meshrxcb_add (dessert_meshrxcb_t *c, int prio)
 Adds a callback function to the meshrx pipeline.
int dessert_meshrxcb_del (dessert_meshrxcb_t *c)
 Removes all occurrences of the given callback function c from the meshrx pipeline.
int dessert_meshif_add (const char *dev, uint8_t flags)
 Initializes given mesh interface, starts up the packet processor thread.
int dessert_meshif_del (const char *dev)
 Removes the corresponding dessert_meshif struct from _dessert_meshiflist and does some cleanup.
dessert_meshif_tdessert_meshif_get_name (const char *dev)
 Looks for mesh interface with name dev in the list of mesh interfaces and returns a pointer to it.
dessert_meshif_tdessert_meshif_get_hwaddr (const uint8_t hwaddr[ETHER_ADDR_LEN])
 Looks for mesh interface with hardware address hwaddr in the list of mesh interfaces and returns a pointer to it.
dessert_meshif_tdessert_meshiflist_get (void)
 Returns the head of the list of mesh interfaces (_desert_meshiflist).
int dessert_sysif_init (char *name, uint8_t flags)
 Initializes the tun/tap Interface dev for des-sert.
int dessert_sysrxcb_add (dessert_sysrxcb_t *c, int prio)
 adds a callback function to call if a packet should be injected into dessert via a tun/tap interface
int dessert_sysrxcb_del (dessert_sysrxcb_t *c)
 removes all occurrences of the callback function from the list of callbacks.
int dessert_syssend_msg (dessert_msg_t *msg)
 Send a DES-SERT Message via TUN/TAP.
int dessert_syssend (const void *pkt, size_t len)
 Send any type of packet via TUN/TAP.
int dessert_msg_new (dessert_msg_t **msgout)
 creates a new dessert_msg_t and initializes it.
int dessert_msg_clone (dessert_msg_t **msgnew, const dessert_msg_t *msgold, uint8_t sparse)
 generates a copy of a dessert_msg
int dessert_msg_check (const dessert_msg_t *msg, size_t len)
 checks whether a dessert_msg is consistent
void dessert_msg_dump (const dessert_msg_t *msg, size_t len, char *buf, size_t blen)
 dump a dessert_msg_t to a string
void dessert_msg_destroy (dessert_msg_t *msg)
 free a dessert_msg
int dessert_msg_ethencap (const struct ether_header *eth, size_t eth_len, dessert_msg_t **msgout)
 creates a new dessert_msg from an ethernet frame.
int dessert_msg_ethdecap (const dessert_msg_t *msg, struct ether_header **ethout)
 extracts an ethernet frame from a dessert_msg
struct ether_header * dessert_msg_getl25ether (const dessert_msg_t *msg)
 get the ether_header sent as DESSERT_EXT_ETH in a dessert_msg
int dessert_msg_ipencap (const uint8_t *ip, size_t len, dessert_msg_t **msgout)
 creates a new dessert_msg from an ip datagram.
int dessert_msg_ipdecap (const dessert_msg_t *msg, uint8_t **ip)
 extract an ip datagram from a dessert_msg
int dessert_msg_proc_clone (dessert_msg_proc_t **procnew, const dessert_msg_proc_t *procold)
 generates a copy of a dessert_msg_proc
void dessert_msg_proc_dump (const dessert_msg_t *msg, size_t len, const dessert_msg_proc_t *proc, char *buf, size_t blen)
 dump a dessert_msg_t to a string
void dessert_msg_proc_destroy (dessert_msg_proc_t *proc)
 free a dessert_prc_msg
int dessert_msg_addpayload (dessert_msg_t *msg, void **payload, int len)
 add or replace payload to a dessert_msg
int dessert_msg_getpayload (dessert_msg_t *msg, void **payload)
 Retrieves a pointer to the payload of a dessert message msg.
int dessert_msg_addext (dessert_msg_t *msg, dessert_ext_t **ext, uint8_t type, size_t len)
 add an extension record to a dessert_msg
int dessert_msg_delext (dessert_msg_t *msg, dessert_ext_t *ext)
 remove an extension record from a dessert_msg
int dessert_msg_resizeext (dessert_msg_t *msg, dessert_ext_t *ext, size_t new_len)
 Resizes a given extension record ext within in a dessert message msg to the new length new_len.
int dessert_msg_getext (const dessert_msg_t *msg, dessert_ext_t **ext, uint8_t type, int index)
 get an specific or all extensions
int dessert_msg_get_ext_count (const dessert_msg_t *msg, uint8_t type)
 get an specific or all extensions
int dessert_msg_dump_cb (dessert_msg_t *msg, size_t len, dessert_msg_proc_t *proc, const dessert_meshif_t *iface, dessert_frameid_t id)
 dump a dessert_msg_t to debug log
int dessert_msg_check_cb (dessert_msg_t *msg, size_t len, dessert_msg_proc_t *proc, const dessert_meshif_t *iface, dessert_frameid_t id)
 callback that checks whether a dessert_msg is consistent
int dessert_msg_trace_cb (dessert_msg_t *msg, size_t len, dessert_msg_proc_t *proc, const dessert_meshif_t *iface, dessert_frameid_t id)
 check if the message carries a trace extension and add the current trace info if iface is NULL, the packet is ignored
int dessert_msg_ifaceflags_cb (dessert_msg_t *msg, size_t len, dessert_msg_proc_t *proc, const dessert_meshif_t *riface, dessert_frameid_t id)
 callback to set the local processing flags in dessert_msg_proc_t on an arriving dessert_msg_t
dessert_periodic_tdessert_periodic_add (dessert_periodiccallback_t *c, void *data, const struct timeval *scheduled, const struct timeval *interval)
 Adds a delayed/periodic task to the task list.
dessert_periodic_tdessert_periodic_add_delayed (dessert_periodiccallback_t *c, void *data, int delay)
 Adds a delayed task to the task list.
int dessert_periodic_del (dessert_periodic_t *p)
 Removes a delayed/periodic task from the task list.
dessert_agentx_appstats_tdessert_agentx_appstats_new (void)
 Creates and initializes a new dessert_agentx_appstats_t.
void dessert_agentx_appstats_destroy (dessert_agentx_appstats_t *appstat)
 Frees a dessert_agentx_appstats_t.
dessert_agentx_appstats_cb_entry_tdessert_agentx_appstats_add (dessert_agentx_appstatscb_get_t *c)
 Adds an application statistics callback.
dessert_agentx_appstats_cb_entry_tdessert_agentx_appstats_add_bulk (dessert_agentx_appstatscb_get_t *c)
 Adds an application statistics bulk callback.
int dessert_agentx_appstats_del (dessert_agentx_appstats_cb_entry_t *e)
 Deletes an application statistics callback.
dessert_agentx_appparams_tdessert_agentx_appparam_new (void)
 Creates and initializes a new dessert_agentx_appparams_t.
void dessert_agentx_appparam_destroy (dessert_agentx_appparams_t *appparam)
 Frees a dessert_agentx_appparams_t.
dessert_agentx_appparams_cb_entry_tdessert_agentx_appparams_add (dessert_agentx_appparamscb_get_t *get, dessert_agentx_appparamscb_set_t *set)
 Adds an application parameter callback.
int dessert_agentx_appparams_del (dessert_agentx_appparams_cb_entry_t *e)
 Deletes an application parameter callback.
int dessert_cli_cmd_addsysif (struct cli_def *cli, char *command, char *argv[], int argc)
int dessert_cli_cmd_addsysif_tun (struct cli_def *cli, char *command, char *argv[], int argc)
int dessert_cli_cmd_addmeshif (struct cli_def *cli, char *command, char *argv[], int argc)
int dessert_cli_cmd_ping (struct cli_def *cli, char *command, char *argv[], int argc)
int dessert_rx_ping (dessert_msg_t *msg, size_t len, dessert_msg_proc_t *proc, const dessert_meshif_t *iface, dessert_frameid_t id)
int dessert_rx_pong (dessert_msg_t *msg, size_t len, dessert_msg_proc_t *proc, const dessert_meshif_t *iface, dessert_frameid_t id)
int dessert_cli_cmd_traceroute (struct cli_def *cli, char *command, char *argv[], int argc)
int dessert_rx_trace (dessert_msg_t *msg, size_t len, dessert_msg_proc_t *proc, const dessert_meshif_t *iface, dessert_frameid_t id)
int dessert_msg_trace_initiate (dessert_msg_t *msg, uint8_t type, int mode)
int dessert_msg_trace_dump (const dessert_msg_t *msg, uint8_t type, char *buf, int blen)
int dessert_rx_ipttl (dessert_msg_t *msg, size_t len, dessert_msg_proc_t *proc, const dessert_meshif_t *iface, dessert_frameid_t id)
int dessert_tx_drop_ipv6 (dessert_msg_t *msg, size_t len, dessert_msg_proc_t *proc, const dessert_sysif_t *iface, dessert_frameid_t id)
int dessert_rx_drop_tap (dessert_msg_t *msg, size_t len, dessert_msg_proc_t *proc, const dessert_meshif_t *iface, dessert_frameid_t id)
int dessert_rx_drop_tun (dessert_msg_t *msg, size_t len, dessert_msg_proc_t *proc, const dessert_meshif_t *iface, dessert_frameid_t id)

Variables

char dessert_proto [DESSERT_PROTO_STRLEN+1]
 protocol string used in dessert_msg frames
u_int8_t dessert_ver
 version int used in dessert_msg frames
u_int8_t dessert_l25_defsrc [ETHER_ADDR_LEN]
 default src address used for local generated dessert_msg frames
u_char ether_broadcast [ETHER_ADDR_LEN]
 constant holding ethernet broadcast address after dessert_init
u_char ether_null [ETHER_ADDR_LEN]
 constant holding ethernet null address after dessert_init
pthread_rwlock_t dessert_cfglock
 the config funnel
struct cli_def * dessert_cli
 DES-SERT CLI.
struct cli_command * dessert_cli_show
 CLI Anchor for show commands.
struct cli_command * dessert_cli_cfg_iface
 CLI Anchor interface configuration commands.
struct cli_command * dessert_cli_cfg_no
 CLI Anchor for deactivation commands.
struct cli_command * dessert_cli_cfg_no_iface
 CLI Anchor for interface removal commands.
struct cli_command * dessert_cli_cfg_set
 CLI Anchor for set commands.
struct cli_command * dessert_cli_cfg_logging
 CLI Anchor to enable logging.
struct cli_command * dessert_cli_cfg_no_logging
 CLI Anchor to disable logging.

Detailed Description