iputils/iputils-20100418-flowlabel.patch

67 lines
1.9 KiB
Diff
Raw Normal View History

diff -up iputils-s20100418/in6_flowlabel.h.flowlabel iputils-s20100418/in6_flowlabel.h
--- iputils-s20100418/in6_flowlabel.h.flowlabel 2010-05-17 13:54:03.422586206 +0200
+++ iputils-s20100418/in6_flowlabel.h 2010-05-17 13:54:03.422586206 +0200
@@ -0,0 +1,40 @@
+/*
+ It is just a stripped copy of the kernel header "linux/in6.h"
+
+ "Flow label" things are still not defined in "netinet/in*.h" headers,
+ but we cannot use "linux/in6.h" immediately because it currently
+ conflicts with "netinet/in.h" .
+*/
+
+struct in6_flowlabel_req
+{
+ struct in6_addr flr_dst;
+ __u32 flr_label;
+ __u8 flr_action;
+ __u8 flr_share;
+ __u16 flr_flags;
+ __u16 flr_expires;
+ __u16 flr_linger;
+ __u32 __flr_pad;
+ /* Options in format of IPV6_PKTOPTIONS */
+};
+
+#define IPV6_FL_A_GET 0
+#define IPV6_FL_A_PUT 1
+#define IPV6_FL_A_RENEW 2
+
+#define IPV6_FL_F_CREATE 1
+#define IPV6_FL_F_EXCL 2
+
+#define IPV6_FL_S_NONE 0
+#define IPV6_FL_S_EXCL 1
+#define IPV6_FL_S_PROCESS 2
+#define IPV6_FL_S_USER 3
+#define IPV6_FL_S_ANY 255
+
+#define IPV6_FLOWINFO_FLOWLABEL 0x000fffff
+#define IPV6_FLOWINFO_PRIORITY 0x0ff00000
+
+#define IPV6_FLOWLABEL_MGR 32
+#define IPV6_FLOWINFO_SEND 33
+
--- iputils-s20121106/Makefile.orig 2012-11-06 14:09:00.000000000 +0100
+++ iputils-s20121106/Makefile 2012-11-06 14:09:30.983678824 +0100
@@ -60,7 +60,7 @@
$(LINK.o) $^ -lidn $(LIB_CAP) $(LDLIBS) -o $@
ping6: ping6.o ping_common.o
$(LINK.o) $^ -lresolv -lcrypto $(LIB_CAP) $(LDLIBS) -o $@
-ping.o ping6.o ping_common.o: ping_common.h
+ping.o ping6.o ping_common.o: ping_common.h in6_flowlabel.h
# rarpd
diff -up iputils-s20100418/ping6.c.flowlabel iputils-s20100418/ping6.c
--- iputils-s20100418/ping6.c.flowlabel 2010-05-17 13:55:34.012839691 +0200
+++ iputils-s20100418/ping6.c 2010-05-17 13:55:36.411557280 +0200
@@ -74,6 +74,7 @@ char copyright[] =
#include <resolv.h>
#include "ping6_niquery.h"
+#include "in6_flowlabel.h"
#ifndef SOL_IPV6
#define SOL_IPV6 IPPROTO_IPV6