Logo of The Linux Kernel

The Linux Kernel

6.17.0-rc7

快速搜尋

Contents

  • Development process
  • 提交補釘
  • 行為守則
  • 維護者手冊
  • All development-process docs
  • 核心 API
  • Driver APIs
  • 子系統
    • Core subsystems
    • Human interfaces
    • Networking interfaces
      • Networking
      • NetLabel
      • InfiniBand
      • ISDN
      • MHI
    • Storage interfaces
    • Other subsystems
  • Locking
  • Licensing rules
  • 撰寫文件
  • 開發工具
  • 測試指南
  • Hacking guide
  • Tracing
  • Fault injection
  • Livepatching
  • Rust
  • Administration
  • 建置系統
  • 回報議題
  • 使用者空間工具
  • 使用者空間 API
  • 韌體
  • 韌體與裝置樹
  • CPU 架構
  • 未排序的文件

本頁

  • 顯示原始碼

Family rt-rule netlink specification¶

目錄

  • Family rt-rule netlink specification

    • Summary

    • Operations

      • newrule

      • newrule-ntf

      • delrule

      • delrule-ntf

      • getrule

    • Multicast groups

    • Definitions

      • rtgenmsg

      • fib-rule-hdr

      • fr-act

      • fib-rule-port-range

      • fib-rule-uid-range

    • Attribute sets

      • fib-rule-attrs

Summary¶

FIB rule management over rtnetlink.

Operations¶

newrule¶

Add new FIB rule

attribute-set:

fib-rule-attrs

do:
request
attributes:

[iifname, oifname, priority, fwmark, flow, tun-id, fwmask, table, suppress-prefixlen, suppress-ifgroup, goto, l3mdev, uid-range, protocol, ip-proto, sport-range, dport-range, dscp, flowlabel, flowlabel-mask, sport-mask, dport-mask, dscp-mask]

newrule-ntf¶

Notify a rule creation

value:

32

notify:

getrule

delrule¶

Remove an existing FIB rule

attribute-set:

fib-rule-attrs

do:
request
attributes:

[iifname, oifname, priority, fwmark, flow, tun-id, fwmask, table, suppress-prefixlen, suppress-ifgroup, goto, l3mdev, uid-range, protocol, ip-proto, sport-range, dport-range, dscp, flowlabel, flowlabel-mask, sport-mask, dport-mask, dscp-mask]

delrule-ntf¶

Notify a rule deletion

value:

33

notify:

getrule

getrule¶

Dump all FIB rules

attribute-set:

fib-rule-attrs

dump:

request

reply
attributes:

[iifname, oifname, priority, fwmark, flow, tun-id, fwmask, table, suppress-prefixlen, suppress-ifgroup, goto, l3mdev, uid-range, protocol, ip-proto, sport-range, dport-range, dscp, flowlabel, flowlabel-mask, sport-mask, dport-mask, dscp-mask]

Multicast groups¶

  • rtnlgrp-ipv4-rule

  • rtnlgrp-ipv6-rule

Definitions¶

rtgenmsg¶

type:

struct

members:
family (u8):

fib-rule-hdr¶

type:

struct

members:
family (u8):

dst-len (u8):

src-len (u8):

tos (u8):

table (u8):

res1 (pad):

res2 (pad):

action (u8):

flags (u32):

fr-act¶

type:

enum

enum-name:

None

entries:
  • unspec

  • to-tbl

  • goto

  • nop

  • res3

  • res4

  • blackhole

  • unreachable

  • prohibit

fib-rule-port-range¶

type:

struct

members:
start (u16):

end (u16):

fib-rule-uid-range¶

type:

struct

members:
start (u32):

end (u32):

Attribute sets¶

fib-rule-attrs¶

dst (u32)¶

src (u32)¶

iifname (string)¶

goto (u32)¶

unused2 (pad)¶

priority (u32)¶

unused3 (pad)¶

unused4 (pad)¶

unused5 (pad)¶

fwmark (u32)¶

display-hint:

hex

flow (u32)¶

tun-id (u64)¶

suppress-ifgroup (u32)¶

suppress-prefixlen (u32)¶

display-hint:

hex

table (u32)¶

fwmask (u32)¶

display-hint:

hex

oifname (string)¶

pad (pad)¶

l3mdev (u8)¶

uid-range (binary)¶

struct:

fib-rule-uid-range

protocol (u8)¶

ip-proto (u8)¶

sport-range (binary)¶

struct:

fib-rule-port-range

dport-range (binary)¶

struct:

fib-rule-port-range

dscp (u8)¶

flowlabel (u32)¶

byte-order:

big-endian

display-hint:

hex

flowlabel-mask (u32)¶

byte-order:

big-endian

display-hint:

hex

sport-mask (u16)¶

display-hint:

hex

dport-mask (u16)¶

display-hint:

hex

dscp-mask (u8)¶

display-hint:

hex

©The kernel development community. | Powered by Sphinx 8.2.3 & Alabaster 1.0.0 | Page source