import os from "os"; /** * Non-loopback, non-link-local addresses of this machine, best first, capped at * MAX_LOCAL_IPS. Returns `[]` when there is nothing we are confident about — * callers must then OMIT the field rather than send an empty array, because * absent means "not reported" on the wire and `[]` would claim the machine has * no addresses (see AgentRegisterMsg.localIps). * * Two rules, applied in this order: * * 1. PHYSICAL BEFORE VIRTUAL, whatever the family. A physical adapter's address * is the one that tells this box from the next one; docker0's 172.17.0.1 is * the same on every machine that runs Docker. Choosing the family first would * make an IPv6-only host with a container bridge report only the bridge and * throw away the single address that identifies it. * 2. Within a tier, IPv4 wins outright: it is what a user recognizes as "the * address of that box on my network", and a typical host also carries several * IPv6 addresses (global, temporary/privacy, ULA) that would bury it. IPv6 is * reported only when that tier has no IPv4 at all, so a v6-only host still * identifies itself. * * The virtual tier is still appended after the physical one (deprioritized, not * banned — see VIRTUAL_INTERFACE), so a container host with nothing else keeps * reporting something. * * The interface table is a parameter for the tests; when it is omitted the * enumeration happens INSIDE the protected region below, because * os.networkInterfaces() is itself a syscall that may fail and this runs on the * registration path — it must cost a field, never the registration. (A default * parameter value would be evaluated before the body, outside the `try`.) */ export declare function collectLocalIps(interfaces?: NodeJS.Dict): string[]; /** * The `localIps` key for an agent:register frame, or nothing — spread into the * message. Keeps the "never send `[]`" rule in ONE place, next to the collector * it belongs to, instead of at every call site that builds a register frame. */ export declare function localIpsField(): { localIps?: string[]; };