Add up,backup and down states

Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
This commit is contained in:
Adrien Gallouët
2018-02-24 15:26:38 +00:00
parent ac1ba977f4
commit 81b279b060
2 changed files with 48 additions and 64 deletions

12
mud.h
View File

@@ -5,6 +5,13 @@
struct mud;
struct sockaddr;
enum mud_state {
MUD_UP = 0,
MUD_BACKUP,
MUD_DOWN,
MUD_LAST,
};
struct mud *mud_create (struct sockaddr *);
void mud_delete (struct mud *);
@@ -21,10 +28,9 @@ int mud_set_time_tolerance (struct mud *, unsigned long);
int mud_set_tc (struct mud *, int);
int mud_set_aes (struct mud *);
int mud_peer (struct mud *, struct sockaddr *);
int mud_set_state (struct mud *, struct sockaddr *, enum mud_state);
int mud_add_path (struct mud *, struct sockaddr *);
int mud_del_path (struct mud *, struct sockaddr *);
int mud_peer (struct mud *, struct sockaddr *);
int mud_recv (struct mud *, void *, size_t);
int mud_send (struct mud *, const void *, size_t, int);