File: util.h

package info (click to toggle)
l2tpns 2.4.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 1,892 kB
  • sloc: ansic: 22,125; sh: 177; perl: 139; makefile: 132
file content (14 lines) | stat: -rw-r--r-- 483 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#ifndef __UTIL_H__
#define __UTIL_H__

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__ */