From 59a5b833216b62f28c816df7c9129bf0954993e0 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 25 Mar 2012 14:21:47 +0200 Subject: Change parse to push API, fix some parser bugs --- src/fastd.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/fastd.h') 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; }; -- cgit v1.2.3