From 4ffc28ecd6d914f9c1e5aaf5d5921ee4827bb289 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 24 Mar 2012 20:55:27 +0100 Subject: Partial implementation of a config files parser --- src/fastd.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/fastd.h') diff --git a/src/fastd.h b/src/fastd.h index c42baa3..4af9f20 100644 --- a/src/fastd.h +++ b/src/fastd.h @@ -87,7 +87,7 @@ struct _fastd_config { struct sockaddr_in6 bind_addr_in6; uint16_t mtu; - fastd_protocol protocol; + fastd_mode mode; fastd_method *method; @@ -153,13 +153,13 @@ static inline void fastd_buffer_free(fastd_buffer buffer) { } static inline size_t fastd_max_packet_size(const fastd_context *ctx) { - switch (ctx->conf->protocol) { - case PROTOCOL_ETHERNET: + switch (ctx->conf->mode) { + case MODE_TAP: return ctx->conf->mtu+ETH_HLEN; - case PROTOCOL_IP: + case MODE_TUN: return ctx->conf->mtu; default: - exit_bug(ctx, "invalid protocol"); + exit_bug(ctx, "invalid mode"); } } -- cgit v1.2.3