Add mud_get_bad()

Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
This commit is contained in:
Adrien Gallouët
2019-10-15 14:11:07 +00:00
parent 842dadad94
commit d0dc6076c8
2 changed files with 27 additions and 6 deletions

10
mud.h
View File

@@ -53,6 +53,14 @@ struct mud_path {
unsigned msg_sent;
};
struct mud_bad {
struct {
struct sockaddr_storage addr;
uint64_t time;
uint64_t count;
} decrypt, difftime, keyx;
};
struct mud *mud_create (struct sockaddr *);
void mud_delete (struct mud *);
@@ -64,6 +72,8 @@ int mud_get_key (struct mud *, unsigned char *, size_t *);
void mud_set_mtu (struct mud *, size_t);
size_t mud_get_mtu (struct mud *);
int mud_get_bad (struct mud *, struct mud_bad *);
long mud_send_wait (struct mud *);
int mud_set_time_tolerance (struct mud *, unsigned long);