just pfctl_osfp.c. harder to replace strlcat when it's in a loop, but some of the straight line calls can be done as snprintf followed by one strlcat. worth it?
Index: pfctl_osfp.c =================================================================== RCS file: /cvs/src/usr.sbin/tcpdump/pfctl_osfp.c,v retrieving revision 1.7 diff -u -p -r1.7 pfctl_osfp.c --- pfctl_osfp.c 18 Oct 2010 15:55:28 -0000 1.7 +++ pfctl_osfp.c 23 May 2013 21:28:31 -0000 @@ -1001,33 +1001,28 @@ const char * print_ioctl(struct pf_osfp_ioctl *fp) { static char buf[1024]; - char tmp[32]; + char tmp[1024]; int i, opt; + char *c; - *buf = '\0'; + c = ""; + tmp[0] = '\0'; if (fp->fp_flags & PF_OSFP_WSIZE_DC) - strlcat(buf, "*", sizeof(buf)); + c = "*"; else if (fp->fp_flags & PF_OSFP_WSIZE_MSS) - strlcat(buf, "S", sizeof(buf)); + c = "S"; else if (fp->fp_flags & PF_OSFP_WSIZE_MTU) - strlcat(buf, "T", sizeof(buf)); + c = "T"; else { if (fp->fp_flags & PF_OSFP_WSIZE_MOD) - strlcat(buf, "%", sizeof(buf)); + c = "%"; snprintf(tmp, sizeof(tmp), "%d", fp->fp_wsize); - strlcat(buf, tmp, sizeof(buf)); } - strlcat(buf, ":", sizeof(buf)); + snprintf(buf, sizeof(buf), "%s%s", c, tmp); - snprintf(tmp, sizeof(tmp), "%d", fp->fp_ttl); + snprintf(tmp, sizeof(tmp), ":%d:%d:", fp->fp_ttl, + (fp->fp_flags & PF_OSFP_DF) ? 1 : 0); strlcat(buf, tmp, sizeof(buf)); - strlcat(buf, ":", sizeof(buf)); - - if (fp->fp_flags & PF_OSFP_DF) - strlcat(buf, "1", sizeof(buf)); - else - strlcat(buf, "0", sizeof(buf)); - strlcat(buf, ":", sizeof(buf)); if (fp->fp_flags & PF_OSFP_PSIZE_DC) strlcat(buf, "*", sizeof(buf)); @@ -1083,16 +1078,10 @@ print_ioctl(struct pf_osfp_ioctl *fp) if (i != 0) strlcat(buf, ",", sizeof(buf)); } - strlcat(buf, ":", sizeof(buf)); - - strlcat(buf, fp->fp_os.fp_class_nm, sizeof(buf)); - strlcat(buf, ":", sizeof(buf)); - strlcat(buf, fp->fp_os.fp_version_nm, sizeof(buf)); - strlcat(buf, ":", sizeof(buf)); - strlcat(buf, fp->fp_os.fp_subtype_nm, sizeof(buf)); - strlcat(buf, ":", sizeof(buf)); - snprintf(tmp, sizeof(tmp), "TcpOpts %d 0x%llx", fp->fp_optcnt, + snprintf(tmp, sizeof(tmp), ":%s:%s:%s:TcpOpts %d 0x%llx", + fp->fp_os.fp_class_nm, fp->fp_os.fp_version_nm, + fp->fp_os.fp_subtype_nm, fp->fp_optcnt, (long long int)fp->fp_tcpopts); strlcat(buf, tmp, sizeof(buf));