aboutsummaryrefslogtreecommitdiffstats
path: root/src/radius/radius.h
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-12-19 14:13:06 (GMT)
committerJouni Malinen <j@w1.fi>2009-12-19 14:13:06 (GMT)
commitd04a96b0d64c0bf6a1ab7527c24e2c8359349313 (patch)
treef84c7875a0876b44e633c4fa0f8e730a2c6ce179 /src/radius/radius.h
parenta9f92c487f4f7ca10a139e62b013c14407e0e0fd (diff)
downloadhostap-d04a96b0d64c0bf6a1ab7527c24e2c8359349313.zip
hostap-d04a96b0d64c0bf6a1ab7527c24e2c8359349313.tar.gz
hostap-d04a96b0d64c0bf6a1ab7527c24e2c8359349313.tar.bz2
Add documentation for RADIUS code and some minor cleanup
Diffstat (limited to 'src/radius/radius.h')
-rw-r--r--src/radius/radius.h50
1 files changed, 38 insertions, 12 deletions
diff --git a/src/radius/radius.h b/src/radius/radius.h
index 76a5c13..9f77a5a 100644
--- a/src/radius/radius.h
+++ b/src/radius/radius.h
@@ -1,6 +1,6 @@
/*
- * hostapd / RADIUS message processing
- * Copyright (c) 2002-2007, Jouni Malinen <j@w1.fi>
+ * RADIUS message processing
+ * Copyright (c) 2002-2009, Jouni Malinen <j@w1.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -173,19 +173,47 @@ struct radius_ms_mppe_keys {
};
-/* RADIUS message structure for new and parsed messages */
+/**
+ * struct radius_msg - RADIUS message structure for new and parsed messages
+ */
struct radius_msg {
+ /**
+ * buf - Allocated buffer for RADIUS message
+ */
unsigned char *buf;
- size_t buf_size; /* total size allocated for buf */
- size_t buf_used; /* bytes used in buf */
+ /**
+ * buf_size - Total size of the allocated buf in octets
+ */
+ size_t buf_size;
+
+ /**
+ * buf_used - bytes used in buf
+ */
+ size_t buf_used;
+
+ /**
+ * hdr - Pointer to the RADIUS header in buf
+ */
struct radius_hdr *hdr;
- size_t *attr_pos; /* array of indexes to attributes (number of bytes
- * from buf to the beginning of
- * struct radius_attr_hdr). */
- size_t attr_size; /* total size of the attribute pointer array */
- size_t attr_used; /* total number of attributes in the array */
+ /**
+ * attr_pos - Array of indexes to attributes
+ *
+ * The values are number of bytes from buf to the beginning of
+ * struct radius_attr_hdr.
+ */
+ size_t *attr_pos;
+
+ /**
+ * attr_size - Total size of the attribute pointer array
+ */
+ size_t attr_size;
+
+ /**
+ * attr_used - Total number of attributes in the array
+ */
+ size_t attr_used;
};
@@ -203,8 +231,6 @@ struct radius_msg {
#define RADIUS_ADDR_FORMAT "%02x%02x%02x%02x%02x%02x"
struct radius_msg *radius_msg_new(u8 code, u8 identifier);
-int radius_msg_initialize(struct radius_msg *msg, size_t init_len);
-void radius_msg_set_hdr(struct radius_msg *msg, u8 code, u8 identifier);
void radius_msg_free(struct radius_msg *msg);
void radius_msg_dump(struct radius_msg *msg);
int radius_msg_finish(struct radius_msg *msg, const u8 *secret,