Rearranged the project to have src/ and build/ directories

This simplifies keeping everything clean.
This commit is contained in:
Alex Young
2012-05-30 09:51:20 +01:00
parent 21ccd17ea5
commit 7832958522
19 changed files with 48 additions and 31 deletions

24
src/parse.h Normal file
View File

@@ -0,0 +1,24 @@
#ifndef __PARSE_H
#define __PARSE_H
#include <sys/socket.h>
#include <arpa/inet.h>
#include <unistd.h>
union mysockaddr {
unsigned short family;
struct sockaddr generic;
struct sockaddr_in v4;
struct sockaddr_in6 v6;
};
struct ip_and_mask {
union mysockaddr ip;
int mask;
};
int parse_ip_to_sockaddr(struct sockaddr* out, char* src);
int parse_acl(struct ip_and_mask (**out)[0], int max, char **entries);
#endif