about summary refs log tree commit diff stats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 15d3008..159b0b5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,4 +1,20 @@
+#include <stdint.h>
+#include <stdio.h>
+#include <sys/socket.h>
+#include <pthread.h>
 
-int main() {
+#include "packet.h"
+#include "netascii.h"
+
+int main(int argc, char** argv) {
+	//TODO: use getopt() to parse args
+	int s = socket(AF_INET, SOCK_DGRAM, 0);
+	if (s <= 0) {
+		fprintf(stderr, "error: socket cannot be created.\n");
+		return -1;
+	}
+	//TODO: threading!
+	//TODO: daemonize!
+	fprintf(stderr, "error: routine completed successfully.\n");
 	return 0;
 }