summaryrefslogtreecommitdiffstats
path: root/lib/ptm_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ptm_lib.h')
-rw-r--r--lib/ptm_lib.h31
1 files changed, 16 insertions, 15 deletions
diff --git a/lib/ptm_lib.h b/lib/ptm_lib.h
index 747ce349a..bc8fe4ac5 100644
--- a/lib/ptm_lib.h
+++ b/lib/ptm_lib.h
@@ -31,32 +31,33 @@
#define PTMLIB_CMD_STOP_BFD_SESS "stop-bfd-sess"
typedef enum {
- PTMLIB_MSG_TYPE_NOTIFICATION = 1,
- PTMLIB_MSG_TYPE_CMD,
- PTMLIB_MSG_TYPE_RESPONSE,
+ PTMLIB_MSG_TYPE_NOTIFICATION = 1,
+ PTMLIB_MSG_TYPE_CMD,
+ PTMLIB_MSG_TYPE_RESPONSE,
} ptmlib_msg_type;
typedef enum {
- MODULE_BFD = 0,
- MODULE_LLDP,
- MODULE_MAX,
+ MODULE_BFD = 0,
+ MODULE_LLDP,
+ MODULE_MAX,
} ptmlib_mod_type;
-typedef int (*ptm_cmd_cb) (void *data, void *arg);
-typedef int (*ptm_notify_cb) (void *data, void *arg);
-typedef int (*ptm_response_cb) (void *data, void *arg);
-typedef int (*ptm_log_cb) (void *data, void *arg,...);
+typedef int (*ptm_cmd_cb)(void *data, void *arg);
+typedef int (*ptm_notify_cb)(void *data, void *arg);
+typedef int (*ptm_response_cb)(void *data, void *arg);
+typedef int (*ptm_log_cb)(void *data, void *arg, ...);
typedef struct ptm_lib_handle_s {
- char client_name[PTMLIB_MAXNAMELEN];
- ptm_cmd_cb cmd_cb;
- ptm_notify_cb notify_cb;
- ptm_response_cb response_cb;
+ char client_name[PTMLIB_MAXNAMELEN];
+ ptm_cmd_cb cmd_cb;
+ ptm_notify_cb notify_cb;
+ ptm_response_cb response_cb;
} ptm_lib_handle_t;
/* Prototypes */
int ptm_lib_process_msg(ptm_lib_handle_t *, int, char *, int, void *);
-ptm_lib_handle_t *ptm_lib_register(char *, ptm_cmd_cb, ptm_notify_cb, ptm_response_cb);
+ptm_lib_handle_t *ptm_lib_register(char *, ptm_cmd_cb, ptm_notify_cb,
+ ptm_response_cb);
void ptm_lib_deregister(ptm_lib_handle_t *);
int ptm_lib_find_key_in_msg(void *, const char *, char *);
int ptm_lib_init_msg(ptm_lib_handle_t *, int, int, void *, void **);