Merge pull request #26 from Noltari/mcproxy-next
[feed/routing.git] / mrd6 / patches / 002-missing_netlink_defs.patch
1 Index: mrd6-0.9.5/include/mrdpriv/linux/netlink_missing_defs.h
2 ===================================================================
3 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
4 +++ mrd6-0.9.5/include/mrdpriv/linux/netlink_missing_defs.h 2007-09-21 13:19:06.000000000 +0200
5 @@ -0,0 +1,41 @@
6 +#include <linux/version.h>
7 +
8 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
9 +
10 +#include <linux/if_link.h>
11 +#include <linux/if_addr.h>
12 +#include <linux/neighbour.h>
13 +
14 +#ifndef IFA_RTA
15 +#define IFA_RTA(r) \
16 + ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))))
17 +#endif
18 +#ifndef IFA_PAYLOAD
19 +#define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifaddrmsg))
20 +#endif
21 +
22 +#ifndef IFLA_RTA
23 +#define IFLA_RTA(r) \
24 + ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
25 +#endif
26 +#ifndef IFLA_PAYLOAD
27 +#define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg))
28 +#endif
29 +
30 +#ifndef NDA_RTA
31 +#define NDA_RTA(r) \
32 + ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ndmsg))))
33 +#endif
34 +#ifndef NDA_PAYLOAD
35 +#define NDA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndmsg))
36 +#endif
37 +
38 +#ifndef NDTA_RTA
39 +#define NDTA_RTA(r) \
40 + ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ndtmsg))))
41 +#endif
42 +#ifndef NDTA_PAYLOAD
43 +#define NDTA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndtmsg))
44 +#endif
45 +
46 +#endif
47 Index: mrd6-0.9.5/src/linux/linux_unicast_route.cpp
48 ===================================================================
49 --- mrd6-0.9.5.orig/src/linux/linux_unicast_route.cpp 2007-09-21 13:19:05.000000000 +0200
50 +++ mrd6-0.9.5/src/linux/linux_unicast_route.cpp 2007-09-21 13:19:06.000000000 +0200
51 @@ -23,6 +23,7 @@
52 */
53
54 #include <mrdpriv/linux/unicast_route.h>
55 +#include <mrdpriv/linux/netlink_missing_defs.h>
56
57 #include <mrd/mrd.h>
58 #include <mrd/interface.h>