diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-03-24 20:55:27 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-03-24 20:55:27 +0100 |
commit | 4ffc28ecd6d914f9c1e5aaf5d5921ee4827bb289 (patch) | |
tree | ddd64c27220b75f45a6efdc162bbbe040a9ca001 /src/peer.c | |
parent | 78fe2cda0572433e40889bcd7d64dd22707bfdd0 (diff) | |
download | fastd-4ffc28ecd6d914f9c1e5aaf5d5921ee4827bb289.tar fastd-4ffc28ecd6d914f9c1e5aaf5d5921ee4827bb289.zip |
Partial implementation of a config files parser
Diffstat (limited to 'src/peer.c')
-rw-r--r-- | src/peer.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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"); } } |