xref: /linux/include/uapi/linux/ipv6_route.h (revision 6c07ec0fa5712b01d0967cf74129fa9b4d234af8)
1607ca46eSDavid Howells /*
2607ca46eSDavid Howells  *	Linux INET6 implementation
3607ca46eSDavid Howells  *
4607ca46eSDavid Howells  *	Authors:
5607ca46eSDavid Howells  *	Pedro Roque		<roque@di.fc.ul.pt>
6607ca46eSDavid Howells  *
7607ca46eSDavid Howells  *	This program is free software; you can redistribute it and/or
8607ca46eSDavid Howells  *      modify it under the terms of the GNU General Public License
9607ca46eSDavid Howells  *      as published by the Free Software Foundation; either version
10607ca46eSDavid Howells  *      2 of the License, or (at your option) any later version.
11607ca46eSDavid Howells  */
12607ca46eSDavid Howells 
13607ca46eSDavid Howells #ifndef _UAPI_LINUX_IPV6_ROUTE_H
14607ca46eSDavid Howells #define _UAPI_LINUX_IPV6_ROUTE_H
15607ca46eSDavid Howells 
16607ca46eSDavid Howells #include <linux/types.h>
17*6c07ec0fSDmitry V. Levin #include <linux/in6.h>			/* For struct in6_addr. */
18607ca46eSDavid Howells 
19607ca46eSDavid Howells #define RTF_DEFAULT	0x00010000	/* default - learned via ND	*/
20607ca46eSDavid Howells #define RTF_ALLONLINK	0x00020000	/* (deprecated and will be removed)
21607ca46eSDavid Howells 					   fallback, no routers on link */
22607ca46eSDavid Howells #define RTF_ADDRCONF	0x00040000	/* addrconf route - RA		*/
23607ca46eSDavid Howells #define RTF_PREFIX_RT	0x00080000	/* A prefix only route - RA	*/
24607ca46eSDavid Howells #define RTF_ANYCAST	0x00100000	/* Anycast			*/
25607ca46eSDavid Howells 
26607ca46eSDavid Howells #define RTF_NONEXTHOP	0x00200000	/* route with no nexthop	*/
27607ca46eSDavid Howells #define RTF_EXPIRES	0x00400000
28607ca46eSDavid Howells 
29607ca46eSDavid Howells #define RTF_ROUTEINFO	0x00800000	/* route information - RA	*/
30607ca46eSDavid Howells 
31607ca46eSDavid Howells #define RTF_CACHE	0x01000000	/* cache entry			*/
32607ca46eSDavid Howells #define RTF_FLOW	0x02000000	/* flow significant route	*/
33607ca46eSDavid Howells #define RTF_POLICY	0x04000000	/* policy route			*/
34607ca46eSDavid Howells 
35607ca46eSDavid Howells #define RTF_PREF(pref)	((pref) << 27)
36607ca46eSDavid Howells #define RTF_PREF_MASK	0x18000000
37607ca46eSDavid Howells 
38d52d3997SMartin KaFai Lau #define RTF_PCPU	0x40000000
39607ca46eSDavid Howells #define RTF_LOCAL	0x80000000
40607ca46eSDavid Howells 
41607ca46eSDavid Howells 
42607ca46eSDavid Howells struct in6_rtmsg {
43607ca46eSDavid Howells 	struct in6_addr		rtmsg_dst;
44607ca46eSDavid Howells 	struct in6_addr		rtmsg_src;
45607ca46eSDavid Howells 	struct in6_addr		rtmsg_gateway;
46607ca46eSDavid Howells 	__u32			rtmsg_type;
47607ca46eSDavid Howells 	__u16			rtmsg_dst_len;
48607ca46eSDavid Howells 	__u16			rtmsg_src_len;
49607ca46eSDavid Howells 	__u32			rtmsg_metric;
50607ca46eSDavid Howells 	unsigned long		rtmsg_info;
51607ca46eSDavid Howells         __u32			rtmsg_flags;
52607ca46eSDavid Howells 	int			rtmsg_ifindex;
53607ca46eSDavid Howells };
54607ca46eSDavid Howells 
55607ca46eSDavid Howells #define RTMSG_NEWDEVICE		0x11
56607ca46eSDavid Howells #define RTMSG_DELDEVICE		0x12
57607ca46eSDavid Howells #define RTMSG_NEWROUTE		0x21
58607ca46eSDavid Howells #define RTMSG_DELROUTE		0x22
59607ca46eSDavid Howells 
60130cd273SNicolas Dichtel #define IP6_RT_PRIO_USER	1024
61130cd273SNicolas Dichtel #define IP6_RT_PRIO_ADDRCONF	256
62130cd273SNicolas Dichtel 
63607ca46eSDavid Howells #endif /* _UAPI_LINUX_IPV6_ROUTE_H */
64