Module Name:    src
Committed By:   liamjfoy
Date:           Wed Mar 19 10:54:20 UTC 2014

Modified Files:
        src/sys/netinet: ip_flow.c ip_var.h

Log Message:
Move ipflow into ip_var.h and fix confliction


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/netinet/ip_flow.c
cvs rdiff -u -r1.98 -r1.99 src/sys/netinet/ip_var.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netinet/ip_flow.c
diff -u src/sys/netinet/ip_flow.c:1.61 src/sys/netinet/ip_flow.c:1.62
--- src/sys/netinet/ip_flow.c:1.61	Wed Mar 19 08:27:21 2014
+++ src/sys/netinet/ip_flow.c	Wed Mar 19 10:54:20 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_flow.c,v 1.61 2014/03/19 08:27:21 liamjfoy Exp $	*/
+/*	$NetBSD: ip_flow.c,v 1.62 2014/03/19 10:54:20 liamjfoy Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_flow.c,v 1.61 2014/03/19 08:27:21 liamjfoy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_flow.c,v 1.62 2014/03/19 10:54:20 liamjfoy Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -63,20 +63,6 @@ __KERNEL_RCSID(0, "$NetBSD: ip_flow.c,v 
  * Similar code is very well commented in netinet6/ip6_flow.c
  */ 
 
-struct ipflow {
-	LIST_ENTRY(ipflow) ipf_list;	/* next in active list */
-	LIST_ENTRY(ipflow) ipf_hash;	/* next ipflow in bucket */
-	struct in_addr ipf_dst;		/* destination address */
-	struct in_addr ipf_src;		/* source address */
-	uint8_t ipf_tos;		/* type-of-service */
-	struct route ipf_ro;		/* associated route entry */
-	u_long ipf_uses;		/* number of uses in this period */
-	u_long ipf_last_uses;		/* number of uses in last period */
-	u_long ipf_dropped;		/* ENOBUFS retured by if_output */
-	u_long ipf_errors;		/* other errors returned by if_output */
-	u_int ipf_timer;		/* lifetime timer */
-};
-
 #define	IPFLOW_HASHBITS		6	/* should not be a multiple of 8 */
 
 static struct pool ipflow_pool;
@@ -348,7 +334,7 @@ ipflow_free(struct ipflow *ipf)
 	splx(s);
 }
 
-static struct ipflow *
+struct ipflow *
 ipflow_reap(bool just_one)
 {
 	while (just_one || ipflow_inuse > ip_maxflows) {

Index: src/sys/netinet/ip_var.h
diff -u src/sys/netinet/ip_var.h:1.98 src/sys/netinet/ip_var.h:1.99
--- src/sys/netinet/ip_var.h:1.98	Wed Mar 19 08:27:21 2014
+++ src/sys/netinet/ip_var.h	Wed Mar 19 10:54:20 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_var.h,v 1.98 2014/03/19 08:27:21 liamjfoy Exp $	*/
+/*	$NetBSD: ip_var.h,v 1.99 2014/03/19 10:54:20 liamjfoy Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -49,6 +49,23 @@ struct ipovly {
 } __packed;
 
 /*
+ * IP Flow structure
+ */
+struct ipflow {
+	LIST_ENTRY(ipflow) ipf_list;	/* next in active list */
+	LIST_ENTRY(ipflow) ipf_hash;	/* next ipflow in bucket */
+	struct in_addr ipf_dst;		/* destination address */
+	struct in_addr ipf_src;		/* source address */
+	uint8_t ipf_tos;		/* type-of-service */
+	struct route ipf_ro;		/* associated route entry */
+	u_long ipf_uses;		/* number of uses in this period */
+	u_long ipf_last_uses;		/* number of uses in last period */
+	u_long ipf_dropped;		/* ENOBUFS retured by if_output */
+	u_long ipf_errors;		/* other errors returned by if_output */
+	u_int ipf_timer;		/* lifetime timer */
+};
+
+/*
  * IP sequence queue structure.
  *
  * XXX -- The following explains why the ipqe_m field is here, for TCP's use:
@@ -222,7 +239,7 @@ int	 rip_usrreq(struct socket *,
 	    int, struct mbuf *, struct mbuf *, struct mbuf *, struct lwp *);
 int	ipflow_init(int);
 void	ipflow_poolinit(void);
-void	ipflow_reap(bool);
+struct ipflow *ipflow_reap(bool);
 void	ipflow_create(const struct route *, struct mbuf *);
 void	ipflow_slowtimo(void);
 int	ipflow_invalidate_all(int);

Reply via email to