summaryrefslogtreecommitdiff
path: root/sys/net/if_etherip.c
diff options
context:
space:
mode:
authorJeremie Courreges-Anglas <jca@cvs.openbsd.org>2017-11-17 13:36:05 +0000
committerJeremie Courreges-Anglas <jca@cvs.openbsd.org>2017-11-17 13:36:05 +0000
commit24762cd6b9d0647aa312f5d610c5c0e5d5f53117 (patch)
tree3dc2ebee1f6d3dd2819a2ddebabcffb6251acaa4 /sys/net/if_etherip.c
parent8a98925b998060d4a5405a3751c263525373c0e7 (diff)
Move etherip counters and their allocation to etherip(4)
gif(4) now depends on etherip(4) but this is a temporary drawback: we can get rid of etherip_init(), called from the protocol switch, and ip_ether.c should stop using etherip counters once it is clear that this file doesn't handle ethernet-in-IP any more. ok visa@ as part of a larger diff, ok mpi@
Diffstat (limited to 'sys/net/if_etherip.c')
-rw-r--r--sys/net/if_etherip.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net/if_etherip.c b/sys/net/if_etherip.c
index b87f635d6ec..051a8692faa 100644
--- a/sys/net/if_etherip.c
+++ b/sys/net/if_etherip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_etherip.c,v 1.23 2017/11/15 17:30:20 jca Exp $ */
+/* $OpenBSD: if_etherip.c,v 1.24 2017/11/17 13:36:04 jca Exp $ */
/*
* Copyright (c) 2015 Kazuya GODA <goda@openbsd.org>
*
@@ -80,6 +80,8 @@ LIST_HEAD(, etherip_softc) etherip_softc_list;
int etherip_allow = 0;
#endif
+struct cpumem *etheripcounters;
+
void etheripattach(int);
int etherip_clone_create(struct if_clone *, int);
int etherip_clone_destroy(struct ifnet *);
@@ -98,6 +100,7 @@ void
etheripattach(int count)
{
if_clone_attach(&etherip_cloner);
+ etheripcounters = counters_alloc(etherips_ncounters);
}
int