diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-05-27 22:44:56 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-05-27 22:44:56 +0200 |
commit | 64c79271c75987d94975cc3855617898b332b5a0 (patch) | |
tree | ccb23470412c87e6995145d5d71d54ecbd0b871d /src/fastd.h | |
parent | adb7453fae67c777974e1d4c1a5f80f2378c61c3 (diff) | |
download | fastd-64c79271c75987d94975cc3855617898b332b5a0.tar fastd-64c79271c75987d94975cc3855617898b332b5a0.zip |
A bit more fastd.h cleanup
Diffstat (limited to 'src/fastd.h')
-rw-r--r-- | src/fastd.h | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/fastd.h b/src/fastd.h index 8e57338..68a9f5b 100644 --- a/src/fastd.h +++ b/src/fastd.h @@ -43,14 +43,11 @@ #include <fcntl.h> #include <poll.h> #include <stdarg.h> -#include <stddef.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> -#include <sys/uio.h> - /** An ethernet address */ struct __attribute__((__packed__)) fastd_eth_addr { @@ -378,7 +375,7 @@ static inline size_t alignto(size_t l, size_t a) { } /** Returns the maximum payload size \em fastd is configured to transport */ -static inline size_t fastd_max_inner_packet(void) { +static inline size_t fastd_max_payload(void) { switch (conf.mode) { case MODE_TAP: return conf.mtu+ETH_HLEN; @@ -389,11 +386,6 @@ static inline size_t fastd_max_inner_packet(void) { } } -/** Returns the packet size (payload + overhead) \em fastd is configured to transport */ -static inline size_t fastd_max_outer_packet(void) { - return 1 + fastd_max_inner_packet() + conf.max_overhead; -} - /** Checks if a fastd_peer_address_t is an IPv6 link-local address */ static inline bool fastd_peer_address_is_v6_ll(const fastd_peer_address_t *addr) { return (addr->sa.sa_family == AF_INET6 && IN6_IS_ADDR_LINKLOCAL(&addr->in6.sin6_addr)); |