diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-03-25 14:21:47 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-03-25 14:21:47 +0200 |
commit | 59a5b833216b62f28c816df7c9129bf0954993e0 (patch) | |
tree | 64c35f8ddcc8eafa9e12663b8eb12ba836ea1886 /src/fastd.h | |
parent | 6ce20e2bb6660694e995d890f2846fc26c96c8f7 (diff) | |
download | fastd-59a5b833216b62f28c816df7c9129bf0954993e0.tar fastd-59a5b833216b62f28c816df7c9129bf0954993e0.zip |
Change parse to push API, fix some parser bugs
Diffstat (limited to 'src/fastd.h')
-rw-r--r-- | src/fastd.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/fastd.h b/src/fastd.h index c453790..a8346c1 100644 --- a/src/fastd.h +++ b/src/fastd.h @@ -62,11 +62,13 @@ struct _fastd_protocol { bool (*handle_config)(fastd_context *ctx, const fastd_config *conf, const char *option); bool (*check_config)(fastd_context *ctx, const fastd_config *conf); + void (*init)(fastd_context *ctx); + size_t (*max_packet_size)(fastd_context *ctx); char* (*peer_str)(const fastd_context *ctx, const fastd_peer *peer); - void (*init)(fastd_context *ctx, fastd_peer *peer); + void (*init_peer)(fastd_context *ctx, fastd_peer *peer); void (*handle_recv)(fastd_context *ctx, fastd_peer *peer, fastd_buffer buffer); void (*send)(fastd_context *ctx, fastd_peer *peer, fastd_buffer buffer); @@ -114,6 +116,8 @@ struct _fastd_context { size_t eth_addr_size; size_t n_eth_addr; fastd_peer_eth_addr *eth_addr; + + void *protocol_context; }; |