Add systemd script

This commit is contained in:
Nick Peng
2018-06-16 02:36:04 +08:00
parent 53df9f7063
commit 7b62739c13
34 changed files with 746 additions and 869 deletions

17
src/util.h Normal file
View File

@@ -0,0 +1,17 @@
#ifndef SMART_DNS_UTIL_H
#define SMART_DNS_UTIL_H
#include <netdb.h>
#define PORT_NOT_DEFINED -1
#define MAX_IP_LEN 64
unsigned long get_tick_count(void);
char *gethost_by_addr(char *host, struct sockaddr *addr, socklen_t addr_len);
int parse_ip(const char *value, char *ip, int *port);
#endif