Merge from Master
[l2tpns.git] / util.h
1 #ifndef __UTIL_H__
2 #define __UTIL_H__
3
4 char *fmtaddr(in_addr_t addr, int n);
5 char *fmtMacAddr(uint8_t *pMacAddr);
6 void *shared_malloc(unsigned int size);
7 pid_t fork_and_close(void);
8 ssize_t sendtofrom(int s, void const *buf, size_t len, int flags,
9 struct sockaddr const *to, socklen_t tolen, struct in_addr const *from);
10
11 ssize_t recvfromto(int s, void *buf, size_t len, int flags,
12 struct sockaddr *from, socklen_t *fromlen, struct in_addr *toaddr);
13
14 #endif /* __UTIL_H__ */