summaryrefslogtreecommitdiff
path: root/radsecproxy.h
diff options
context:
space:
mode:
authorvenaas <venaas>2008-09-17 08:14:21 +0000
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2008-09-17 08:14:21 +0000
commita710bc2df1fbb8c1e967a27dbcbf325b19014208 (patch)
tree095581287ed9dcf43f7d1390a9a8926b626d14d0 /radsecproxy.h
parent5b259b9efe0902fb95228cf76e7d49eb2fb3c601 (diff)
cleaning up code
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@383 e88ac4ed-0b26-0410-9574-a7f39faa03bf
Diffstat (limited to 'radsecproxy.h')
-rw-r--r--radsecproxy.h21
1 files changed, 9 insertions, 12 deletions
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);