Type EAI [src]

Source

pub const EAI = if (builtin.abi.isAndroid()) enum(c_int) { /// address family for hostname not supported ADDRFAMILY = 1, /// temporary failure in name resolution AGAIN = 2, /// invalid value for ai_flags BADFLAGS = 3, /// non-recoverable failure in name resolution FAIL = 4, /// ai_family not supported FAMILY = 5, /// memory allocation failure MEMORY = 6, /// no address associated with hostname NODATA = 7, /// hostname nor servname provided, or not known NONAME = 8, /// servname not supported for ai_socktype SERVICE = 9, /// ai_socktype not supported SOCKTYPE = 10, /// system error returned in errno SYSTEM = 11, /// invalid value for hints BADHINTS = 12, /// resolved protocol is unknown PROTOCOL = 13, /// argument buffer overflow OVERFLOW = 14, MAX = 15, _, } else switch (native_os) { .linux, .emscripten => enum(c_int) { BADFLAGS = -1, NONAME = -2, AGAIN = -3, FAIL = -4, FAMILY = -6, SOCKTYPE = -7, SERVICE = -8, MEMORY = -10, SYSTEM = -11, OVERFLOW = -12, NODATA = -5, ADDRFAMILY = -9, INPROGRESS = -100, CANCELED = -101, NOTCANCELED = -102, ALLDONE = -103, INTR = -104, IDN_ENCODE = -105, _, }, .haiku, .dragonfly, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => enum(c_int) { /// address family for hostname not supported ADDRFAMILY = 1, /// temporary failure in name resolution AGAIN = 2, /// invalid value for ai_flags BADFLAGS = 3, /// non-recoverable failure in name resolution FAIL = 4, /// ai_family not supported FAMILY = 5, /// memory allocation failure MEMORY = 6, /// no address associated with hostname NODATA = 7, /// hostname nor servname provided, or not known NONAME = 8, /// servname not supported for ai_socktype SERVICE = 9, /// ai_socktype not supported SOCKTYPE = 10, /// system error returned in errno SYSTEM = 11, /// invalid value for hints BADHINTS = 12, /// resolved protocol is unknown PROTOCOL = 13, /// argument buffer overflow OVERFLOW = 14, _, }, .solaris, .illumos => enum(c_int) { /// address family for hostname not supported ADDRFAMILY = 1, /// name could not be resolved at this time AGAIN = 2, /// flags parameter had an invalid value BADFLAGS = 3, /// non-recoverable failure in name resolution FAIL = 4, /// address family not recognized FAMILY = 5, /// memory allocation failure MEMORY = 6, /// no address associated with hostname NODATA = 7, /// name does not resolve NONAME = 8, /// service not recognized for socket type SERVICE = 9, /// intended socket type was not recognized SOCKTYPE = 10, /// system error returned in errno SYSTEM = 11, /// argument buffer overflow OVERFLOW = 12, /// resolved protocol is unknown PROTOCOL = 13, _, }, .openbsd => enum(c_int) { /// address family for hostname not supported ADDRFAMILY = -9, /// name could not be resolved at this time AGAIN = -3, /// flags parameter had an invalid value BADFLAGS = -1, /// non-recoverable failure in name resolution FAIL = -4, /// address family not recognized FAMILY = -6, /// memory allocation failure MEMORY = -10, /// no address associated with hostname NODATA = -5, /// name does not resolve NONAME = -2, /// service not recognized for socket type SERVICE = -8, /// intended socket type was not recognized SOCKTYPE = -7, /// system error returned in errno SYSTEM = -11, /// invalid value for hints BADHINTS = -12, /// resolved protocol is unknown PROTOCOL = -13, /// argument buffer overflow OVERFLOW = -14, _, }, // https://github.com/SerenityOS/serenity/blob/d510d2aeb2facbd8f6c383d70fd1b033e1fee5dd/Userland/Libraries/LibC/netdb.h#L77-L88 .serenity => enum(c_int) { ADDRFAMILY = 1, AGAIN = 2, BADFLAGS = 3, FAIL = 4, FAMILY = 5, MEMORY = 6, NODATA = 7, NONAME = 8, SERVICE = 9, SOCKTYPE = 10, SYSTEM = 11, OVERFLOW = 12, _, }, else => void, }