  #endif
  	int caplen, curlen, hdrlen, totlen;
  	int do_wakeup = 0;
-@@ -2111,60 +2232,76 @@ catchpacket(struct bpf_d *d, u_char *pkt
+@@ -2111,60 +2229,76 @@ catchpacket(struct bpf_d *d, u_char *pkt
  		 * reader should be woken up.
  		 */
  		do_wakeup = 1;

 	pktlen = m_length(m, NULL);
 
 	gottime = BPF_TSTAMP_NONE;
@@ -1888,44 +1965,58 @@ bpf_mtap(struct bpf_if *bp, struct mbuf 
 		bf = bpf_jitter_enable != 0 ? d->bd_bfilter : NULL;
 		/* XXX We cannot handle multiple mbufs. */
 		if (bf != NULL && m->m_next == NULL)

Allow to choose between feedback and feed-forward clock for timestamping.

---
 net/bpf.c |  144 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 net/bpf.h |   18 +++++++
 2 files changed, 157 insertions(+), 5 deletions(-)

Index: sys/net/bpf.c
===================================================================
--- sys.orig/net/bpf.c	2011-06-29 16:57:27.000000000 +1000
+++ sys/net/bpf.c	2011-06-29 18:28:25.000000000 +1000
@@ -1,19 +1,25 @@
 /*-
  * Copyright (C) 1990, 1991, 1993
