X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/e3622fbd2b837a5413d90091b87b4a733573058f..7029d15f148ef24bb7c6668bc640f5470d085e5a:/print-radius.c diff --git a/print-radius.c b/print-radius.c index 3018a5fb..582795a1 100644 --- a/print-radius.c +++ b/print-radius.c @@ -19,6 +19,9 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ + +/* \summary: Radius protocol printer */ + /* * Radius printer routines as specified on: * @@ -44,9 +47,15 @@ * RFC 4675: * "RADIUS Attributes for Virtual LAN and Priority Support" * + * RFC 4849: + * "RADIUS Filter Rule Attribute" + * * RFC 5176: * "Dynamic Authorization Extensions to RADIUS" * + * RFC 7155: + * "Diameter Network Access Server Application" + * * Alfredo Andres Omella (aandres@s21sec.com) v0.1 2000/09/15 * * TODO: Among other things to print ok MacIntosh and Vendor values @@ -56,11 +65,11 @@ #include "config.h" #endif -#include +#include #include -#include "interface.h" +#include "netdissect.h" #include "addrtoname.h" #include "extract.h" #include "oui.h" @@ -369,7 +378,8 @@ static const char *prompt[]={ "No Echo", }; -struct attrtype { const char *name; /* Attribute name */ +static struct attrtype { + const char *name; /* Attribute name */ const char **subtypes; /* Standard Values (if any) */ u_char siz_subtypes; /* Size of total standard values */ u_char first_subtype; /* First standard value is 0 or 1 */ @@ -468,8 +478,9 @@ struct attrtype { const char *name; /* Attribute name */ { "CUI", NULL, 0, 0, print_attr_string }, { "Tunnel-Client-Auth-ID", NULL, 0, 0, print_attr_string }, { "Tunnel-Server-Auth-ID", NULL, 0, 0, print_attr_string }, - { "Unassigned", NULL, 0, 0, NULL }, /*92*/ - { "Unassigned", NULL, 0, 0, NULL } /*93*/ + { "NAS-Filter-Rule", NULL, 0, 0, print_attr_string }, + { "Unassigned", NULL, 0, 0, NULL }, /*93*/ + { "Originating-Line-Info", NULL, 0, 0, NULL } }; @@ -537,7 +548,7 @@ print_attr_string(netdissect_options *ndo, } for (i=0; *data && i < length ; i++, data++) - ND_PRINT((ndo, "%c", (*data < 32 || *data > 128) ? '.' : *data)); + ND_PRINT((ndo, "%c", (*data < 32 || *data > 126) ? '.' : *data)); return; @@ -597,7 +608,7 @@ print_vendor_attr(netdissect_options *ndo, vendor_type, vendor_length)); for (idx = 0; idx < vendor_length ; idx++, data++) - ND_PRINT((ndo, "%c", (*data < 32 || *data > 128) ? '.' : *data)); + ND_PRINT((ndo, "%c", (*data < 32 || *data > 126) ? '.' : *data)); length-=vendor_length; } return;