mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-10-18 22:09:55 +00:00

iproute2 contains a bunch of kernel headers, including uapi ones. Android's libc uses uapi headers almost directly, and uses a script to fix kernel types that don't match what userspace expects. For example: https://issuetracker.google.com/36987220 reports that our struct ip_mreq_source contains "__be32 imr_multiaddr" rather than "struct in_addr imr_multiaddr". The script addresses this by replacing the uapi struct definition with a #include <bits/ip_mreq.h> which contains the traditional userspace definition. Unfortunately, when we compile iproute2, this definition conflicts with the one in iproute2's linux/in.h. Historically we've just solved this problem by running "git rm" on all the iproute2 include/linux headers that break Android's libc. However, deleting the files in this way makes it harder to keep up with upstream, because every upstream change to an include file causes a merge conflict with the delete. This patch fixes the problem by moving the iproute2 linux headers from include/linux to include/uapi/linux. Tested: compiles on ubuntu trusty (glibc) Signed-off-by: Elliott Hughes <enh@google.com> Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
54 lines
1.8 KiB
C
54 lines
1.8 KiB
C
#ifndef _IP6_TUNNEL_H
|
|
#define _IP6_TUNNEL_H
|
|
|
|
#include <linux/types.h>
|
|
#include <linux/if.h> /* For IFNAMSIZ. */
|
|
#include <linux/in6.h> /* For struct in6_addr. */
|
|
|
|
#define IPV6_TLV_TNL_ENCAP_LIMIT 4
|
|
#define IPV6_DEFAULT_TNL_ENCAP_LIMIT 4
|
|
|
|
/* don't add encapsulation limit if one isn't present in inner packet */
|
|
#define IP6_TNL_F_IGN_ENCAP_LIMIT 0x1
|
|
/* copy the traffic class field from the inner packet */
|
|
#define IP6_TNL_F_USE_ORIG_TCLASS 0x2
|
|
/* copy the flowlabel from the inner packet */
|
|
#define IP6_TNL_F_USE_ORIG_FLOWLABEL 0x4
|
|
/* being used for Mobile IPv6 */
|
|
#define IP6_TNL_F_MIP6_DEV 0x8
|
|
/* copy DSCP from the outer packet */
|
|
#define IP6_TNL_F_RCV_DSCP_COPY 0x10
|
|
/* copy fwmark from inner packet */
|
|
#define IP6_TNL_F_USE_ORIG_FWMARK 0x20
|
|
|
|
struct ip6_tnl_parm {
|
|
char name[IFNAMSIZ]; /* name of tunnel device */
|
|
int link; /* ifindex of underlying L2 interface */
|
|
__u8 proto; /* tunnel protocol */
|
|
__u8 encap_limit; /* encapsulation limit for tunnel */
|
|
__u8 hop_limit; /* hop limit for tunnel */
|
|
__be32 flowinfo; /* traffic class and flowlabel for tunnel */
|
|
__u32 flags; /* tunnel flags */
|
|
struct in6_addr laddr; /* local tunnel end-point address */
|
|
struct in6_addr raddr; /* remote tunnel end-point address */
|
|
};
|
|
|
|
struct ip6_tnl_parm2 {
|
|
char name[IFNAMSIZ]; /* name of tunnel device */
|
|
int link; /* ifindex of underlying L2 interface */
|
|
__u8 proto; /* tunnel protocol */
|
|
__u8 encap_limit; /* encapsulation limit for tunnel */
|
|
__u8 hop_limit; /* hop limit for tunnel */
|
|
__be32 flowinfo; /* traffic class and flowlabel for tunnel */
|
|
__u32 flags; /* tunnel flags */
|
|
struct in6_addr laddr; /* local tunnel end-point address */
|
|
struct in6_addr raddr; /* remote tunnel end-point address */
|
|
|
|
__be16 i_flags;
|
|
__be16 o_flags;
|
|
__be32 i_key;
|
|
__be32 o_key;
|
|
};
|
|
|
|
#endif
|