PERFORCE change 143796 for review
Rui Paulo
rpaulo at FreeBSD.org
Thu Jun 19 23:51:26 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=143796
Change 143796 by rpaulo at rpaulo_epsilon on 2008/06/19 23:51:13
Add timer facility.
Affected files ...
.. //depot/projects/soc2008/rpaulo-tcpad/Makefile#7 edit
.. //depot/projects/soc2008/rpaulo-tcpad/main.c#7 edit
.. //depot/projects/soc2008/rpaulo-tcpad/timer.c#1 add
.. //depot/projects/soc2008/rpaulo-tcpad/timer.h#1 add
Differences ...
==== //depot/projects/soc2008/rpaulo-tcpad/Makefile#7 (text+ko) ====
@@ -1,7 +1,7 @@
-# $P4: //depot/projects/soc2008/rpaulo-tcpad/Makefile#6 $
+# $P4: //depot/projects/soc2008/rpaulo-tcpad/Makefile#7 $
PROG=tcpad
-SRCS=main.c device.c linkhdr.c handler.c dumper.c
+SRCS=main.c device.c linkhdr.c handler.c dumper.c timer.c
CFLAGS+=-DDEBUG -ggdb
WARNS=5
LDADD=-lpcap
==== //depot/projects/soc2008/rpaulo-tcpad/main.c#7 (text+ko) ====
@@ -23,7 +23,7 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $P4: //depot/projects/soc2008/rpaulo-tcpad/main.c#6 $
+ * $P4: //depot/projects/soc2008/rpaulo-tcpad/main.c#7 $
*/
#include <err.h>
@@ -38,6 +38,7 @@
#include "device.h"
#include "linkhdr.h"
#include "handler.h"
+#include "timer.h"
static void
usage(void)
@@ -111,7 +112,9 @@
if (linkhlen == -1)
errx(1, "interface type not recognized");
- LIST_INIT(&chead);
+ LIST_INIT(&tcpchead);
+
+ timer_setup();
pcap_loop(p, -1, tcpad_pcaphandler, (unsigned char *)&linkhlen);
More information about the p4-projects
mailing list