X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=daemon%2Fnet.h;h=2e7e2d9f0855358c08aea3e76a7884dbe469f502;hb=3c7f2d14ba774a61baea64c9180b8d70cbe3e020;hp=3f04ab1a6ce5bcc8667e3d81ba14f75027f6d665;hpb=0a1bc5b19fe40d88790d02f236ea4c9637024969;p=doldaconnect.git diff --git a/daemon/net.h b/daemon/net.h index 3f04ab1..2e7e2d9 100644 --- a/daemon/net.h +++ b/daemon/net.h @@ -1,6 +1,6 @@ /* * Dolda Connect - Modular multiuser Direct Connect-style client - * Copyright (C) 2004 Fredrik Tolf (fredrik@dolda2000.com) + * Copyright (C) 2004 Fredrik Tolf * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,6 +20,7 @@ #define _NET_H #include +#include #define SOCK_LST 0 /* Listening */ #define SOCK_SYN 1 /* Connecting */ @@ -54,6 +55,11 @@ struct socket int close; struct sockaddr *remote; socklen_t remotelen; + struct + { + uid_t uid; + gid_t gid; + } ucred; union { struct @@ -103,6 +109,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);