summaryrefslogtreecommitdiffstats
path: root/sys/netmpls/mpls.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* spellingjsg2021-03-101-2/+2
| | | | ok gnezdo@ semarie@ mpi@
* Convert mpls_sysctl to sysctl_bounded_argsgnezdo2020-08-191-11/+1
| | | | OK claudio@
* Remove mpls_inkloop and the corresponding sysctl net.mpls.maxloop_inkernel.claudio2019-11-051-5/+3
| | | | | | The value is no longer needed since the MPLS code got refactored some time ago. Found by Thomas Habets (thomas (at) habets se)
* add some macros to help turn labels into shims and back again.dlg2019-01-301-1/+4
|
* use mpls_ip_adjttl and mpls_ip6_adjttl in mpe instead of rolling it again.dlg2019-01-271-2/+6
| | | | | | | | mpls_ip_adjttl now patches the checksum rather than check it and calculate it again. both mpls_ip_adjttl and mpls_ip6_adjttl now rely on the caller to check the sysctls for whether they should run or not, which paves the way for making it configurable in mpe via the tunnel ioctls.
* change how packets are pushed into mpe(4).dlg2019-01-271-6/+1
| | | | | | | mpe(4) adds itself ot the mpls rtable with RTF_LOCAL set, which pushes the packet through mpe_output, which sees RTF_LOCAL can calls mpe_input. this follows what mpw(4) does, and removes a special case in mpls_input.
* move the mpe_softc definition and mpe macros into the mpe driver.dlg2019-01-271-13/+1
|
* make mpls_input take a struct ifnet *ifp argument.dlg2018-01-091-2/+2
| | | | | | | | | | | this makes it like all our other protocol family input functions. mpls_input always looks up the interface the mbuf was received on, but it's always called by code that already has a reference to that interface anyway. the result of this is a few less if_get/if_put calls. ok mpi@ bluhm@ visa@ claudio@
* Remove mpls_raw_usrreq() prototype, that function is gone.claudio2017-02-281-4/+1
|
* Retire the AF_MPLS protosw struct. Nothing is using it and the code was superclaudio2017-02-271-4/+1
| | | | | | | basic anyway. Simplifies the code a lot also by calling the mpls sysctl no longer via the protosw but instead directly. OK mpi@ on a previous diff. Also tested by renato@ who actually found a bug which is now fixed.
* Rework the MPLS handling. Remove the lookup loops since nothing is usingclaudio2015-12-021-2/+2
| | | | | | | | | them and they make everything so much harder with no gain. Remove the ifp argument from mpls_input since it is not needed. On the input side the lookup side is modified a bit when it comes to BOS handling. Tested in a L3VPN setup with ldpd and bgpd. Commiting now so we can move on with cleaning up rt_ifp usage. If this breaks L2VPN I will fix it once reported. OK mpi@
* Don't use mpls_input() as input handler anymore and instead call itrzalamena2015-07-291-3/+2
| | | | | | directly. Also protect non mp-safe functions while at it. ok mpi@.
* Implemented MPLS pseudowire (mpw(4)) to be used with VPLS and VPWS.rzalamena2015-07-201-1/+18
| | | | ok mpi@, claudio@.
* Kill NETISR_MPLS, from now on we will use interface input handlers to dealrzalamena2015-07-201-5/+3
| | | | | | with MPLS packets. ok mpi@, claudio@
* replace the use of ifqueues for most input queues serviced by netisrdlg2015-04-101-2/+2
| | | | | | | | | | | | | | | | | with niqueues. this change is so big because there's a lot of code that takes pointers to different input queues (eg, ether_input picks between ipv4, ipv6, pppoe, arp, and mpls input queues) and falls through to code to enqueue packets against the pointer. if i changed only one of the input queues id have to add sepearate code paths, one for ifqueues and one for niqueues in each of these places by flipping all these input queues at once i can keep the currently common code common. testing by mpi@ sthen@ and rafael zalamena ok mpi@ sthen@ claudio@ henning@
* Use rt_ifa_add(9) and rt_ifa_del(9) to configure MPLS labels.mpi2015-03-261-2/+3
| | | | | | | | | | | | | Since the removal of the link-layer ifa from "struct ifnet" it was impossible to configure MPLS routes on mpe(4). Because just like enc(4), mpe(4) was abusing the link-layer ifa to attach its route entries. So explicitly pass a "glue" ifa to the routing layer. From Rafael Zalamena who discovered this the hardway, thanks! ok claudio@
* Do not include 5 header files, including <sys/param.h>deraadt2015-01-151-8/+1
| | | | ok millert
* Move various extern declarations into their corresponding header file.mpi2013-04-241-1/+4
|
* a little header cleanup. ok deraadttedu2013-03-271-2/+1
|
* Remove various read-only *maxlen variables and use IFQ_MAXLEN directly.mpi2013-03-261-2/+1
| | | | ok beck@, mikeb@
* Map the TTL when building the initial MPLS stack from the encapsulatedclaudio2010-09-081-1/+4
| | | | | | packet. For IP and IPv6 the corresponding mapttl sysctl needs to be set. This is needed to make traceroute work over MPLS. OK michele@
* Fix the pop operation to make PHP work again. When popping the last labelclaudio2010-06-091-4/+1
| | | | | | | | by a pop operation we need to forward the packet to the specified nexthop as is. This is done by calling the interface output routine directly. This is different to the local operation since that one injects the packets into ip_input() via netisr. OK michele
* Kill the mpls enable sysctl knob. Since MPLS needs to be enabled explicitlyclaudio2010-06-021-9/+8
| | | | | on each interface there is no need for yet another knob. OK michele@
* Rework the way we handle MPLS in the kernel. Instead of fumbling MPLS intoclaudio2010-05-281-2/+3
| | | | | | | | | | | 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).
* Introduce a new dummy operation to easily handle packets that have to leavemichele2009-04-281-1/+2
| | | | | | the MPLS cloud and join ipv4/ipv6 stack. ok claudio@ laurent@
* Correctly handle packets that are leaving the MPLS cloud andmichele2009-04-171-1/+4
| | | | | | | | | joining the ipv4/ipv6 stack. Get also rid of the dependency on mpe(4) for packets not belonging to VPN traffic. ok laurent@, ok and input claudio@
* Use our own flags to set the operations and not RTF_PROTOX.michele2009-02-031-5/+5
| | | | | | | Switch the padding field into a MPLS one in rt_msghdr to store relevant informations. OK claudio@ laurent@
* mpls_operation have to be 2 bytes long to storemichele2009-01-291-2/+2
| | | | | | operations correctly ok claudio@ laurent@
* Get rid of the ugly rtentry hack.michele2009-01-281-8/+14
| | | | | | | | We can now act as edge node and allow ipv4 packets to enter a Label Switched Path and not just forwarding MPLS packets. OK claudio@
* Fix sockaddr_mpls structure.michele2009-01-081-3/+6
| | | | | | | | | Now it contains just the label as it must be. This introduces a ugly hack in rtentry that will be removed as soon as possible. OK claudio@
* Initial fixup of sockaddr_mpls struct.michele2008-12-151-13/+4
| | | | | | | | Remove smpls_in_iface as labels must be per platform unique. Remove smpls_out_iface. It is redudant and can be inferred from nexthop. Move smpls_operation to rt_flags and temporary remove smpls_out_exp. ok claudio@
* Introduced Uniform Model for TTL handling.michele2008-11-011-4/+10
| | | | | | | | MPLS TTL is mapped into network layer one as the packet exits the LSP. Just IPv4 support for now. Added the relevant sysctls to enable this behaviour. Input and OK claudio@
* Added mpls_output() used to output mpls packets originating from local host.michele2008-10-281-1/+2
| | | | | | Strictly similar to mpls_input(). Input and OK claudio@, OK laurent@
* Now mpls_input() handles ipv4 and ipv6 explicit null labels.michele2008-10-141-1/+3
| | | | | | Added mpe_input6 to manage also ipv6 packets insted of just ipv4 ones. OK claudio@ laurent@
* Make this compile again, by adding a struct proc * argumentthib2008-05-231-2/+2
| | | | | | to the usrreq's. (Both MPLS and NETATALK are disabled in GENERIC).
* Kill some useless makros.claudio2008-05-091-3/+1
|
* Hook mpe(4) correctly into mpls so that it is possible to tunnel packets overclaudio2008-05-081-2/+3
| | | | MPLS. Still a bit hackish but getting closer. hai norby@
* add mpe_input() to be able to be fed packets that will reenter ip.pyr2008-05-071-1/+3
| | | | | | no consumers yet, they should come soon. ok norby@
* Make mpe a point-to-point interface.pyr2008-05-071-1/+4
| | | | | Make the mtu user definable. ok claudio@
* Correctly initialize labels by byte-swapping and inserting BoS and TTL.pyr2008-05-071-1/+2
| | | | | | | | While there bump MTU to 1500 and set the receiving interface before calling mpls_input. mpestart will eventually call mpls_output when it exists. ``yaaaaayyy'' and ok claudio@ and norby@
* bring in the mpe interface - for ``MPLS Provider Edge'' - this is a workpyr2008-05-061-1/+14
| | | | | | | in progress and some bits need to be cleaned up but will be in-tree for convenience. ok claudio@, norby@
* Drop all MPLS packets when MPLS is not enabled.norby2008-04-301-1/+2
| | | | | | | | | Discussed with claudio@ dlg@ laurent@ Remember to enable MPLS vith sysctl(8). sysctl -w net.mpls.enable=1 ok claudio@ dlg@ laurent@
* add missing prototypesnorby2008-04-231-1/+19
|
* I hate working outside the tree.norby2008-04-231-160/+1
| | | | Fix my faulty import....
* Import MPLS (Multi Protocol Label Switching)norby2008-04-231-0/+296
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@