Wireshark mailing list archives
Short ipv4 addresses in filter
From: Jakub Zawadzki <darkjames-ws () darkjames pl>
Date: Fri, 3 Jun 2011 21:54:19 +0200
Hi,
Any reason why display filter don't accept e.g. ip.addr == 10.0/8 ?
I track it down to get_host_ipaddr():
#v+
if (!inet_aton(host, &ipaddr)) {
/* ... */
} else {
/* Does the string really contain dotted-quad IP?
* Check against inet_atons that accept strings such as
* "130.230" as valid addresses and try to convert them
* to some form of a classful (host.net) notation.
*/
unsigned int a0, a1, a2, a3;
if (sscanf(host, "%u.%u.%u.%u", &a0, &a1, &a2, &a3) != 4)
return FALSE;
}
#v-
But this comment doesn't help with understanding why short forms are rejected.
Maybe portability issues? AFAIR windows inet_aton() doesn't accept such forms...
Cheers.
___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Short ipv4 addresses in filter Jakub Zawadzki (Jun 03)
- Re: Short ipv4 addresses in filter Jakub Zawadzki (Jun 03)
- Re: Short ipv4 addresses in filter Guy Harris (Jun 03)
- Re: Short ipv4 addresses in filter Jakub Zawadzki (Jun 03)
- Re: Short ipv4 addresses in filter Guy Harris (Jun 03)
- Re: Short ipv4 addresses in filter Jakub Zawadzki (Jun 03)
