Lines Matching refs:buf

44 	static char	buf[NI_MAXHOST];  in sockaddr_to_text()  local
46 if (getnameinfo(sa, sa->sa_len, buf, sizeof(buf), NULL, 0, in sockaddr_to_text()
50 return (buf); in sockaddr_to_text()
109 static char buf[NI_MAXHOST + 5]; in sa_to_text() local
112 buf[0] = '\0'; in sa_to_text()
113 p = buf; in sa_to_text()
116 (void)strlcpy(buf, "local", sizeof buf); in sa_to_text()
130 return (buf); in sa_to_text()
143 static char buf[40]; in time_to_text() local
158 if (!bsnprintf(buf, sizeof(buf), in time_to_text()
169 return buf; in time_to_text()
176 char buf[64]; in duration_to_text() local
199 (void)snprintf(buf, sizeof buf, "%lldd", d); in duration_to_text()
200 (void)strlcat(dst, buf, sizeof dst); in duration_to_text()
203 (void)snprintf(buf, sizeof buf, "%dh", h); in duration_to_text()
204 (void)strlcat(dst, buf, sizeof dst); in duration_to_text()
207 (void)snprintf(buf, sizeof buf, "%dm", m); in duration_to_text()
208 (void)strlcat(dst, buf, sizeof dst); in duration_to_text()
211 (void)snprintf(buf, sizeof buf, "%ds", s); in duration_to_text()
212 (void)strlcat(dst, buf, sizeof dst); in duration_to_text()
225 char buf[NI_MAXHOST]; in text_to_netaddr() local
242 if ((len = strlcpy(buf, s, sizeof buf)) >= sizeof buf) in text_to_netaddr()
249 if ((len = strlcpy(buf, s, sizeof buf)) >= sizeof buf) in text_to_netaddr()
251 if (buf[len-1] != ']') in text_to_netaddr()
253 buf[len-1] = 0; in text_to_netaddr()
255 bits = inet_net_pton(AF_INET6, buf, &ssin6.sin6_addr, in text_to_netaddr()
414 static char buf[4096]; in rule_to_text() local
416 memset(buf, 0, sizeof buf); in rule_to_text()
417 (void)strlcpy(buf, "match", sizeof buf); in rule_to_text()
420 (void)strlcat(buf, " !", sizeof buf); in rule_to_text()
421 (void)strlcat(buf, " tag ", sizeof buf); in rule_to_text()
422 (void)strlcat(buf, r->table_tag, sizeof buf); in rule_to_text()
427 (void)strlcat(buf, " !", sizeof buf); in rule_to_text()
429 (void)strlcat(buf, " from socket", sizeof buf); in rule_to_text()
431 (void)strlcat(buf, " from rdns", sizeof buf); in rule_to_text()
433 (void)strlcat(buf, " ", sizeof buf); in rule_to_text()
434 (void)strlcat(buf, r->table_from, sizeof buf); in rule_to_text()
438 (void)strlcat(buf, " from any", sizeof buf); in rule_to_text()
440 (void)strlcat(buf, " from local", sizeof buf); in rule_to_text()
442 (void)strlcat(buf, " from src ", sizeof buf); in rule_to_text()
443 (void)strlcat(buf, r->table_from, sizeof buf); in rule_to_text()
449 (void)strlcat(buf, " !", sizeof buf); in rule_to_text()
451 (void)strlcat(buf, " for any", sizeof buf); in rule_to_text()
453 (void)strlcat(buf, " for local", sizeof buf); in rule_to_text()
455 (void)strlcat(buf, " for domain ", sizeof buf); in rule_to_text()
456 (void)strlcat(buf, r->table_for, sizeof buf); in rule_to_text()
462 (void)strlcat(buf, " !", sizeof buf); in rule_to_text()
463 (void)strlcat(buf, " helo ", sizeof buf); in rule_to_text()
464 (void)strlcat(buf, r->table_smtp_helo, sizeof buf); in rule_to_text()
469 (void)strlcat(buf, " !", sizeof buf); in rule_to_text()
470 (void)strlcat(buf, " auth", sizeof buf); in rule_to_text()
472 (void)strlcat(buf, " ", sizeof buf); in rule_to_text()
473 (void)strlcat(buf, r->table_smtp_auth, sizeof buf); in rule_to_text()
479 (void)strlcat(buf, " !", sizeof buf); in rule_to_text()
480 (void)strlcat(buf, " tls", sizeof buf); in rule_to_text()
485 (void)strlcat(buf, " !", sizeof buf); in rule_to_text()
486 (void)strlcat(buf, " mail-from ", sizeof buf); in rule_to_text()
487 (void)strlcat(buf, r->table_smtp_mail_from, sizeof buf); in rule_to_text()
492 (void)strlcat(buf, " !", sizeof buf); in rule_to_text()
493 (void)strlcat(buf, " rcpt-to ", sizeof buf); in rule_to_text()
494 (void)strlcat(buf, r->table_smtp_rcpt_to, sizeof buf); in rule_to_text()
496 (void)strlcat(buf, " action ", sizeof buf); in rule_to_text()
498 (void)strlcat(buf, "reject", sizeof buf); in rule_to_text()
500 (void)strlcat(buf, r->dispatcher, sizeof buf); in rule_to_text()
501 return buf; in rule_to_text()
508 char buf[PATH_MAX]; in text_to_userinfo() local
512 memset(buf, 0, sizeof buf); in text_to_userinfo()
513 p = buf; in text_to_userinfo()
519 if (strlcpy(userinfo->username, buf, in text_to_userinfo()
523 memset(buf, 0, sizeof buf); in text_to_userinfo()
524 p = buf; in text_to_userinfo()
529 userinfo->uid = strtonum(buf, 0, UID_MAX, &errstr); in text_to_userinfo()
533 memset(buf, 0, sizeof buf); in text_to_userinfo()
534 p = buf; in text_to_userinfo()
539 userinfo->gid = strtonum(buf, 0, GID_MAX, &errstr); in text_to_userinfo()
786 static char buf[256]; in tls_to_text() local
788 (void)snprintf(buf, sizeof buf, "%s:%s:%d", in tls_to_text()
793 return (buf); in tls_to_text()