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 強力驅動 | 頁面原始碼