Lines Matching refs:buf
26 const char *inet_proto_n2a(int proto, char *buf, int len)
39 strncpy(buf, pe->p_name, len);
40 return buf;
42 snprintf(buf, len, "ipproto-%d", proto);
43 return buf;
46 int inet_proto_a2n(const char *buf)
52 if (icache>=0 && strcmp(ncache, buf) == 0)
55 if (buf[0] >= '0' && buf[0] <= '9') {
57 if (get_u8(&ret, buf, 10))
62 pe = getprotobyname(buf);