Ask for sockaddr directly

Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
This commit is contained in:
Adrien Gallouët
2018-02-14 21:30:17 +00:00
parent 582eb29617
commit 219e17edb6
2 changed files with 62 additions and 85 deletions

9
mud.h
View File

@@ -3,8 +3,9 @@
#include <stddef.h>
struct mud;
struct sockaddr;
struct mud *mud_create (int, int, int);
struct mud *mud_create (struct sockaddr *, int, int);
void mud_delete (struct mud *);
int mud_get_fd (struct mud *);
@@ -20,10 +21,10 @@ 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 *, const char *, int);
int mud_peer (struct mud *, struct sockaddr *);
int mud_add_path (struct mud *, const char *);
int mud_del_path (struct mud *, const char *);
int mud_add_path (struct mud *, struct sockaddr *);
int mud_del_path (struct mud *, struct sockaddr *);
int mud_recv (struct mud *, void *, size_t);
int mud_send (struct mud *, const void *, size_t, int);