diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-05-29 05:00:11 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-05-29 05:00:11 +0200 |
commit | 2fe678653b7dd9f61dbbcd5e7d862360882bd7e8 (patch) | |
tree | 38c9dabad94845e848373b15788fcd7ae089218e /src/socket.c | |
parent | efcafca969d2e789cdf106609b04a86ef9b53a3d (diff) | |
download | fastd-2fe678653b7dd9f61dbbcd5e7d862360882bd7e8.tar fastd-2fe678653b7dd9f61dbbcd5e7d862360882bd7e8.zip |
Document *everything*
Diffstat (limited to 'src/socket.c')
-rw-r--r-- | src/socket.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/socket.c b/src/socket.c index 49752fc..5ab9fc1 100644 --- a/src/socket.c +++ b/src/socket.c @@ -23,11 +23,21 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/** + \file + + Socket handling +*/ #include "fastd.h" #include "poll.h" +/** + Creates a new socket bound to a specific address + + \return The new socket's file descriptor +*/ static int bind_socket(const fastd_bind_address_t *addr, bool warn) { int fd = -1; int af = AF_UNSPEC; @@ -160,6 +170,7 @@ static int bind_socket(const fastd_bind_address_t *addr, bool warn) { return -1; } +/** Gets the address a socket is bound to and sets it in the socket structure */ static bool set_bound_address(fastd_socket_t *sock) { fastd_peer_address_t addr = {}; socklen_t len = sizeof(addr); |