X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=radsecproxy.h;h=a421c5e5248388bc6d77257468aa0b5f8b14e350;hb=a710bc2df1fbb8c1e967a27dbcbf325b19014208;hp=5efe80bd8a81168d32e00c33cdc0c6b7b2ec4123;hpb=5b259b9efe0902fb95228cf76e7d49eb2fb3c601;p=radsecproxy.git diff --git a/radsecproxy.h b/radsecproxy.h index 5efe80b..a421c5e 100644 --- a/radsecproxy.h +++ b/radsecproxy.h @@ -45,14 +45,14 @@ struct options { struct request { struct timeval created; uint8_t refcount; - uint8_t *buf; + uint8_t *buf, *replybuf; struct radmsg *msg; struct client *from; - struct sockaddr_storage fromsa; /* used by udpservwr */ - int fromudpsock; /* used by udpservwr */ char *origusername; - char origauth[16]; /* used by servwr */ - uint8_t origid; /* used by servwr */ + char origauth[16]; + uint8_t origid; + int udpsock; /* only for UDP */ + uint16_t udpport; /* only for UDP */ }; /* requests that our client will send */ @@ -63,13 +63,6 @@ struct rqout { struct timeval expiry; }; -/* replies that a server will send */ -struct reply { - unsigned char *buf; - struct sockaddr_storage tosa; /* used by udpservwr */ - int toudpsock; /* used by udpservwr */ -}; - struct queue { struct list *entries; pthread_mutex_t mutex; @@ -206,6 +199,10 @@ struct protodefs { sizeof(struct sockaddr_in) : \ sizeof(struct sockaddr_in6)) +#define SOCKADDRP_SIZE(addr) ((addr)->sa_family == AF_INET ? \ + sizeof(struct sockaddr_in) : \ + sizeof(struct sockaddr_in6)) + struct addrinfo *getsrcprotores(uint8_t type); struct clsrvconf *find_clconf(uint8_t type, struct sockaddr *addr, struct list_node **cur); struct clsrvconf *find_srvconf(uint8_t type, struct sockaddr *addr, struct list_node **cur);