diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-03-24 17:26:52 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-03-24 17:26:52 +0100 |
commit | ec6370ade8d4e8039325b4a578dec6a7e1bca696 (patch) | |
tree | a091dd20a7b61b91d0721a8c3c14e9d64cc9439a /src | |
parent | 9eac618a73006c9c74f79695d94a4ed305583c39 (diff) | |
download | fastd-ec6370ade8d4e8039325b4a578dec6a7e1bca696.tar fastd-ec6370ade8d4e8039325b4a578dec6a7e1bca696.zip |
Add some MTU-related Doxygen comments
Diffstat (limited to 'src')
-rw-r--r-- | src/fastd.h | 2 | ||||
-rw-r--r-- | src/handshake.c | 1 | ||||
-rw-r--r-- | src/peer.h | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/src/fastd.h b/src/fastd.h index ee48a65..a16244a 100644 --- a/src/fastd.h +++ b/src/fastd.h @@ -159,7 +159,7 @@ struct fastd_iface { fastd_poll_fd_t fd; /**< The file descriptor of the tunnel interface */ char *name; /**< The interface name */ fastd_peer_t *peer; /**< The peer associated with the interface (if any) */ - uint16_t mtu; + uint16_t mtu; /**< The MTU of the interface */ }; diff --git a/src/handshake.c b/src/handshake.c index 000d685..d82a4b2 100644 --- a/src/handshake.c +++ b/src/handshake.c @@ -398,6 +398,7 @@ static inline bool check_records(fastd_socket_t *sock, const fastd_peer_address_ return true; } +/** Checks if an MTU record of a handshake matches the configured MTU for a peer */ bool fastd_handshake_check_mtu(fastd_socket_t *sock, const fastd_peer_address_t *local_addr, const fastd_peer_address_t *remote_addr, fastd_peer_t *peer, const fastd_handshake_t *handshake) { if (handshake->records[RECORD_MTU].length == 2) { if (as_uint16_endian(&handshake->records[RECORD_MTU], handshake->little_endian) != fastd_peer_get_mtu(peer)) { @@ -284,6 +284,7 @@ static inline const fastd_string_stack_t * fastd_peer_get_methods(const fastd_pe return NULL; } +/** Returns the MTU to use for a peer */ static inline uint16_t fastd_peer_get_mtu(const fastd_peer_t *peer) { if (conf.mode == MODE_TAP) return conf.mtu; |