diff --git a/print-radius.c b/print-radius.c index c27e5643..9cf4a919 100644 --- a/print-radius.c +++ b/print-radius.c @@ -23,7 +23,7 @@ #ifndef lint static const char rcsid[] = - "$Id: print-radius.c,v 1.1 2000-10-06 06:49:21 guy Exp $"; + "$Id: print-radius.c,v 1.2 2000-10-08 08:48:48 guy Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -31,15 +31,8 @@ static const char rcsid[] = #endif #include -#include -#include #include -#include -#include -#include -#include -#include #include @@ -47,15 +40,15 @@ static const char rcsid[] = #include "addrtoname.h" #include "extract.h" -#define TAM_SIZE(x) (sizeof(x)/sizeof(x[0]) ) +#include "ip.h" +#include "udp.h" -#define HEX(a) ((char)( (a) <= 9 ? (a) + '0' : ((a) - 10) + 'A')) +#define TAM_SIZE(x) (sizeof(x)/sizeof(x[0]) ) #define PRINT_HEX(bytes_len, ptr_data) \ while(bytes_len) \ { \ - printf("%c%c", HEX( ((u_short)(*ptr_data)) >> 4 ), \ - HEX( ((u_short)(*ptr_data)) & 0x0F ) ); \ + printf("%02X", *ptr_data ); \ ptr_data++; \ bytes_len--; \ }