X-Git-Url: http://git.sameswireless.fr/l2tpns.git/blobdiff_plain/2f5b811429a2690c2ce44d09cc571c3230420c1b..e843431b6078e2fbfd8782f65f2cd2beadbdb0cc:/util.h?ds=sidebyside diff --git a/util.h b/util.h index 91ab0bb..2345860 100644 --- a/util.h +++ b/util.h @@ -1,8 +1,14 @@ #ifndef __UTIL_H__ #define __UTIL_H__ -char *fmtaddr(ipt addr, int n); +char *fmtaddr(in_addr_t addr, int n); +char *fmtMacAddr(uint8_t *pMacAddr); 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__ */