Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Update rumpdev_npf; use WARNS=4.
details: https://anonhg.NetBSD.org/src/rev/c83116a37dba
branches: trunk
changeset: 778820:c83116a37dba
user: rmind <rmind%NetBSD.org@localhost>
date: Sat Apr 14 19:01:21 2012 +0000
description:
Update rumpdev_npf; use WARNS=4.
diffstat:
sys/net/npf/npf.h | 8 ++------
sys/net/npf/npf_impl.h | 8 ++------
sys/net/npf/npf_mbuf.c | 8 ++++----
sys/net/npf/npf_ncode.h | 4 ++--
sys/rump/dev/lib/libnpf/Makefile | 13 +++++++++----
5 files changed, 19 insertions(+), 22 deletions(-)
diffs (141 lines):
diff -r a2aecf569a56 -r c83116a37dba sys/net/npf/npf.h
--- a/sys/net/npf/npf.h Sat Apr 14 18:26:31 2012 +0000
+++ b/sys/net/npf/npf.h Sat Apr 14 19:01:21 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: npf.h,v 1.15 2012/03/11 18:27:59 rmind Exp $ */
+/* $NetBSD: npf.h,v 1.16 2012/04/14 19:01:21 rmind Exp $ */
/*-
* Copyright (c) 2009-2011 The NetBSD Foundation, Inc.
@@ -45,10 +45,6 @@
#include <netinet/in_systm.h>
#include <netinet/in.h>
-#ifdef _NPF_TESTING
-#include "testing.h"
-#endif
-
#define NPF_VERSION 4
/*
@@ -62,7 +58,7 @@
#define NPF_MAX_NETMASK (128)
#define NPF_NO_NETMASK ((npf_netmask_t)~0)
-#if defined(_KERNEL) || defined(_NPF_TESTING)
+#if defined(_KERNEL)
/* Network buffer. */
typedef void nbuf_t;
diff -r a2aecf569a56 -r c83116a37dba sys/net/npf/npf_impl.h
--- a/sys/net/npf/npf_impl.h Sat Apr 14 18:26:31 2012 +0000
+++ b/sys/net/npf/npf_impl.h Sat Apr 14 19:01:21 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: npf_impl.h,v 1.12 2012/03/11 18:27:59 rmind Exp $ */
+/* $NetBSD: npf_impl.h,v 1.13 2012/04/14 19:01:21 rmind Exp $ */
/*-
* Copyright (c) 2009-2012 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
#ifndef _NPF_IMPL_H_
#define _NPF_IMPL_H_
-#if !defined(_KERNEL) && !defined(_NPF_TESTING)
+#if !defined(_KERNEL)
#error "Kernel-level header only"
#endif
@@ -51,10 +51,6 @@
#include "npf.h"
#include "npf_ncode.h"
-#ifdef _NPF_TESTING
-#include "testing.h"
-#endif
-
#ifdef _NPF_DEBUG
#define NPF_PRINTF(x) printf x
#else
diff -r a2aecf569a56 -r c83116a37dba sys/net/npf/npf_mbuf.c
--- a/sys/net/npf/npf_mbuf.c Sat Apr 14 18:26:31 2012 +0000
+++ b/sys/net/npf/npf_mbuf.c Sat Apr 14 19:01:21 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: npf_mbuf.c,v 1.6 2011/01/18 20:33:46 rmind Exp $ */
+/* $NetBSD: npf_mbuf.c,v 1.7 2012/04/14 19:01:21 rmind Exp $ */
/*-
* Copyright (c) 2009-2011 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: npf_mbuf.c,v 1.6 2011/01/18 20:33:46 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_mbuf.c,v 1.7 2012/04/14 19:01:21 rmind Exp $");
#include <sys/param.h>
#include <sys/mbuf.h>
@@ -117,7 +117,7 @@
/* Current offset in mbuf. */
off = (uintptr_t)n_ptr - mtod(m, uintptr_t);
- KASSERT(off < m->m_len);
+ KASSERT(off < (u_int)m->m_len);
wmark = m->m_len;
/* Is datum overlapping? */
@@ -153,7 +153,7 @@
off = 0;
}
KASSERT(n_ptr == d || mtod(m, uint8_t *) == d);
- KASSERT(len <= m->m_len);
+ KASSERT(len <= (u_int)m->m_len);
/* Non-overlapping case: fetch the actual data. */
if (wr == NBUF_DATA_WRITE) {
diff -r a2aecf569a56 -r c83116a37dba sys/net/npf/npf_ncode.h
--- a/sys/net/npf/npf_ncode.h Sat Apr 14 18:26:31 2012 +0000
+++ b/sys/net/npf/npf_ncode.h Sat Apr 14 19:01:21 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: npf_ncode.h,v 1.6 2012/03/10 22:22:38 christos Exp $ */
+/* $NetBSD: npf_ncode.h,v 1.7 2012/04/14 19:01:21 rmind Exp $ */
/*-
* Copyright (c) 2009-2010 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
#include "npf.h"
-#if defined(_KERNEL) || defined(_NPF_TESTING)
+#if defined(_KERNEL)
/*
* N-code processing, validation & building.
*/
diff -r a2aecf569a56 -r c83116a37dba sys/rump/dev/lib/libnpf/Makefile
--- a/sys/rump/dev/lib/libnpf/Makefile Sat Apr 14 18:26:31 2012 +0000
+++ b/sys/rump/dev/lib/libnpf/Makefile Sat Apr 14 19:01:21 2012 +0000
@@ -1,16 +1,21 @@
-# $NetBSD: Makefile,v 1.1 2010/10/14 22:39:30 haad Exp $
+# $NetBSD: Makefile,v 1.2 2012/04/14 19:01:22 rmind Exp $
+#
+# Public Domain.
#
.PATH: ${.CURDIR}/../../../../net/npf
LIB= rumpdev_npf
-SRCS= npf.c npf_ctl.c npf_handler.c npf_instr.c npf_mbuf.c
-SRCS+= npf_processor.c npf_ruleset.c npf_tableset.c npf_inet.c
-SRCS+= npf_session.c npf_nat.c npf_alg.c
+SRCS= npf.c npf_alg.c npf_ctl.c npf_handler.c
+SRCS+= npf_inet.c npf_instr.c npf_log.c npf_mbuf.c npf_nat.c
+SRCS+= npf_processor.c npf_ruleset.c npf_rproc.c npf_sendpkt.c
+SRCS+= npf_session.c npf_state.c npf_state_tcp.c npf_tableset.c
SRCS+= component.c
+WARNS= 4
+
CPPFLAGS+= -I${.CURDIR}/../../../librump/rumpvfs
.include <bsd.lib.mk>
Home |
Main Index |
Thread Index |
Old Index