Lines Matching refs:buf
77 static void addr2str(int af, const void *addr, unsigned port, char *buf) in addr2str() argument
79 if (inet_ntop(af, addr, buf, ADDR_LEN) == NULL) { in addr2str()
80 *buf = '\0'; in addr2str()
83 size_t len = strlen(buf); in addr2str()
85 snprintf(buf+len, ADDR_LEN-len, ":%d", port); in addr2str()
87 strncat(buf+len, ":*", ADDR_LEN-len-1); in addr2str()
96 char buf[BUFSIZ]; in ipv4() local
97 fgets(buf, BUFSIZ, fp); in ipv4()
98 while (fgets(buf, BUFSIZ, fp)){ in ipv4()
103 int n = sscanf(buf, " %d: %x:%x %x:%x %x %x:%x", in ipv4()
123 char buf[BUFSIZ]; in ipv6() local
124 fgets(buf, BUFSIZ, fp); in ipv6()
125 while (fgets(buf, BUFSIZ, fp)){ in ipv6()
130 int n = sscanf(buf, " %d: %8x%8x%8x%8x:%x %8x%8x%8x%8x:%x %x %x:%x", in ipv6()