From owner-p4-projects@FreeBSD.ORG Thu Jun 19 23:51:25 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B9D211065677; Thu, 19 Jun 2008 23:51:25 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D79CA1065676 for ; Thu, 19 Jun 2008 23:51:24 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BE2B38FC1E for ; Thu, 19 Jun 2008 23:51:24 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m5JNpO6t091266 for ; Thu, 19 Jun 2008 23:51:24 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m5JNpOAJ091264 for perforce@freebsd.org; Thu, 19 Jun 2008 23:51:24 GMT (envelope-from rpaulo@FreeBSD.org) Date: Thu, 19 Jun 2008 23:51:24 GMT Message-Id: <200806192351.m5JNpOAJ091264@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo To: Perforce Change Reviews Cc: Subject: PERFORCE change 143796 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2008 23:51:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=143796 Change 143796 by rpaulo@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 @@ -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);