DragonFly BSD
DragonFly commits List (threaded) for 2006-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

cvs commit: src/sys/net bpf.c


From: Sepherosa Ziehau <sephe@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 30 Jul 2006 02:39:27 -0700 (PDT)

sephe       2006/07/30 02:39:27 PDT

DragonFly src repository

  Modified files:
    sys/net              bpf.c 
  Log:
  Rather than calling mircotime() in catchpacket(), make catchpacket()
  take a timeval indicating when the packet was captured. Move
  microtime() to the calling functions and grab the timestamp as soon
  as we know that we're going to call catchpacket at least once.
  
  This means that we call microtime() once per matched packet, as
  opposed to once per matched packet per bpf listener. It also means
  that we return the same timestamp to all bpf listeners, rather than
  slightly different ones.
  
  It would be more accurate to call microtime() even earlier for all
  packets, but microtime() can be costly, so this didn't seem like a good idea.
  
  Obtained-from: FreeBSD (dwmalone@xxxxxxxxxxx)
  Remined-and-Reviewed-by: joerg
  
  Revision  Changes    Path
  1.32      +24 -7     src/sys/net/bpf.c


http://www.dragonflybsd.org/cvsweb/src/sys/net/bpf.c.diff?r1=1.31&r2=1.32&f=u



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]