summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2019-01-27 02:41:57 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2019-01-27 02:41:57 +0000
commit0a7d8e8359d50788fc23047a2e0c7b2a2a64cd1c (patch)
treea3ce094a24f6df71aaaec64dab0f7d251083cddb /sys
parent9be707f9a9b81c6a105a4abba320a553a40384f8 (diff)
move the mpe_softc definition and mpe macros into the mpe driver.
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if_mpe.c17
-rw-r--r--sys/netmpls/mpls.h14
2 files changed, 17 insertions, 14 deletions
diff --git a/sys/net/if_mpe.c b/sys/net/if_mpe.c
index 22ed6967f09..7b55418a2ba 100644
--- a/sys/net/if_mpe.c
+++ b/sys/net/if_mpe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_mpe.c,v 1.66 2019/01/27 02:35:27 dlg Exp $ */
+/* $OpenBSD: if_mpe.c,v 1.67 2019/01/27 02:41:56 dlg Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@spootnik.org>
@@ -45,12 +45,27 @@
#include <netmpls/mpls.h>
+
+
#ifdef MPLS_DEBUG
#define DPRINTF(x) do { if (mpedebug) printf x ; } while (0)
#else
#define DPRINTF(x)
#endif
+struct mpe_softc {
+ struct ifnet sc_if; /* the interface */
+ struct ifaddr sc_ifa;
+ int sc_unit;
+ struct sockaddr_mpls sc_smpls;
+ LIST_ENTRY(mpe_softc) sc_list;
+};
+
+#define MPE_HDRLEN sizeof(struct shim_hdr)
+#define MPE_MTU 1500
+#define MPE_MTU_MIN 256
+#define MPE_MTU_MAX 8192
+
void mpeattach(int);
int mpe_output(struct ifnet *, struct mbuf *, struct sockaddr *,
struct rtentry *);
diff --git a/sys/netmpls/mpls.h b/sys/netmpls/mpls.h
index a0962dd98ad..89fcbc0f14d 100644
--- a/sys/netmpls/mpls.h
+++ b/sys/netmpls/mpls.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpls.h,v 1.38 2018/01/09 06:24:15 dlg Exp $ */
+/* $OpenBSD: mpls.h,v 1.39 2019/01/27 02:41:56 dlg Exp $ */
/*
* Copyright (C) 1999, 2000 and 2001 AYAME Project, WIDE Project.
@@ -155,18 +155,6 @@ struct ifmpwreq {
extern struct domain mplsdomain;
-struct mpe_softc {
- struct ifnet sc_if; /* the interface */
- struct ifaddr sc_ifa;
- int sc_unit;
- struct sockaddr_mpls sc_smpls;
- LIST_ENTRY(mpe_softc) sc_list;
-};
-
-#define MPE_HDRLEN sizeof(struct shim_hdr)
-#define MPE_MTU 1500
-#define MPE_MTU_MIN 256
-#define MPE_MTU_MAX 8192
void mpe_input(struct mbuf *, struct ifnet *, struct sockaddr_mpls *,
u_int8_t);