mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
Unify Linux namespace operations
This commit is contained in:
1 parent
f1b8d30799
commit
cc19bbff6d
10 files changed
+70
-109
No files matched your search
+8
-1
@@ -239,8 +239,15 @@ int sockmap(struct clientparam * param, int timeo, int usesplice);
|
||||
int udpsockmap(struct clientparam * param, int timeo);
|
||||
int udpbind(struct clientparam * param);
|
||||
int socks5_setaddr(int family, int atyp, const unsigned char *addr, PROXYSOCKADDRTYPE *sa);
|
||||
/* which of a service's network namespaces a socket is made in */
|
||||
#define NS_IN 0 /* -ni: what faces the clients */
|
||||
#define NS_OUT 1 /* -ne: what faces the destinations */
|
||||
#ifdef __linux__
|
||||
int switch_ns(struct srvparam *srv, int target_fd);
|
||||
extern int mainnsfd;
|
||||
int nsopen(void);
|
||||
SOCKET nssocket(struct srvparam *srv, struct sockfuncs *sf, void *state, int side, int domain, int type, int protocol);
|
||||
#else
|
||||
#define nssocket(srv, sf, state, side, domain, type, protocol) ((sf)->_socket((state), (domain), (type), (protocol)))
|
||||
#endif
|
||||
int socksend(struct clientparam *param, SOCKET sock, unsigned char * buf, int bufsize, int to);
|
||||
int socksendto(struct clientparam *param, SOCKET sock, struct sockaddr * sin, unsigned char * buf, int bufsize, int to);
|
||||
|
||||
Reference in new issue
Block a user