rt-route.yaml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
  2. ---
  3. name: rt-route
  4. protocol: netlink-raw
  5. uapi-header: linux/rtnetlink.h
  6. protonum: 0
  7. doc: >-
  8. Route configuration over rtnetlink.
  9. definitions:
  10. -
  11. name: rtm-type
  12. name-prefix: rtn-
  13. enum-name:
  14. type: enum
  15. entries:
  16. - unspec
  17. - unicast
  18. - local
  19. - broadcast
  20. - anycast
  21. - multicast
  22. - blackhole
  23. - unreachable
  24. - prohibit
  25. - throw
  26. - nat
  27. - xresolve
  28. -
  29. name: rtmsg
  30. type: struct
  31. members:
  32. -
  33. name: rtm-family
  34. type: u8
  35. -
  36. name: rtm-dst-len
  37. type: u8
  38. -
  39. name: rtm-src-len
  40. type: u8
  41. -
  42. name: rtm-tos
  43. type: u8
  44. -
  45. name: rtm-table
  46. type: u8
  47. -
  48. name: rtm-protocol
  49. type: u8
  50. -
  51. name: rtm-scope
  52. type: u8
  53. -
  54. name: rtm-type
  55. type: u8
  56. enum: rtm-type
  57. -
  58. name: rtm-flags
  59. type: u32
  60. -
  61. name: rta-cacheinfo
  62. type: struct
  63. members:
  64. -
  65. name: rta-clntref
  66. type: u32
  67. -
  68. name: rta-lastuse
  69. type: u32
  70. -
  71. name: rta-expires
  72. type: u32
  73. -
  74. name: rta-error
  75. type: u32
  76. -
  77. name: rta-used
  78. type: u32
  79. attribute-sets:
  80. -
  81. name: route-attrs
  82. name-prefix: rta-
  83. attributes:
  84. -
  85. name: dst
  86. type: binary
  87. display-hint: ipv4-or-v6
  88. -
  89. name: src
  90. type: binary
  91. display-hint: ipv4-or-v6
  92. -
  93. name: iif
  94. type: u32
  95. -
  96. name: oif
  97. type: u32
  98. -
  99. name: gateway
  100. type: binary
  101. display-hint: ipv4-or-v6
  102. -
  103. name: priority
  104. type: u32
  105. -
  106. name: prefsrc
  107. type: binary
  108. display-hint: ipv4-or-v6
  109. -
  110. name: metrics
  111. type: nest
  112. nested-attributes: metrics
  113. -
  114. name: multipath
  115. type: binary
  116. -
  117. name: protoinfo # not used
  118. type: binary
  119. -
  120. name: flow
  121. type: u32
  122. -
  123. name: cacheinfo
  124. type: binary
  125. struct: rta-cacheinfo
  126. -
  127. name: session # not used
  128. type: binary
  129. -
  130. name: mp-algo # not used
  131. type: binary
  132. -
  133. name: table
  134. type: u32
  135. -
  136. name: mark
  137. type: u32
  138. -
  139. name: mfc-stats
  140. type: binary
  141. -
  142. name: via
  143. type: binary
  144. -
  145. name: newdst
  146. type: binary
  147. -
  148. name: pref
  149. type: u8
  150. -
  151. name: encap-type
  152. type: u16
  153. -
  154. name: encap
  155. type: binary # tunnel specific nest
  156. -
  157. name: expires
  158. type: u32
  159. -
  160. name: pad
  161. type: binary
  162. -
  163. name: uid
  164. type: u32
  165. -
  166. name: ttl-propagate
  167. type: u8
  168. -
  169. name: ip-proto
  170. type: u8
  171. -
  172. name: sport
  173. type: u16
  174. -
  175. name: dport
  176. type: u16
  177. -
  178. name: nh-id
  179. type: u32
  180. -
  181. name: flowlabel
  182. type: u32
  183. byte-order: big-endian
  184. display-hint: hex
  185. -
  186. name: metrics
  187. name-prefix: rtax-
  188. attributes:
  189. -
  190. name: unspec
  191. type: unused
  192. value: 0
  193. -
  194. name: lock
  195. type: u32
  196. -
  197. name: mtu
  198. type: u32
  199. -
  200. name: window
  201. type: u32
  202. -
  203. name: rtt
  204. type: u32
  205. -
  206. name: rttvar
  207. type: u32
  208. -
  209. name: ssthresh
  210. type: u32
  211. -
  212. name: cwnd
  213. type: u32
  214. -
  215. name: advmss
  216. type: u32
  217. -
  218. name: reordering
  219. type: u32
  220. -
  221. name: hoplimit
  222. type: u32
  223. -
  224. name: initcwnd
  225. type: u32
  226. -
  227. name: features
  228. type: u32
  229. -
  230. name: rto-min
  231. type: u32
  232. -
  233. name: initrwnd
  234. type: u32
  235. -
  236. name: quickack
  237. type: u32
  238. -
  239. name: cc-algo
  240. type: string
  241. -
  242. name: fastopen-no-cookie
  243. type: u32
  244. operations:
  245. enum-model: directional
  246. fixed-header: rtmsg
  247. name-prefix: rtm-
  248. list:
  249. -
  250. name: getroute
  251. doc: Dump route information.
  252. attribute-set: route-attrs
  253. do:
  254. request:
  255. value: 26
  256. attributes:
  257. - src
  258. - dst
  259. - iif
  260. - oif
  261. - ip-proto
  262. - sport
  263. - dport
  264. - mark
  265. - uid
  266. - flowlabel
  267. reply:
  268. value: 24
  269. attributes: &all-route-attrs
  270. - dst
  271. - src
  272. - iif
  273. - oif
  274. - gateway
  275. - priority
  276. - prefsrc
  277. - metrics
  278. - multipath
  279. - flow
  280. - cacheinfo
  281. - table
  282. - mark
  283. - mfc-stats
  284. - via
  285. - newdst
  286. - pref
  287. - encap-type
  288. - encap
  289. - expires
  290. - pad
  291. - uid
  292. - ttl-propagate
  293. - ip-proto
  294. - sport
  295. - dport
  296. - nh-id
  297. - flowlabel
  298. dump:
  299. request:
  300. value: 26
  301. attributes: []
  302. reply:
  303. value: 24
  304. attributes: *all-route-attrs
  305. -
  306. name: newroute
  307. doc: Create a new route
  308. attribute-set: route-attrs
  309. do:
  310. request:
  311. value: 24
  312. attributes: *all-route-attrs
  313. -
  314. name: delroute
  315. doc: Delete an existing route
  316. attribute-set: route-attrs
  317. do:
  318. request:
  319. value: 25
  320. attributes: *all-route-attrs