X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;f=daemon%2Fnet.h;h=adf48315600c904987969ece6561744f1f55d6f1;hb=89d650f1e7be2401bcbd7c6a1782d29eaa33c413;hp=b985ee9d80e65fb156cc29f1cee83883f9e52ba5;hpb=02a705adbd87e20f15a1a2e43cf9f9ed53a19f72;p=doldaconnect.git diff --git a/daemon/net.h b/daemon/net.h index b985ee9..adf4831 100644 --- a/daemon/net.h +++ b/daemon/net.h @@ -43,10 +43,9 @@ struct socket { int refcount; int state; - int block; int dgram; int eos; - struct socket *back; + struct socket *back, *pnext; union { struct @@ -72,7 +71,6 @@ struct lport { struct ufd *ufd; void (*acceptcb)(struct lport *lp, struct socket *newsk, void *data); void (*errcb)(struct lport *lp, int err, void *data); - void (*close)(struct lport *lp); void *data; }; @@ -85,16 +83,15 @@ struct socket *netcsconn(struct sockaddr *addr, socklen_t addrlen, void (*func)( int pollsocks(int timeout); void freedgbuf(struct dgrambuf *dg); void sockqueue(struct socket *sk, void *data, size_t size); -void sockeos(struct socket *sk); +void sockerror(struct socket *sk, int en); size_t sockqueuesize(struct socket *sk); int netresolve(char *addr, void (*callback)(struct sockaddr *addr, int addrlen, void *data), void *data); struct socket *netcsdgram(struct sockaddr *name, socklen_t namelen); struct socket *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); -int getremotename(struct lport *lp, struct sockaddr **namebuf, socklen_t *lenbuf); -int getremotename2(struct lport *lp, struct socket *sk, struct sockaddr **namebuf, socklen_t *lenbuf); +int lstgetremotename(struct lport *lp, struct sockaddr **namebuf, socklen_t *lenbuf); +int lstgetremotename2(struct lport *lp, struct socket *sk, struct sockaddr **namebuf, socklen_t *lenbuf); void closesock(struct socket *sk); void closelport(struct lport *lp); void *sockgetinbuf(struct socket *sk, size_t *size);