|||

Quick search

Quick search

Contents

  • Development process
  • Submitting patches
  • Code of conduct
  • Maintainer handbook
  • All development-process docs
  • Core API
  • Driver APIs
  • Subsystems
    • Core subsystems
    • Human interfaces
    • Networking interfaces
      • Networking
      • NetLabel
      • InfiniBand
      • ISDN
      • MHI
    • Storage interfaces
    • Other subsystems
  • Locking
  • Licensing rules
  • Writing documentation
  • Development tools
  • Testing guide
  • Hacking guide
  • Tracing
  • Fault injection
  • Livepatching
  • Rust
  • Administration
  • Build system
  • Reporting issues
  • Userspace tools
  • Userspace API
  • Firmware
  • Firmware and Devicetree
  • CPU architectures
  • Unsorted documentation
  • Translations

This Page

  • Show Source

Family rt-rule netlink specification¶

Contents

  • 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:

newrule

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:

delrule

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

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

<Page contents

>Page contents:

  • 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
        • dst (u32)
        • src (u32)
        • iifname (string)
        • goto (u32)
        • unused2 (pad)
        • priority (u32)
        • unused3 (pad)
        • unused4 (pad)
        • unused5 (pad)
        • fwmark (u32)
        • flow (u32)
        • tun-id (u64)
        • suppress-ifgroup (u32)
        • suppress-prefixlen (u32)
        • table (u32)
        • fwmask (u32)
        • oifname (string)
        • pad (pad)
        • l3mdev (u8)
        • uid-range (binary)
        • protocol (u8)
        • ip-proto (u8)
        • sport-range (binary)
        • dport-range (binary)
        • dscp (u8)
        • flowlabel (u32)
        • flowlabel-mask (u32)
        • sport-mask (u16)
        • dport-mask (u16)
        • dscp-mask (u8)
<Family rt-route netlink specification
Family tc netlink specification>
© Copyright The kernel development community. Created using Sphinx 8.2.3.

Styled using the Piccolo Theme