Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet Move ipflow into ip_var.h and fix confliction



details:   https://anonhg.NetBSD.org/src/rev/cb0f96a6003f
branches:  trunk
changeset: 327863:cb0f96a6003f
user:      liamjfoy <liamjfoy%NetBSD.org@localhost>
date:      Wed Mar 19 10:54:20 2014 +0000

description:
Move ipflow into ip_var.h and fix confliction

diffstat:

 sys/netinet/ip_flow.c |  20 +++-----------------
 sys/netinet/ip_var.h  |  21 +++++++++++++++++++--
 2 files changed, 22 insertions(+), 19 deletions(-)

diffs (90 lines):

diff -r b9ae6b8cccd9 -r cb0f96a6003f sys/netinet/ip_flow.c
--- a/sys/netinet/ip_flow.c     Wed Mar 19 08:27:21 2014 +0000
+++ b/sys/netinet/ip_flow.c     Wed Mar 19 10:54:20 2014 +0000
@@ -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 @@
  * 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 @@
        splx(s);
 }
 
-static struct ipflow *
+struct ipflow *
 ipflow_reap(bool just_one)
 {
        while (just_one || ipflow_inuse > ip_maxflows) {
diff -r b9ae6b8cccd9 -r cb0f96a6003f sys/netinet/ip_var.h
--- a/sys/netinet/ip_var.h      Wed Mar 19 08:27:21 2014 +0000
+++ b/sys/netinet/ip_var.h      Wed Mar 19 10:54:20 2014 +0000
@@ -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 @@
 } __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, 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);



Home | Main Index | Thread Index | Old Index