Saner arg structure.

This commit is contained in:
Ian Gulliver
2016-02-15 21:12:26 +00:00
parent 9b97a2c32c
commit 798b75c30d
5 changed files with 39 additions and 33 deletions

View File

@@ -14,15 +14,7 @@ struct backend {
parser parser;
};
#define BACKEND_INIT { \
.type = PEER_BACKEND, \
.fd = -1, \
.buf = BUF_INIT, \
.parser_state = { 0 }, \
.parser = backend_autodetect_parse, \
}
void backend_init(struct backend *);
bool backend_connect(char *, char *, struct backend *, int);
bool backend_read(struct backend *);
bool backend_autodetect_parse(struct backend *, struct packet *);