diff options
author | Esben Norby <norby@cvs.openbsd.org> | 2008-04-23 10:55:15 +0000 |
---|---|---|
committer | Esben Norby <norby@cvs.openbsd.org> | 2008-04-23 10:55:15 +0000 |
commit | 8694db9f97b2d1604d2285ca01ea73760386f1bc (patch) | |
tree | 4fd89de9cf376a77bb5a6468574b4529a20130aa /sys/kern | |
parent | c9d717b5186297c9c69c69b1e39f99859000ec30 (diff) |
Import MPLS (Multi Protocol Label Switching)
MPLS support partly based on the (abandoned?) AYAME project.
Basic LSR (Label Switch Router) functionality is present, but not fully
functional yet.
It is currently possible to insert entries in the LIB (Label Information Base)
with route(8), but setting the operation type is not supported yet.
Imported to allow more people to work on this in the coming weeks.
ok claudio@ laurent@ dlg@
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/Makefile | 4 | ||||
-rw-r--r-- | sys/kern/uipc_domain.c | 12 |
2 files changed, 13 insertions, 3 deletions
diff --git a/sys/kern/Makefile b/sys/kern/Makefile index e54f67e2fec..f556d151769 100644 --- a/sys/kern/Makefile +++ b/sys/kern/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.17 2007/06/01 05:37:14 deraadt Exp $ +# $OpenBSD: Makefile,v 1.18 2008/04/23 10:55:14 norby Exp $ # Makefile for kernel tags files, init_sysent, etc. @@ -41,7 +41,7 @@ DGEN= compat compat/common compat/freebsd compat/hpux compat/ibcs2 \ miscfs miscfs/deadfs miscfs/fifofs \ miscfs/portal miscfs/procfs miscfs/specfs \ msdosfs \ - net netinet \ + net netinet netmpls \ nfs \ scsi \ sys \ diff --git a/sys/kern/uipc_domain.c b/sys/kern/uipc_domain.c index e2bcfcc5320..c991d601566 100644 --- a/sys/kern/uipc_domain.c +++ b/sys/kern/uipc_domain.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_domain.c,v 1.26 2007/06/06 10:04:36 henning Exp $ */ +/* $OpenBSD: uipc_domain.c,v 1.27 2008/04/23 10:55:14 norby Exp $ */ /* $NetBSD: uipc_domain.c,v 1.14 1996/02/09 19:00:44 christos Exp $ */ /* @@ -91,6 +91,9 @@ domaininit(void) #ifdef NETATALK ADDDOMAIN(atalk); #endif +#ifdef MPLS + ADDDOMAIN(mpls); +#endif #ifdef NATM ADDDOMAIN(natm); #endif @@ -202,6 +205,13 @@ net_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, dp = pffinddomain(family); if (dp == NULL) return (ENOPROTOOPT); +#ifdef MPLS + /* XXX WARNING: big fat ugly hack */ + /* stupid net.mpls is special as it does not have a protocol */ + if (family == PF_MPLS) + return (dp->dom_protosw[0].pr_sysctl(name + 1, namelen - 1, + oldp, oldlenp, newp, newlen)); +#endif if (namelen < 3) return (EISDIR); /* overloaded */ |