diff options
author | Guy Harris <guy@alum.mit.edu> | 2005-09-26 08:48:19 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2005-09-26 08:48:19 +0000 |
commit | a997ee591bf4b5a8184750a097e72e42e8109012 (patch) | |
tree | 435b96dfa6474aeaed546f4e8080fe38b15b0e46 /epan/radius_dict.l | |
parent | 2b670575278264b7b8eb7f0774c9a0ddeee0e288 (diff) |
Add a new "ipxnet" type for the RADIUS dictionary, for IPX network
numbers. (Currently, we don't have any dictionary entries with that
type, although we have an attribute with special code to handle it that
uses that type.)
Specially handle Framed-IP-Address, Login-IP-Host, and
Framed-IPX-Network, so that the special values are displayed specially.
Clean up indentation.
Don't specify a number base for IPv4 or IPv6 addresses; the number base
is ignored.
svn path=/trunk/; revision=16008
Diffstat (limited to 'epan/radius_dict.l')
-rw-r--r-- | epan/radius_dict.l | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/epan/radius_dict.l b/epan/radius_dict.l index d6f631b4ab..586b5f1975 100644 --- a/epan/radius_dict.l +++ b/epan/radius_dict.l @@ -117,21 +117,22 @@ BEGIN OUT; } -<ATTR>[0-9a-z_/-]+ { attr_name = g_strdup(yytext); encrypted = FALSE; has_tag = FALSE; BEGIN ATTR_W_NAME; } -<ATTR_W_NAME>[0-9]+ { attr_id = g_strdup(yytext); BEGIN ATTR_W_ID;} -<ATTR_W_NAME>0x[0-9a-f]+ { attr_id = g_strdup_printf("%u",(int)strtoul(yytext,NULL,16)); BEGIN ATTR_W_ID;} -<ATTR_W_ID>integer { attr_type = radius_integer; BEGIN ATTR_W_TYPE; } -<ATTR_W_ID>string { attr_type = radius_string; BEGIN ATTR_W_TYPE; } -<ATTR_W_ID>octets { attr_type = radius_octets; BEGIN ATTR_W_TYPE; } -<ATTR_W_ID>ipaddr { attr_type = radius_ipaddr; BEGIN ATTR_W_TYPE; } -<ATTR_W_ID>date { attr_type = radius_date; BEGIN ATTR_W_TYPE; } -<ATTR_W_ID>ipv6addr { attr_type = radius_ipv6addr; BEGIN ATTR_W_TYPE; } -<ATTR_W_ID>ifid { attr_type = radius_ifid; BEGIN ATTR_W_TYPE; } -<ATTR_W_ID>[0-9a-z_-]+ { attr_type = radius_octets; BEGIN ATTR_W_TYPE; } -<ATTR_W_TYPE>has_tag[,]? { has_tag = TRUE; attr_vendor = NULL; BEGIN ATTR_W_VENDOR; } -<ATTR_W_TYPE>encrypt=1[,]? { encrypted=TRUE; attr_vendor = NULL; BEGIN ATTR_W_VENDOR; } +<ATTR>[0-9a-z_/-]+ { attr_name = g_strdup(yytext); encrypted = FALSE; has_tag = FALSE; BEGIN ATTR_W_NAME; } +<ATTR_W_NAME>[0-9]+ { attr_id = g_strdup(yytext); BEGIN ATTR_W_ID;} +<ATTR_W_NAME>0x[0-9a-f]+ { attr_id = g_strdup_printf("%u",(int)strtoul(yytext,NULL,16)); BEGIN ATTR_W_ID;} +<ATTR_W_ID>integer { attr_type = radius_integer; BEGIN ATTR_W_TYPE; } +<ATTR_W_ID>string { attr_type = radius_string; BEGIN ATTR_W_TYPE; } +<ATTR_W_ID>octets { attr_type = radius_octets; BEGIN ATTR_W_TYPE; } +<ATTR_W_ID>ipaddr { attr_type = radius_ipaddr; BEGIN ATTR_W_TYPE; } +<ATTR_W_ID>ipv6addr { attr_type = radius_ipv6addr; BEGIN ATTR_W_TYPE; } +<ATTR_W_ID>ipxnet { attr_type = radius_ipxnet; BEGIN ATTR_W_TYPE; } +<ATTR_W_ID>date { attr_type = radius_date; BEGIN ATTR_W_TYPE; } +<ATTR_W_ID>ifid { attr_type = radius_ifid; BEGIN ATTR_W_TYPE; } +<ATTR_W_ID>[0-9a-z_-]+ { attr_type = radius_octets; BEGIN ATTR_W_TYPE; } +<ATTR_W_TYPE>has_tag[,]? { has_tag = TRUE; attr_vendor = NULL; BEGIN ATTR_W_VENDOR; } +<ATTR_W_TYPE>encrypt=1[,]? { encrypted=TRUE; attr_vendor = NULL; BEGIN ATTR_W_VENDOR; } <ATTR_W_TYPE>[,0-9a-z_-]+=([^\n]+) { /* ignore other parameters */ attr_vendor = NULL; BEGIN ATTR_W_VENDOR; } -<ATTR_W_TYPE>[0-9a-z_-]+ { +<ATTR_W_TYPE>[0-9a-z_-]+ { attr_vendor = g_strdup(yytext); add_attribute(attr_name,attr_id,attr_type,attr_vendor,encrypted,has_tag); g_free(attr_id); |