ropers <[EMAIL PROTECTED]> wrote: > I only recently learned that when addressing an Internet server/host > by IPv4 address, it is possible to not use the standard dotted decimal > notation (abc.def.uvw.xyz) but instead use any of a number of > alternative formats; for example it is possible to specify the IP > address in all-decimal dword format, or as an octal or hexadecimal > number, etc.
Yes, see inet(3). > Does anyone know whether these alternative notations > (dword/octal/hexadecimal...) are officially *supposed* to work? It's the input format specified for inet_aton() and friends. I'm too lazy to research if this is actually in some standard or just tradition going back 25 years to 4.2BSD. > But it seems not all tools appear to do support this; It depends on what functions they use to transform a printable representation into an actual address; e.g. inet_pton() accepts a more limited range of formats. > Also, does all of this have implications for pf.conf? There was a bit of discussion how a netblock address in a format like "192.168/16" should be interpreted. Just use four-part dotted addresses and you don't have to wonder. > A bit of googling told me that black hats sometimes try to use > these alternate notations to get around restrictions. If the people putting the restrictions in place are stupid enough to match on addresses as strings rather than in some normalized format... -- Christian "naddy" Weisgerber [EMAIL PROTECTED]