Changeset 518:2c097ed9d0ea in freeDiameter for extensions/app_radgw/radius.c
- Timestamp:
- Aug 27, 2010, 11:25:46 AM (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 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 }
Note: See TracChangeset
for help on using the changeset viewer.