#ifndef AF_MPLS
# define AF_MPLS 28
#endif
+#ifndef IPPROTO_MPLS
+#define IPPROTO_MPLS 137
+#endif
__u32 get_addr32(const char *name);
int get_addr_1(inet_prefix *dst, const char *arg, int family);
#include <sys/socket.h>
#include <arpa/inet.h>
+#include <linux/in.h>
#include <linux/ip.h>
#include <linux/if_tunnel.h>
#include "rt_names.h"
type
);
if (sit) {
- fprintf(f,
- " [ mode { ip6ip | ipip | any } ]\n"
- " [ isatap ]\n");
+ fprintf(f, " [ mode { ip6ip | ipip | mplsip | any } ]\n");
+ fprintf(f, " [ isatap ]\n");
}
fprintf(f, " [ external ]\n");
fprintf(f, " [ fwmark MARK ]\n");
strcmp(*argv, "ipip") == 0 ||
strcmp(*argv, "ip4ip4") == 0)
proto = IPPROTO_IPIP;
+ else if (strcmp(*argv, "mpls/ipv4") == 0 ||
+ strcmp(*argv, "mplsip") == 0)
+ proto = IPPROTO_MPLS;
else if (strcmp(*argv, "any/ipv4") == 0 ||
strcmp(*argv, "any") == 0)
proto = 0;
case IPPROTO_ESP:
strcpy(buf, "esp");
break;
+ case IPPROTO_MPLS:
+ strcpy(buf, "mpls");
+ break;
case 0:
strcpy(buf, "any");
break;
] [
.I " [no]encap-remcsum "
] [
-.I " mode " { ip6ip | ipip | any } "
+.I " mode " { ip6ip | ipip | mplsip | any } "
]
.in +8
applicable for Generic UDP Encapsulation.
.sp
-.BI mode " { ip6ip | ipip | any } "
+.BI mode " { ip6ip | ipip | mplsip | any } "
- specifies mode in which device should run. "ip6ip" indicates
-IPv6-Over-IPv4, "ipip" indicates "IPv4-Over-IPv4", "any" indicates either
-IPv6 or IPv4 Over IPv4. Only supported for SIT where the default is "ip6ip".
+IPv6-Over-IPv4, "ipip" indicates "IPv4-Over-IPv4", "mplsip" indicates
+MPLS-Over-IPv4, "any" indicates IPv6, IPv4 or MPLS Over IPv4. Only
+supported for SIT where the default is "ip6ip".
.in -8