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/peer.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/peer.c') diff --git a/src/peer.c b/src/peer.c index ab09a1a..3aecdc0 100644 --- a/src/peer.c +++ b/src/peer.c @@ -32,20 +32,20 @@ const fastd_eth_addr* fastd_get_source_address(const fastd_context *ctx, fastd_buffer buffer) { - switch (ctx->conf->protocol) { - case PROTOCOL_ETHERNET: + switch (ctx->conf->mode) { + case MODE_TAP: return (fastd_eth_addr*)&((struct ethhdr*)buffer.data)->h_source; default: - exit_bug(ctx, "invalid protocol"); + exit_bug(ctx, "invalid mode"); } } const fastd_eth_addr* fastd_get_dest_address(const fastd_context *ctx, fastd_buffer buffer) { - switch (ctx->conf->protocol) { - case PROTOCOL_ETHERNET: + switch (ctx->conf->mode) { + case MODE_TAP: return (fastd_eth_addr*)&((struct ethhdr*)buffer.data)->h_dest; default: - exit_bug(ctx, "invalid protocol"); + exit_bug(ctx, "invalid mode"); } } -- cgit v1.2.3