Mercurial
view third_party/libuv/docs/code/interfaces/main.c @ 279:b3b547563ec7
Add Google connector service and agent wiki
Implement the C/Seobeo Google Drive and Gmail connector with encrypted OAuth storage, Zenbu authentication, browser testing, AI tool discovery, chunked HTTP decoding, and Bazel coverage. Consolidate repository guidance into progressive wiki documentation and enforce arena-first allocation for new first-party C code.
Co-authored-by: Copilot <[email protected]>
Copilot-Session: 84c338fd-0939-4bb3-b7f3-1062eb213e5d
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Mon, 17 Aug 2026 22:22:36 -0700 |
| parents | 948de3f54cea |
| children |
line wrap: on
line source
#include <stdio.h> #include <uv.h> int main() { char buf[512]; uv_interface_address_t *info; int count, i; uv_interface_addresses(&info, &count); i = count; printf("Number of interfaces: %d\n", count); while (i--) { uv_interface_address_t interface_a = info[i]; printf("Name: %s\n", interface_a.name); printf("Internal? %s\n", interface_a.is_internal ? "Yes" : "No"); if (interface_a.address.address4.sin_family == AF_INET) { uv_ip4_name(&interface_a.address.address4, buf, sizeof(buf)); printf("IPv4 address: %s\n", buf); } else if (interface_a.address.address4.sin_family == AF_INET6) { uv_ip6_name(&interface_a.address.address6, buf, sizeof(buf)); printf("IPv6 address: %s\n", buf); } printf("\n"); } uv_free_interface_addresses(info, count); return 0; }