re-implementation of the serval-dna daemon as a commotiond plugin More...
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <poll.h>
#include <serval.h>
#include <serval/conf.h>
#include "debug.h"
#include "plugin.h"
#include "socket.h"
#include "loop.h"
#include "util.h"
#include "list.h"
#include "tree.h"
#include "profile.h"
#include "cmd.h"
#include "serval-dna.h"
#include "crypto.h"
Classes | |
struct | co_alarm_t |
Macros | |
#define | _alarm 42 |
#define | IS_ALARM(J) (IS_EXT(J) && ((co_alarm_t *)J)->_exttype == _alarm) |
#define | SCHEDULE(X, Y, D) |
Functions | |
int | serval_socket_cb (co_obj_t *self, co_obj_t *context) |
int | serval_timer_cb (co_obj_t *self, co_obj_t **output, co_obj_t *context) |
int | _schedule (struct __sourceloc __whence, struct sched_ent *alarm) |
int | _unschedule (struct __sourceloc __whence, struct sched_ent *alarm) |
int | _watch (struct __sourceloc __whence, struct sched_ent *alarm) |
int | _unwatch (struct __sourceloc __whence, struct sched_ent *alarm) |
int | co_plugin_name (co_obj_t *self, co_obj_t **output, co_obj_t *params) |
SCHEMA (serval) | |
SCHEMA (mdp) | |
int | co_plugin_register (co_obj_t *self, co_obj_t **output, co_obj_t *params) |
int | co_plugin_init (co_obj_t *self, co_obj_t **output, co_obj_t *params) |
int | co_plugin_shutdown (co_obj_t *self, co_obj_t **output, co_obj_t *params) |
int | serval_daemon_handler (co_obj_t *self, co_obj_t **output, co_obj_t *params) |
Variables | |
keyring_file * | keyring |
char * | serval_path |
co_socket_t | co_socket_proto = {} |
svl_crypto_ctx * | global_ctx = NULL |
bool | serval_registered = false |
bool | daemon_started = false |
co_obj_t * | err_msg |
Detailed Description
re-implementation of the serval-dna daemon as a commotiond plugin
Macro Definition Documentation
#define SCHEDULE | ( | X, | |
Y, | |||
D | |||
) |
Function Documentation
int _schedule | ( | struct __sourceloc | __whence, |
struct sched_ent * | alarm | ||
) |
Overridden Serval function to schedule timed events
this messes up Serval's overlay interface setup
References co_list_append(), co_list_parse(), co_loop_add_timer(), and co_timer_create().
int _unschedule | ( | struct __sourceloc | __whence, |
struct sched_ent * | alarm | ||
) |
Overridden Serval function to unschedule timed events
References co_list_delete(), co_list_parse(), co_loop_get_timer(), and co_loop_remove_timer().
int _watch | ( | struct __sourceloc | __whence, |
struct sched_ent * | alarm | ||
) |
Overridden Serval function to register sockets with event loop
need to set: sock->fd sock->rfd sock->listen sock->uri sock->poll_cb sock->fd_registered sock->rfd_registered
References co_fd_create(), co_list_append(), co_list_parse(), co_loop_add_socket(), and serval_socket_cb().
Callback function for when Serval socket has data to read
References co_list_parse().
Referenced by _watch().
Generated on Fri Jun 6 2014 13:22:05 for commotiond by 1.8.7