rt_route.yaml 6.1 KB

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