summaryrefslogtreecommitdiffstats
path: root/src/fastd.h
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-03-24 20:55:27 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-03-24 20:55:27 +0100
commit4ffc28ecd6d914f9c1e5aaf5d5921ee4827bb289 (patch)
treeddd64c27220b75f45a6efdc162bbbe040a9ca001 /src/fastd.h
parent78fe2cda0572433e40889bcd7d64dd22707bfdd0 (diff)
downloadfastd-4ffc28ecd6d914f9c1e5aaf5d5921ee4827bb289.tar
fastd-4ffc28ecd6d914f9c1e5aaf5d5921ee4827bb289.zip
Partial implementation of a config files parser
Diffstat (limited to 'src/fastd.h')
-rw-r--r--src/fastd.h10
1 files changed, 5 insertions, 5 deletions
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");
}
}