summaryrefslogtreecommitdiff
path: root/radsecproxy.h
diff options
context:
space:
mode:
authorvenaas <venaas>2007-05-21 07:14:51 +0000
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2007-05-21 07:14:51 +0000
commitb5216b2d4a840645cd2f6dcc64406b6378a07cda (patch)
treec27397c1ef77196f6549503947d15b6f437b3d83 /radsecproxy.h
parenta560c0f3d6b1a0cc4b1efbe94d9925074f138b37 (diff)
cleaned up some code with new macros
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@92 e88ac4ed-0b26-0410-9574-a7f39faa03bf
Diffstat (limited to 'radsecproxy.h')
-rw-r--r--radsecproxy.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/radsecproxy.h b/radsecproxy.h
index 45b646f..9b1747c 100644
--- a/radsecproxy.h
+++ b/radsecproxy.h
@@ -39,10 +39,6 @@
#define RAD_VS_ATTR_MS_MPPE_Send_Key 16
#define RAD_VS_ATTR_MS_MPPE_Recv_Key 17
-#define RAD_Attr_Type 0
-#define RAD_Attr_Length 1
-#define RAD_Attr_Value 2
-
#define CONF_STR 1
#define CONF_CBK 2
@@ -121,6 +117,11 @@ struct realm {
#define RADLEN(x) ntohs(((uint16_t *)(x))[1])
+#define ATTRTYPE(x) ((x)[0])
+#define ATTRLEN(x) ((x)[1])
+#define ATTRVAL(x) ((x) + 2)
+#define ATTRVALLEN(x) ((x)[1] - 2)
+
#define SOCKADDR_SIZE(addr) ((addr).ss_family == AF_INET ? \
sizeof(struct sockaddr_in) : \
sizeof(struct sockaddr_in6))