Logo

Linux 内核

6.16.0-rc4

快速搜索

目录

  • 开发流程
  • 提交补丁
  • 行为准则
  • 维护者手册
  • 所有开发流程文档
  • 核心 API
  • 驱动 API
  • 子系统
    • 核心子系统
    • 人机界面
    • 网络接口
      • 网络
      • NetLabel
      • InfiniBand
      • ISDN
      • MHI
    • 存储接口
    • 其他子系统
  • 锁
  • 许可规则
  • 编写文档
  • 开发工具
  • 测试指南
  • 黑客指南
  • 跟踪
  • 故障注入
  • Livepatching
  • Rust
  • 管理
  • 构建系统
  • 报告问题
  • 用户空间工具
  • 用户空间 API
  • 固件
  • 固件和设备树
  • CPU 架构
  • 未分类的文档
  • 翻译

本页

  • 显示源代码

Family rt-route netlink 规范¶

目录

  • Family rt-route netlink 规范

    • 概要

    • 操作

      • getroute

      • newroute

      • delroute

    • 定义

      • rtm-type

      • rtmsg

      • rta-cacheinfo

    • 属性集

      • route-attrs

      • metrics

概要¶

通过 rtnetlink 进行路由配置。

操作¶

getroute¶

转储路由信息。

attribute-set:

route-attrs

do:
请求
attributes:

[src, dst, iif, oif, ip-proto, sport, dport, mark, uid, flowlabel]

回复
attributes:

[dst, src, iif, oif, gateway, priority, prefsrc, metrics, multipath, flow, cacheinfo, table, mark, mfc-stats, via, newdst, pref, encap-type, encap, expires, pad, uid, ttl-propagate, ip-proto, sport, dport, nh-id, flowlabel]

dump:
请求
attributes:

[]

回复
attributes:

[dst, src, iif, oif, gateway, priority, prefsrc, metrics, multipath, flow, cacheinfo, table, mark, mfc-stats, via, newdst, pref, encap-type, encap, expires, pad, uid, ttl-propagate, ip-proto, sport, dport, nh-id, flowlabel]

newroute¶

创建一个新的路由

attribute-set:

route-attrs

do:
请求
attributes:

[dst, src, iif, oif, gateway, priority, prefsrc, metrics, multipath, flow, cacheinfo, table, mark, mfc-stats, via, newdst, pref, encap-type, encap, expires, pad, uid, ttl-propagate, ip-proto, sport, dport, nh-id, flowlabel]

delroute¶

删除一个现有的路由

attribute-set:

route-attrs

do:
请求
attributes:

[dst, src, iif, oif, gateway, priority, prefsrc, metrics, multipath, flow, cacheinfo, table, mark, mfc-stats, via, newdst, pref, encap-type, encap, expires, pad, uid, ttl-propagate, ip-proto, sport, dport, nh-id, flowlabel]

定义¶

rtm-type¶

name-prefix:

rtn-

enum-name:

None

type:

enum

entries:
  • unspec

  • unicast

  • local

  • broadcast

  • anycast

  • multicast

  • blackhole

  • unreachable

  • prohibit

  • throw

  • nat

  • xresolve

rtmsg¶

type:

struct

members:
rtm-family (u8):

rtm-dst-len (u8):

rtm-src-len (u8):

rtm-tos (u8):

rtm-table (u8):

rtm-protocol (u8):

rtm-scope (u8):

rtm-type (u8):

rtm-flags (u32):

rta-cacheinfo¶

type:

struct

members:
rta-clntref (u32):

rta-lastuse (u32):

rta-expires (u32):

rta-error (u32):

rta-used (u32):

属性集¶

route-attrs¶

dst (binary)¶

display-hint:

ipv4

src (binary)¶

display-hint:

ipv4

iif (u32)¶

oif (u32)¶

gateway (binary)¶

display-hint:

ipv4

priority (u32)¶

prefsrc (binary)¶

display-hint:

ipv4

metrics (nest)¶

nested-attributes:

metrics

multipath (binary)¶

protoinfo (binary)¶

flow (u32)¶

cacheinfo (binary)¶

struct:

rta-cacheinfo

session (binary)¶

mp-algo (binary)¶

table (u32)¶

mark (u32)¶

mfc-stats (binary)¶

via (binary)¶

newdst (binary)¶

pref (u8)¶

encap-type (u16)¶

encap (binary)¶

expires (u32)¶

pad (binary)¶

uid (u32)¶

ttl-propagate (u8)¶

ip-proto (u8)¶

sport (u16)¶

dport (u16)¶

nh-id (u32)¶

flowlabel (u32)¶

byte-order:

big-endian

display-hint:

hex

metrics¶

unspec (unused)¶

value:

0

lock (u32)¶

mtu (u32)¶

window (u32)¶

rtt (u32)¶

rttvar (u32)¶

ssthresh (u32)¶

cwnd (u32)¶

advmss (u32)¶

reordering (u32)¶

hoplimit (u32)¶

initcwnd (u32)¶

features (u32)¶

rto-min (u32)¶

initrwnd (u32)¶

quickack (u32)¶

cc-algo (string)¶

fastopen-no-cookie (u32)¶

©内核开发社区。 | 由 Sphinx 5.3.0 & Alabaster 0.7.16 强力驱动 | 页面源代码