On Tue, 2008-10-14 at 12:18 -0700, Stephen Hemminger wrote:[...] [...] If only the one-component case needs to be treated specially then you should be able to use something like: /* For backward compatibility, if name is all digits we treat it as * the top 8 bits of an IPv4 address. */ if (strspn(name, "0123456789") == strlen(name)) addr->data[0] = atoi(name); else if (inet_aton(name, addr->data) > 0) ; else return -1; But if people also rely on e.g. 192.168/16 working then it gets trickier. Ben. -- Ben Hutchings, Senior Software Engineer, Solarflare Communications Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| Jeff Garzik | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Paul E. McKenney | [PATCH RFC 3/9] RCU: Preemptible RCU |
| James Bottomley | Re: Integration of SCST in the mainstream Linux kernel |
git: | |
| Gerrit Renker | [PATCH 13/37] dccp: Deprecate Ack Ratio sysctl |
| Patrick McHardy | Re: [GIT]: Networking |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
