X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=daemon%2Fnet.h;h=f9b7a29cf1cb752492e8152eef528edfad117ae8;hb=0f6981ce0fd93e10fae113f8ffac1f557d7106d1;hp=106ac81e1b7c0b9f4b6c9a6baedb84413716256b;hpb=99a28d474234a07081ea1beb28bb774169390314;p=doldaconnect.git diff --git a/daemon/net.h b/daemon/net.h index 106ac81..f9b7a29 100644 --- a/daemon/net.h +++ b/daemon/net.h @@ -20,6 +20,7 @@ #define _NET_H #include +#include #define SOCK_LST 0 /* Listening */ #define SOCK_SYN 1 /* Connecting */ @@ -54,6 +55,7 @@ struct socket int close; struct sockaddr *remote; socklen_t remotelen; + struct ucred ucred; union { struct @@ -92,6 +94,7 @@ void putsock(struct socket *sk); void getsock(struct socket *sk); struct socket *netcslisten(int type, struct sockaddr *name, socklen_t namelen, void (*func)(struct socket *, struct socket *, void *), void *data); struct socket *netcslistenlocal(int type, struct sockaddr *name, socklen_t namelen, void (*func)(struct socket *, struct socket *, void *), void *data); +struct socket *netcstcplisten(int port, int local, void (*func)(struct socket *, struct socket *, void *), void *data); struct socket *netcsconn(struct sockaddr *addr, socklen_t addrlen, void (*func)(struct socket *, int, void *), void *data); int pollsocks(int timeout); void sockqueue(struct socket *sk, void *data, size_t size); @@ -102,6 +105,7 @@ struct socket *netdupsock(struct socket *sk); void netdgramconn(struct socket *sk, struct sockaddr *addr, socklen_t addrlen); int sockgetlocalname(struct socket *sk, struct sockaddr **namebuf, socklen_t *lenbuf); int sockgetremotename(struct socket *sk, struct sockaddr **namebuf, socklen_t *lenbuf); +int sockgetremotename2(struct socket *sk, struct socket *sk2, struct sockaddr **namebuf, socklen_t *lenbuf); void closesock(struct socket *sk); void *sockgetinbuf(struct socket *sk, size_t *size); struct socket *wrapsock(int fd);