Logo

Linux 内核

6.13.0-rc6

快速搜索

目录

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

本页

  • 显示源代码

rt-route 族 netlink 规范¶

目录

  • rt-route 族 netlink 规范

    • 摘要

    • 操作

      • getroute

      • newroute

      • delroute

    • 定义

      • rtm-type

      • rtmsg

      • rta-cacheinfo

    • 属性集

      • route-attrs

      • rta-metrics

摘要¶

通过 rtnetlink 进行路由配置。

操作¶

getroute¶

转储路由信息。

attribute-set:

route-attrs

fixed-header:

rtmsg

do:
请求
attributes:

[rtm-family, rta-src, rtm-src-len, rta-dst, rtm-dst-len, rta-iif, rta-oif, rta-ip-proto, rta-sport, rta-dport, rta-mark, rta-uid]

回复
attributes:

[rtm-family, rtm-dst-len, rtm-src-len, rtm-tos, rtm-table, rtm-protocol, rtm-scope, rtm-type, rtm-flags, rta-dst, rta-src, rta-iif, rta-oif, rta-gateway, rta-priority, rta-prefsrc, rta-metrics, rta-multipath, rta-flow, rta-cacheinfo, rta-table, rta-mark, rta-mfc-stats, rta-via, rta-newdst, rta-pref, rta-encap-type, rta-encap, rta-expires, rta-pad, rta-uid, rta-ttl-propagate, rta-ip-proto, rta-sport, rta-dport, rta-nh-id]

dump:
请求
attributes:

[rtm-family]

回复
attributes:

[rtm-family, rtm-dst-len, rtm-src-len, rtm-tos, rtm-table, rtm-protocol, rtm-scope, rtm-type, rtm-flags, rta-dst, rta-src, rta-iif, rta-oif, rta-gateway, rta-priority, rta-prefsrc, rta-metrics, rta-multipath, rta-flow, rta-cacheinfo, rta-table, rta-mark, rta-mfc-stats, rta-via, rta-newdst, rta-pref, rta-encap-type, rta-encap, rta-expires, rta-pad, rta-uid, rta-ttl-propagate, rta-ip-proto, rta-sport, rta-dport, rta-nh-id]

newroute¶

创建一个新的路由

attribute-set:

route-attrs

fixed-header:

rtmsg

do:
请求
attributes:

[rtm-family, rtm-dst-len, rtm-src-len, rtm-tos, rtm-table, rtm-protocol, rtm-scope, rtm-type, rtm-flags, rta-dst, rta-src, rta-iif, rta-oif, rta-gateway, rta-priority, rta-prefsrc, rta-metrics, rta-multipath, rta-flow, rta-cacheinfo, rta-table, rta-mark, rta-mfc-stats, rta-via, rta-newdst, rta-pref, rta-encap-type, rta-encap, rta-expires, rta-pad, rta-uid, rta-ttl-propagate, rta-ip-proto, rta-sport, rta-dport, rta-nh-id]

delroute¶

删除现有路由

attribute-set:

route-attrs

fixed-header:

rtmsg

do:
请求
attributes:

[rtm-family, rtm-dst-len, rtm-src-len, rtm-tos, rtm-table, rtm-protocol, rtm-scope, rtm-type, rtm-flags, rta-dst, rta-src, rta-iif, rta-oif, rta-gateway, rta-priority, rta-prefsrc, rta-metrics, rta-multipath, rta-flow, rta-cacheinfo, rta-table, rta-mark, rta-mfc-stats, rta-via, rta-newdst, rta-pref, rta-encap-type, rta-encap, rta-expires, rta-pad, rta-uid, rta-ttl-propagate, rta-ip-proto, rta-sport, rta-dport, rta-nh-id]

定义¶

rtm-type¶

name-prefix:

rtn-

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¶

rta-dst (binary)¶

display-hint:

ipv4

rta-src (binary)¶

display-hint:

ipv4

rta-iif (u32)¶

rta-oif (u32)¶

rta-gateway (binary)¶

display-hint:

ipv4

rta-priority (u32)¶

rta-prefsrc (binary)¶

display-hint:

ipv4

rta-metrics (nest)¶

nested-attributes:

rta-metrics

rta-multipath (binary)¶

rta-protoinfo (binary)¶

rta-flow (u32)¶

rta-cacheinfo (binary)¶

struct:

rta-cacheinfo

rta-session (binary)¶

rta-mp-algo (binary)¶

rta-table (u32)¶

rta-mark (u32)¶

rta-mfc-stats (binary)¶

rta-via (binary)¶

rta-newdst (binary)¶

rta-pref (u8)¶

rta-encap-type (u16)¶

rta-encap (binary)¶

rta-expires (u32)¶

rta-pad (binary)¶

rta-uid (u32)¶

rta-ttl-propagate (u8)¶

rta-ip-proto (u8)¶

rta-sport (u16)¶

rta-dport (u16)¶

rta-nh-id (u32)¶

rta-metrics¶

rtax-unspec (unused)¶

值:

0

rtax-lock (u32)¶

rtax-mtu (u32)¶

rtax-window (u32)¶

rtax-rtt (u32)¶

rtax-rttvar (u32)¶

rtax-ssthresh (u32)¶

rtax-cwnd (u32)¶

rtax-advmss (u32)¶

rtax-reordering (u32)¶

rtax-hoplimit (u32)¶

rtax-initcwnd (u32)¶

rtax-features (u32)¶

rtax-rto-min (u32)¶

rtax-initrwnd (u32)¶

rtax-quickack (u32)¶

rtax-cc-algo (string)¶

rtax-fastopen-no-cookie (u32)¶

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