diff extensions/app_radgw/radius.c @ 516:1c2f5ee38039

Allow RADIUS Proxies with the app_radgw extension
author Sebastien Decugis <sdecugis@nict.go.jp>
date Fri, 27 Aug 2010 10:59:51 +0900
parents a857024cb48b
children 2c097ed9d0ea
line wrap: on
line diff
--- a/extensions/app_radgw/radius.c	Thu Aug 26 14:10:03 2010 +0900
+++ b/extensions/app_radgw/radius.c	Fri Aug 27 10:59:51 2010 +0900
@@ -3,7 +3,8 @@
  *  The content from this file comes directly from the hostap project.
  * It is redistributed under the terms of the BSD license, as allowed
  * by the original copyright reproduced bellow.
- *  In addition to this notice, only the #include directives have been modified.
+ *  In addition to this notice, the following changes have been done:
+ *   - created the radius_msg_dump_attr_val function
  */
 #include "rgw_common.h"
 
@@ -217,7 +218,7 @@
 }
 
 
-static void radius_msg_dump_attr(struct radius_attr_hdr *hdr)
+void radius_msg_dump_attr_val(struct radius_attr_hdr *hdr)
 {
 	struct radius_attr_type *attr;
 	int i, len;
@@ -225,9 +226,6 @@
 
 	attr = radius_get_attr_type(hdr->type);
 
-	printf("   Attribute %d (%s) length=%d\n",
-	       hdr->type, attr ? attr->name : "?Unknown?", hdr->length);
-
 	if (attr == NULL)
 		return;
 
@@ -284,6 +282,18 @@
 	}
 }
 
+static void radius_msg_dump_attr(struct radius_attr_hdr *hdr)
+{
+	struct radius_attr_type *attr;
+
+	attr = radius_get_attr_type(hdr->type);
+
+	printf("   Attribute %d (%s) length=%d\n",
+	       hdr->type, attr ? attr->name : "?Unknown?", hdr->length);
+	
+	radius_msg_dump_attr_val(hdr);
+}
+
 
 void radius_msg_dump(struct radius_msg *msg)
 {
"Welcome to our mercurial repository"