summaryrefslogtreecommitdiff
path: root/sys/netmpls/mpls.h
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2010-05-28 12:09:11 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2010-05-28 12:09:11 +0000
commit2bac83383f38d6c6831272c9f331b16c5568f37f (patch)
tree0c7bc187ebea1a331c394aacf2978ed61547b0c2 /sys/netmpls/mpls.h
parenta339b8de8525ed53fdd8ff49a082ebe9444ee33a (diff)
Rework the way we handle MPLS in the kernel. Instead of fumbling MPLS into
ether_output() and later on other L2 output functions use a trick and over- load the ifp->if_output() function pointer on MPLS enabled interfaces to go through mpls_output() which will then call the link level output function. By setting IFXF_MPLS on an interface the output pointers are switched. This now allows to cleanup the MPLS input and output pathes and fix mpe(4) so that the MPLS code now actually works for both P and PE systems. Tested by myself and michele (A custom kernel with MPLS and mpe enabled is still needed).
Diffstat (limited to 'sys/netmpls/mpls.h')
-rw-r--r--sys/netmpls/mpls.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netmpls/mpls.h b/sys/netmpls/mpls.h
index 949b0a110bb..991914eb8b3 100644
--- a/sys/netmpls/mpls.h
+++ b/sys/netmpls/mpls.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpls.h,v 1.21 2009/04/28 12:07:43 michele Exp $ */
+/* $OpenBSD: mpls.h,v 1.22 2010/05/28 12:09:10 claudio Exp $ */
/*
* Copyright (C) 1999, 2000 and 2001 AYAME Project, WIDE Project.
@@ -179,7 +179,8 @@ struct mbuf *mpls_shim_push(struct mbuf *, struct rt_mpls *);
int mpls_sysctl(int *, u_int, void *, size_t *, void *, size_t);
void mpls_input(struct mbuf *);
-struct mbuf *mpls_output(struct mbuf *, struct rtentry *);
+int mpls_output(struct ifnet *, struct mbuf *, struct sockaddr *,
+ struct rtentry *);
void mpls_ip_input(struct mbuf *, u_int8_t);
void mpls_ip6_input(struct mbuf *, u_int8_t);