changeset 432:cfb47f71e98c

Simplified RADIUS dump. To get attribute contents, use wireshark ;)
author Sebastien Decugis <sdecugis@nict.go.jp>
date Wed, 24 Jun 2009 17:43:52 +0900
parents 1f16b74eabe2
children 987f94bc494f
files extensions/radius_gw/sub_debug.c
diffstat 1 files changed, 4 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/extensions/radius_gw/sub_debug.c	Wed Jun 24 17:27:38 2009 +0900
+++ b/extensions/radius_gw/sub_debug.c	Wed Jun 24 17:43:52 2009 +0900
@@ -91,8 +91,6 @@
 	size_t i;
 	
 	auth =  &(msg->hdr->authenticator[0]);
-	log_debug(" --- Dump method 1:\n");
-	
 	log_debug(" id  : 0x%02hhx, code: %hhd (%s)\n", msg->hdr->identifier, msg->hdr->code, rgw_msg_code_str(msg->hdr->code));
 	log_debug(" auth: %02hhx %02hhx %02hhx %02hhx  %02hhx %02hhx %02hhx %02hhx\n",
 			auth[0], auth[1], auth[2], auth[3], 
@@ -105,16 +103,13 @@
 		log_debug("  - len:%3hhu, type:0x%02hhx (%s)\n", attr->length, attr->type, rgw_msg_attrtype_str(attr->type));
 		/* If we need to dump the value, it's better to call directly radius_msg_dump instead... */
 	}
-	
-	log_debug(" --- Dump method 2:\n");
-	radius_msg_dump(msg);
 }
 
 static int debug_rad_req(struct rga_conf_state * cs, sess_id_t * session, struct radius_msg * rad_req, struct radius_msg ** rad_ans, msg_t ** diam_fw, void * cli )
 {
 	TRACE_ENTRY("%p %p %p %p %p %p", cs, session, rad_req, rad_ans, diam_fw, cli);
 	
-	log_debug("sub_debug ( c:'%s' ) state dump start for incoming RADIUS message (session: %p)\n", cs->conffile, session);
+	log_debug("------------- sub_debug ( c:'%s' )(session: %p) -------------\n", cs->conffile, session);
 	
 	if (!rad_req) {
 		log_debug(" RADIUS request: NULL pointer\n");
@@ -137,7 +132,7 @@
 		(*cs->waaad_msg_dump_walk)(0, *diam_fw);
 	}
 	
-	log_debug("sub_debug ( c:'%s' ) state dump complete\n", cs->conffile);
+	log_debug("===========  sub_debug ( c:'%s' ) complete =============\n", cs->conffile);
 	
 	return 0;
 }
@@ -146,7 +141,7 @@
 {
 	TRACE_ENTRY("%p %p %p %p %p", cs, session, diam_ans, rad_fw, cli);
 	CHECK_PARAMS(cs);
-	log_debug("sub_debug ( c:'%s' ) state dump start for incoming Diameter answer (session: %p)\n", cs->conffile, session);
+	log_debug("------------- sub_debug ( c:'%s' )(session: %p) -------------\n", cs->conffile, session);
 	
 	if (!diam_ans || ! *diam_ans) {
 		log_debug(" Diameter message: NULL pointer\n");
@@ -162,7 +157,7 @@
 		debug_dump_radius(*rad_fw);
 	}
 	
-	log_debug("sub_debug ( c:'%s' ) state dump complete\n", cs->conffile);
+	log_debug("===========  sub_debug ( c:'%s' ) complete =============\n", cs->conffile);
 	return 0;
 }
 
"Welcome to our mercurial repository"