~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/linux/fib_rules.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2 #ifndef __LINUX_FIB_RULES_H
  3 #define __LINUX_FIB_RULES_H
  4 
  5 #include <linux/types.h>
  6 #include <linux/rtnetlink.h>
  7 
  8 /* rule is permanent, and cannot be deleted */
  9 #define FIB_RULE_PERMANENT      0x00000001
 10 #define FIB_RULE_INVERT         0x00000002
 11 #define FIB_RULE_UNRESOLVED     0x00000004
 12 #define FIB_RULE_IIF_DETACHED   0x00000008
 13 #define FIB_RULE_DEV_DETACHED   FIB_RULE_IIF_DETACHED
 14 #define FIB_RULE_OIF_DETACHED   0x00000010
 15 
 16 /* try to find source address in routing lookups */
 17 #define FIB_RULE_FIND_SADDR     0x00010000
 18 
 19 struct fib_rule_hdr {
 20         __u8            family;
 21         __u8            dst_len;
 22         __u8            src_len;
 23         __u8            tos;
 24 
 25         __u8            table;
 26         __u8            res1;   /* reserved */
 27         __u8            res2;   /* reserved */
 28         __u8            action;
 29 
 30         __u32           flags;
 31 };
 32 
 33 struct fib_rule_uid_range {
 34         __u32           start;
 35         __u32           end;
 36 };
 37 
 38 struct fib_rule_port_range {
 39         __u16           start;
 40         __u16           end;
 41 };
 42 
 43 enum {
 44         FRA_UNSPEC,
 45         FRA_DST,        /* destination address */
 46         FRA_SRC,        /* source address */
 47         FRA_IIFNAME,    /* interface name */
 48 #define FRA_IFNAME      FRA_IIFNAME
 49         FRA_GOTO,       /* target to jump to (FR_ACT_GOTO) */
 50         FRA_UNUSED2,
 51         FRA_PRIORITY,   /* priority/preference */
 52         FRA_UNUSED3,
 53         FRA_UNUSED4,
 54         FRA_UNUSED5,
 55         FRA_FWMARK,     /* mark */
 56         FRA_FLOW,       /* flow/class id */
 57         FRA_TUN_ID,
 58         FRA_SUPPRESS_IFGROUP,
 59         FRA_SUPPRESS_PREFIXLEN,
 60         FRA_TABLE,      /* Extended table id */
 61         FRA_FWMASK,     /* mask for netfilter mark */
 62         FRA_OIFNAME,
 63         FRA_PAD,
 64         FRA_L3MDEV,     /* iif or oif is l3mdev goto its table */
 65         FRA_UID_RANGE,  /* UID range */
 66         FRA_PROTOCOL,   /* Originator of the rule */
 67         FRA_IP_PROTO,   /* ip proto */
 68         FRA_SPORT_RANGE, /* sport */
 69         FRA_DPORT_RANGE, /* dport */
 70         __FRA_MAX
 71 };
 72 
 73 #define FRA_MAX (__FRA_MAX - 1)
 74 
 75 enum {
 76         FR_ACT_UNSPEC,
 77         FR_ACT_TO_TBL,          /* Pass to fixed table */
 78         FR_ACT_GOTO,            /* Jump to another rule */
 79         FR_ACT_NOP,             /* No operation */
 80         FR_ACT_RES3,
 81         FR_ACT_RES4,
 82         FR_ACT_BLACKHOLE,       /* Drop without notification */
 83         FR_ACT_UNREACHABLE,     /* Drop with ENETUNREACH */
 84         FR_ACT_PROHIBIT,        /* Drop with EACCES */
 85         __FR_ACT_MAX,
 86 };
 87 
 88 #define FR_ACT_MAX (__FR_ACT_MAX - 1)
 89 
 90 #endif
 91 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php