Alexey Toptygin wrote: > On Mon, 13 Nov 2006, Phil Oester wrote: > >> On Mon, Nov 13, 2006 at 12:58:48AM +0000, Alexey Toptygin wrote: >>>> But if you use a FQDN such as www.domain.com/24, then shouldn't that >>>> then imply /24? That's why I didn't make the >>>> exception for letters vs. digits, as it could be used either way. >>> >>> I don't understand what you mean. I think if it starts with a digit, it >>> must be an IP (or part of an IP with 0's dropped), else it is a network >>> name or a domain name (since neither of those can start with >>> digits). If >>> it's an IP by the above logic, then pad it with '.0's as necessary (or >>> translate directly into a number without padding first). If it's not an >>> IP, first call getnetbyname on it and if that returns NULL call >>> gethostbyname. I think this algorithm works in all cases, unless I'm >>> missing something. >> >> What I meant was some people might want to include the /24 a host sits >> on, and use something like "mydomain.com/24". When the name gets >> translated to 1.2.3.4, the cidr would make it 1.2.3.0/24. >> >> Also, as Martijn points out, just starting with digit doesn't imply >> an IP, as hosts can start with digits also. > > I think my mail server ate my replies to this, so here it is a third > time. Sorry if this is a duplicate; if it is, please let me know and > I'll shut up (my incoming mail seems to be working fine). DNS domain > names are not allowed to start with digits; I quote RFC 1034: > >> ::= | " " >> ::=