blob: 159b0b54acfac1871583b7c0561b6c0196cfa358 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#include <stdint.h>
#include <stdio.h>
#include <sys/socket.h>
#include <pthread.h>
#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;
}
|