summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Doxyfile17
-rw-r--r--src/host.c9
3 files changed, 27 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index ae3c172..fbd5a69 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/bin/
+/doc/
diff --git a/Doxyfile b/Doxyfile
new file mode 100644
index 0000000..ae2f70e
--- /dev/null
+++ b/Doxyfile
@@ -0,0 +1,17 @@
+PROJECT_NAME = host
+
+INPUT = src
+OUTPUT_DIRECTORY = doc
+
+OPTIMIZE_OUTPUT_FOR_C = YES
+
+EXTRACT_ALL = YES
+EXTRACT_STATIC = YES
+TAB_SIZE = 4
+
+GENERATE_HTML = YES
+GENERATE_LATEX = NO
+GENERATE_MAN = YES
+GENERATE_RTF = NO
+GENERATE_XML = NO
+GENERATE_QHP = NO
diff --git a/src/host.c b/src/host.c
index 1da33b7..848e26d 100644
--- a/src/host.c
+++ b/src/host.c
@@ -10,6 +10,15 @@
#include <sys/socket.h>
#include <netdb.h>
+/**
+ * \brief convert addrinfo to simple IP address
+ *
+ * \param address addrinfo struct containing the IP
+ * \param ip string for the resulting IP
+ * \param length length of ip
+ * \return 0 on failure, 1 on success
+ */
+
static inline int addr_to_ip(const struct addrinfo *address, char *ip, int length) {
void *ptr;
switch (address->ai_family) {