Paul Vixie is working on a tcpdump-like dns packet capture tool. http://public.oarci.net/tools/dnscap/
I can't seem to get it to compile on OBSD. I get the following errors. GTX-440:/tmp/dnscap#make (compile dnscap.c w/ -g -O) /bin/sh: isc-config.sh: not found dnscap.c:42:26: net/ethernet.h: No such file or directory dnscap.c:69:22: isc/list.h: No such file or directory dnscap.c:137: error: syntax error before "ISC_LINK" dnscap.c:141: error: syntax error before "endpoint_list" dnscap.c:141: warning: type defaults to `int' in declaration of `endpoint_list' dnscap.c:141: warning: data definition has no type or storage class dnscap.c:144: error: syntax error before "ISC_LINK" dnscap.c:151: error: syntax error before "mypcap_list" dnscap.c:151: warning: type defaults to `int' in declaration of `mypcap_list' dnscap.c:151: warning: data definition has no type or storage class dnscap.c:154: error: syntax error before "ISC_LINK" dnscap.c:158: error: syntax error before "vlan_list" dnscap.c:158: warning: type defaults to `int' in declaration of `vlan_list' dnscap.c:158: warning: data definition has no type or storage class dnscap.c:161: error: syntax error before "ISC_LINK" dnscap.c:166: error: syntax error before "text_list" dnscap.c:166: warning: type defaults to `int' in declaration of `text_list' dnscap.c:166: warning: data definition has no type or storage class dnscap.c:176: error: syntax error before '*' token dnscap.c:177: error: syntax error before '*' token dnscap.c:180: error: syntax error before '*' token dnscap.c:180: warning: type defaults to `int' in declaration of `ep_present' dnscap.c:180: warning: type qualifiers ignored on function return type dnscap.c:181: error: syntax error before '*' token dnscap.c:197: error: syntax error before "vlans" dnscap.c:197: warning: type defaults to `int' in declaration of `vlans' dnscap.c:197: warning: data definition has no type or storage class dnscap.c:200: error: syntax error before "initiators" dnscap.c:200: warning: type defaults to `int' in declaration of `initiators' dnscap.c:200: warning: data definition has no type or storage class dnscap.c:201: error: syntax error before "responders" dnscap.c:201: warning: type defaults to `int' in declaration of `responders' dnscap.c:201: warning: data definition has no type or storage class dnscap.c:202: error: syntax error before "mypcaps" dnscap.c:202: warning: type defaults to `int' in declaration of `mypcaps' dnscap.c:202: warning: data definition has no type or storage class dnscap.c: In function `parse_args': dnscap.c:321: warning: implicit declaration of function `ISC_LIST_INIT' dnscap.c:353: warning: implicit declaration of function `ISC_LINK_INIT' dnscap.c:357: warning: implicit declaration of function `ISC_LIST_APPEND' dnscap.c:360: warning: implicit declaration of function `ISC_LIST_EMPTY' dnscap.c:460: warning: implicit declaration of function `ISC_LIST_HEAD' dnscap.c:460: warning: assignment makes pointer from integer without a cast dnscap.c:462: warning: implicit declaration of function `ISC_LIST_NEXT' dnscap.c:462: warning: assignment makes pointer from integer without a cast dnscap.c:470: warning: assignment makes pointer from integer without a cast dnscap.c:472: warning: assignment makes pointer from integer without a cast dnscap.c: At top level: dnscap.c:501: error: syntax error before '*' token dnscap.c:501: warning: `endpoint_arg' was used with no prototype before its definition dnscap.c: In function `endpoint_arg': dnscap.c:505: error: `arg' undeclared (first use in this function) dnscap.c:505: error: (Each undeclared identifier is reported only once dnscap.c:505: error: for each function it appears in.) dnscap.c:507: error: `list' undeclared (first use in this function) dnscap.c: At top level: dnscap.c:539: error: syntax error before '*' token dnscap.c:539: warning: `endpoint_add' was used with no prototype before its definition dnscap.c: In function `endpoint_add': dnscap.c:544: error: `ia' undeclared (first use in this function) dnscap.c:545: error: `list' undeclared (first use in this function) dnscap.c: In function `prepare_bpft': dnscap.c:551: error: syntax error before "bpfl" dnscap.c:565: error: `ns_o_update' undeclared (first use in this function) dnscap.c:575: error: `bpfl' undeclared (first use in this function) dnscap.c:600: warning: assignment makes pointer from integer without a cast dnscap.c:602: warning: assignment makes pointer from integer without a cast dnscap.c:607: warning: assignment makes pointer from integer without a cast dnscap.c:609: warning: assignment makes pointer from integer without a cast dnscap.c:618: warning: assignment makes pointer from integer without a cast dnscap.c:620: warning: assignment makes pointer from integer without a cast dnscap.c: At top level: dnscap.c:635: error: syntax error before '*' token dnscap.c:635: warning: type qualifiers ignored on function return type dnscap.c:635: warning: return type defaults to `int' dnscap.c:635: warning: no previous prototype for `ep_present' dnscap.c: In function `ep_present': dnscap.c:638: error: `list' undeclared (first use in this function) dnscap.c:638: warning: assignment makes pointer from integer without a cast dnscap.c:640: warning: assignment makes pointer from integer without a cast dnscap.c:641: error: `ia' undeclared (first use in this function) dnscap.c: At top level: dnscap.c:659: error: syntax error before '*' token dnscap.c:659: warning: `text_add' was used with no prototype before its definition dnscap.c: In function `text_add': dnscap.c:667: error: `fmt' undeclared (first use in this function) dnscap.c:671: error: `list' undeclared (first use in this function) dnscap.c:667: error: `va_start' used in function with fixed args dnscap.c: In function `open_pcaps': dnscap.c:683: warning: assignment makes pointer from integer without a cast dnscap.c:685: warning: assignment makes pointer from integer without a cast dnscap.c: In function `poll_pcaps': dnscap.c:746: warning: assignment makes pointer from integer without a cast dnscap.c:748: warning: assignment makes pointer from integer without a cast dnscap.c: In function `close_pcaps': dnscap.c:766: warning: assignment makes pointer from integer without a cast dnscap.c:768: warning: assignment makes pointer from integer without a cast dnscap.c: In function `live_packet': dnscap.c:775: error: `NS_INT32SZ' undeclared (first use in this function) dnscap.c:810: error: `ETHERTYPE_IP' undeclared (first use in this function) dnscap.c:824: warning: implicit declaration of function `NS_GET32' dnscap.c:837: error: `ETHER_HDR_LEN' undeclared (first use in this function) dnscap.c:840: error: dereferencing pointer to incomplete type dnscap.c:997: warning: assignment makes pointer from integer without a cast dnscap.c:999: warning: assignment makes pointer from integer without a cast dnscap.c:1023: error: `ns_o_query' undeclared (first use in this function) dnscap.c:1024: error: `ns_o_update' undeclared (first use in this function) dnscap.c:1027: error: `ns_r_noerror' undeclared (first use in this function) dnscap.c:1087: warning: comparison between signed and unsigned dnscap.c:1118: error: incompatible type for argument 1 of `dumper_open' dnscap.c:1127: warning: implicit declaration of function `ns_put32' dnscap.c:775: warning: unused variable `pkt_copy' dnscap.c: In function `in_checksum': dnscap.c:1233: error: `NS_INT16SZ' undeclared (first use in this function) *** Error code 1