Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
0002 /*
0003  *  Linux INET6 implementation 
0004  *
0005  *  Authors:
0006  *  Pedro Roque     <roque@di.fc.ul.pt> 
0007  *
0008  *  This program is free software; you can redistribute it and/or
0009  *      modify it under the terms of the GNU General Public License
0010  *      as published by the Free Software Foundation; either version
0011  *      2 of the License, or (at your option) any later version.
0012  */
0013 
0014 #ifndef _UAPI_LINUX_IPV6_ROUTE_H
0015 #define _UAPI_LINUX_IPV6_ROUTE_H
0016 
0017 #include <linux/types.h>
0018 #include <linux/in6.h>          /* For struct in6_addr. */
0019 
0020 #define RTF_DEFAULT 0x00010000  /* default - learned via ND */
0021 #define RTF_ALLONLINK   0x00020000  /* (deprecated and will be removed)
0022                        fallback, no routers on link */
0023 #define RTF_ADDRCONF    0x00040000  /* addrconf route - RA      */
0024 #define RTF_PREFIX_RT   0x00080000  /* A prefix only route - RA */
0025 #define RTF_ANYCAST 0x00100000  /* Anycast          */
0026 
0027 #define RTF_NONEXTHOP   0x00200000  /* route with no nexthop    */
0028 #define RTF_EXPIRES 0x00400000
0029 
0030 #define RTF_ROUTEINFO   0x00800000  /* route information - RA   */
0031 
0032 #define RTF_CACHE   0x01000000  /* read-only: can not be set by user */
0033 #define RTF_FLOW    0x02000000  /* flow significant route   */
0034 #define RTF_POLICY  0x04000000  /* policy route         */
0035 
0036 #define RTF_PREF(pref)  ((pref) << 27)
0037 #define RTF_PREF_MASK   0x18000000
0038 
0039 #define RTF_PCPU    0x40000000  /* read-only: can not be set by user */
0040 #define RTF_LOCAL   0x80000000
0041 
0042 
0043 struct in6_rtmsg {
0044     struct in6_addr     rtmsg_dst;
0045     struct in6_addr     rtmsg_src;
0046     struct in6_addr     rtmsg_gateway;
0047     __u32           rtmsg_type;
0048     __u16           rtmsg_dst_len;
0049     __u16           rtmsg_src_len;
0050     __u32           rtmsg_metric;
0051     unsigned long       rtmsg_info;
0052         __u32           rtmsg_flags;
0053     int         rtmsg_ifindex;
0054 };
0055 
0056 #define RTMSG_NEWDEVICE     0x11
0057 #define RTMSG_DELDEVICE     0x12
0058 #define RTMSG_NEWROUTE      0x21
0059 #define RTMSG_DELROUTE      0x22
0060 
0061 #define IP6_RT_PRIO_USER    1024
0062 #define IP6_RT_PRIO_ADDRCONF    256
0063 
0064 #endif /* _UAPI_LINUX_IPV6_ROUTE_H */