diff options
author | 2019-01-27 02:41:56 +0000 | |
---|---|---|
committer | 2019-01-27 02:41:56 +0000 | |
commit | 2f1dccd9421311b2010cdb46c4feeee2b45bbaee (patch) | |
tree | e899ebfe7fc7fb576488fcb58aca1e3081f3d7e8 /sys/net/if_mpe.c | |
parent | let ether_ioctl handle the mtu. set hardmtu to ETHER_MAX_HARDMTU_LEN. (diff) | |
download | wireguard-openbsd-2f1dccd9421311b2010cdb46c4feeee2b45bbaee.tar.xz wireguard-openbsd-2f1dccd9421311b2010cdb46c4feeee2b45bbaee.zip |
move the mpe_softc definition and mpe macros into the mpe driver.
Diffstat (limited to 'sys/net/if_mpe.c')
-rw-r--r-- | sys/net/if_mpe.c | 17 |
1 files changed, 16 insertions, 1 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 *); |