Changeset 518:2c097ed9d0ea in freeDiameter
- Timestamp:
- Aug 27, 2010, 11:25:46 AM (14 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- extensions/app_radgw
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/app_radgw/radius.c
r516 r518 224 224 int i, len; 225 225 unsigned char *pos; 226 u8 attrtype; 226 227 227 228 attr = radius_get_attr_type(hdr->type); 228 229 229 230 if (attr == NULL) 230 return; 231 attrtype = RADIUS_ATTR_HEXDUMP; 232 else 233 attrtype = attr->data_type; 231 234 232 235 len = hdr->length - sizeof(struct radius_attr_hdr); 233 236 pos = (unsigned char *) (hdr + 1); 234 237 235 switch (attr ->data_type) {238 switch (attrtype) { 236 239 case RADIUS_ATTR_TEXT: 237 240 printf(" Value: '"); … … 250 253 break; 251 254 252 #ifdef CONFIG_IPV6253 255 case RADIUS_ATTR_IPV6: 254 256 if (len == 16) { … … 261 263 printf(" Invalid IPv6 address length %d\n", len); 262 264 break; 263 #endif /* CONFIG_IPV6 */264 265 case RADIUS_ATTR_HEXDUMP:266 case RADIUS_ATTR_UNDIST:267 printf(" Value:");268 for (i = 0; i < len; i++)269 printf(" %02x", pos[i]);270 printf("\n");271 break;272 265 273 266 case RADIUS_ATTR_INT32: … … 278 271 break; 279 272 273 case RADIUS_ATTR_HEXDUMP: 274 case RADIUS_ATTR_UNDIST: 280 275 default: 276 printf(" Value:"); 277 for (i = 0; i < len; i++) 278 printf(" %02x", pos[i]); 279 printf("\n"); 281 280 break; 282 281 } -
extensions/app_radgw/rgw_msg.c
r517 r518 99 99 for (i = 0; i < msg->radius.attr_used; i++) { 100 100 struct radius_attr_hdr *attr = (struct radius_attr_hdr *)(msg->radius.buf + msg->radius.attr_pos[i]); 101 fd_log_debug(" - type: 0x%02hhx (%s)\n len: %3hhu,", attr->length, attr->type, rgw_msg_attrtype_str(attr->type));101 fd_log_debug(" - Type: 0x%02hhx (%s)\n Len: %-3hhu", attr->type, rgw_msg_attrtype_str(attr->type), attr->length); 102 102 radius_msg_dump_attr_val(attr); 103 103 }
Note: See TracChangeset
for help on using the changeset viewer.