Ethereal-dev: Re: [ethereal-dev] IPv6 filter expression

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Gilbert Ramirez <gram@xxxxxxxxxx>
Date: Thu, 14 Oct 1999 23:30:15 -0500
On Fri, Oct 15, 1999 at 12:14:50PM +0900, itojun@xxxxxxxxxx wrote:
> 
> 	IPv6 filter expression is not working right, due to lex rule.
> 	If I tap "ipv6.dst == ff02::9", lexer will think "ff02" as a token
> 	due to the following rule in dfilter-scanner.l:
> 
> >[A-Za-z][A-Za-z0-9\.\_\-]+ {
> >/* looks like a protocol, field name, or hostname */
> 
> 	I'm not sure if it is okay to:
> 	- add colon into this rule
> 	- add IPv6 address matching rule prior to this rule
> 	- some other route?

It's ifne to add a colon to the rule. (I'd have to double-check about
letting a non-letter be the first character though).

> 	From my experience it is easier to use simple regexp (like
> 	"[0-9a-fA-F\:\.]+") and use get_host_ipaddr6(), than try to make
> 	exact IPv6 numeric address regexp.

However, that's not the only problem that's keeping ipv6 addresses
from being understood in the display filters.
ipv6_str_to_guint8_array(), called by dfilter_mknode_ipv6_value(),
doesn't work right. It won't parse "ff02::9" as an ipv6 address.

--gilbert