X-Git-Url: http://git.sameswireless.fr/l2tpns.git/blobdiff_plain/272e831e8071da5296e8dd2061f8a166fd70fd07..cb031e775d57da45299c8dfdfabe7240705338e7:/util.h?ds=inline diff --git a/util.h b/util.h index 21c82a3..ee066f6 100644 --- a/util.h +++ b/util.h @@ -1,7 +1,13 @@ #ifndef __UTIL_H__ #define __UTIL_H__ -char *inet_toa(unsigned long addr); +char *fmtaddr(in_addr_t addr, int n); void *shared_malloc(unsigned int size); +pid_t fork_and_close(void); +ssize_t sendtofrom(int s, void const *buf, size_t len, int flags, + struct sockaddr const *to, socklen_t tolen, struct in_addr const *from); + +ssize_t recvfromto(int s, void *buf, size_t len, int flags, + struct sockaddr *from, socklen_t *fromlen, struct in_addr *toaddr); #endif /* __UTIL_H__ */