diff options
author | Pierre-Yves Ritschard <pyr@cvs.openbsd.org> | 2008-05-06 13:33:51 +0000 |
---|---|---|
committer | Pierre-Yves Ritschard <pyr@cvs.openbsd.org> | 2008-05-06 13:33:51 +0000 |
commit | 4053d3d1e9e579c9002ffd6dc9fd649f1dd60d3a (patch) | |
tree | 467fb47f55f5ae6098d737c4db185dc7e2958f43 /sys/netmpls/mpls.h | |
parent | 4d9f0eb769fe12a4faf5c55b2ce36a8165ba83fe (diff) |
bring in the mpe interface - for ``MPLS Provider Edge'' - this is a work
in progress and some bits need to be cleaned up but will be in-tree for
convenience.
ok claudio@, norby@
Diffstat (limited to 'sys/netmpls/mpls.h')
-rw-r--r-- | sys/netmpls/mpls.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/netmpls/mpls.h b/sys/netmpls/mpls.h index d721027cedb..98a52763021 100644 --- a/sys/netmpls/mpls.h +++ b/sys/netmpls/mpls.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mpls.h,v 1.4 2008/04/30 07:39:48 norby Exp $ */ +/* $OpenBSD: mpls.h,v 1.5 2008/05/06 13:33:50 pyr Exp $ */ /* * Copyright (C) 1999, 2000 and 2001 AYAME Project, WIDE Project. @@ -44,6 +44,8 @@ /* * Structure of a SHIM header. */ +#define MPLS_LABEL_MAX ((1 << 20) - 1) + struct shim_hdr { u_int32_t shim_label; /* 20 bit label, 4 bit exp & BoS, 8 bit TTL */ }; @@ -137,6 +139,16 @@ struct sockaddr_mpls { #endif #ifdef _KERNEL + +struct mpe_softc { + struct ifnet sc_if; /* the interface */ + int sc_unit; + struct shim_hdr sc_shim; + LIST_ENTRY(mpe_softc) sc_list; +}; + +#define MPE_HDRLEN sizeof(struct shim_hdr) + extern int mpls_raw_usrreq(struct socket *, int, struct mbuf *, struct mbuf *, struct mbuf *); @@ -152,5 +164,6 @@ struct mbuf *mpls_shim_swap(struct mbuf *, struct sockaddr_mpls *); struct mbuf *mpls_shim_push(struct mbuf *, struct sockaddr_mpls *); int mpls_sysctl(int *, u_int, void *, size_t *, void *, size_t); +void mpls_input(struct mbuf *); #endif /* _KERNEL */ |