3 ms·
Every server config ever requires an IP address entry which in itself is a non trivial proportion of all the user edited config files in the world.
by DC-3 6y ago
Every server config ever requires an IP address entry which in itself is a non trivial proportion of all the user edited config files in the world.
- joshvm 6y agoBut surely strings are valid? Unless you want some kind of static type checking/linting for eg an ipv4 vs ipv6 key? Strings are very portable as well (POD). Plenty of real world applications use static hostnames and rely on DCHP to assign IPs. When you have systems that can fail hard and you need to replace a NIC, it saves having to update either a ton of config files, router configs, or your hosts file(s). Most networking library api calls also take strings as arguments for this reason. Not saying its a better solution, but there times when either an IP or a string hostname should be acceptable. I've never had to use it, but Qt does have a hostname class, for an example of what such a dtype looks like. The class explicitly handles conversion for you: https://doc.qt.io/qt-5/qhostaddress.html https://doc.qt.io/qt-5/qhostaddress.html
- chillfox 6y agoIP is a configuration option for most server software, it’s just that it usually needs to be set to 0.0.0.0 and that is the default anyway so most admins just leave it out.
- tlamponi 6y agoLets use :: nowadays ;-) After all we got ~16 % IPv6 traffic hitting our repository CDN. (seems to match with an observation of LWN https://lwn.net/Articles/808896/ https://lwn.net/Articles/808896/ )