Skip to content

HostsEntry

Description

One row from /etc/hosts – a hostname (or alias) paired with its IP address. We store IPv4 addresses in the first four bytes of ip[]; IPv6 uses all 16.

Usage example (Cross-references)

Usage examples (Cross-references)
                    break;
    
                HostsEntry e = {0};
                e.name       = StrInitFromCstr(nm_start, nm_len, alloc);
                ascii_lower(e.name.data, e.name.length);
            u8   ip[16];
            bool is_ipv6;
        } HostsEntry;
    
        typedef Vec(HostsEntry) HostsTable;
        } HostsEntry;
    
        typedef Vec(HostsEntry) HostsTable;
        typedef Vec(SocketAddr) DnsAddrs;
Last updated on