mptcp_pm.yaml 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  1. # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
  2. ---
  3. name: mptcp_pm
  4. protocol: genetlink-legacy
  5. doc: Multipath TCP.
  6. c-family-name: mptcp-pm-name
  7. c-version-name: mptcp-pm-ver
  8. max-by-define: true
  9. kernel-policy: per-op
  10. cmd-cnt-name: --mptcp-pm-cmd-after-last
  11. definitions:
  12. -
  13. type: enum
  14. name: event-type
  15. enum-name: mptcp-event-type
  16. doc: Netlink MPTCP event types
  17. name-prefix: mptcp-event-
  18. entries:
  19. -
  20. name: unspec
  21. doc: unused event
  22. -
  23. name: created
  24. doc: >-
  25. A new MPTCP connection has been created. It is the good time to
  26. allocate memory and send ADD_ADDR if needed. Depending on the
  27. traffic-patterns it can take a long time until the
  28. MPTCP_EVENT_ESTABLISHED is sent.
  29. Attributes: token, family, saddr4 | saddr6, daddr4 | daddr6, sport,
  30. dport, [server-side], [flags].
  31. -
  32. name: established
  33. doc: >-
  34. A MPTCP connection is established (can start new subflows).
  35. Attributes: token, family, saddr4 | saddr6, daddr4 | daddr6, sport,
  36. dport, [server-side], [flags].
  37. -
  38. name: closed
  39. doc: >-
  40. A MPTCP connection has stopped.
  41. Attribute: token.
  42. -
  43. name: announced
  44. value: 6
  45. doc: >-
  46. A new address has been announced by the peer.
  47. Attributes: token, rem_id, family, daddr4 | daddr6 [, dport].
  48. -
  49. name: removed
  50. doc: >-
  51. An address has been lost by the peer.
  52. Attributes: token, rem_id.
  53. -
  54. name: sub-established
  55. value: 10
  56. doc: >-
  57. A new subflow has been established. 'error' should not be set.
  58. Attributes: token, family, loc_id, rem_id, saddr4 | saddr6, daddr4 |
  59. daddr6, sport, dport, backup, if-idx [, error].
  60. -
  61. name: sub-closed
  62. doc: >-
  63. A subflow has been closed. An error (copy of sk_err) could be set if
  64. an error has been detected for this subflow.
  65. Attributes: token, family, loc_id, rem_id, saddr4 | saddr6, daddr4 |
  66. daddr6, sport, dport, backup, if-idx [, error].
  67. -
  68. name: sub-priority
  69. value: 13
  70. doc: >-
  71. The priority of a subflow has changed. 'error' should not be set.
  72. Attributes: token, family, loc_id, rem_id, saddr4 | saddr6, daddr4 |
  73. daddr6, sport, dport, backup, if-idx [, error].
  74. -
  75. name: listener-created
  76. value: 15
  77. doc: >-
  78. A new PM listener is created.
  79. Attributes: family, sport, saddr4 | saddr6.
  80. -
  81. name: listener-closed
  82. doc: >-
  83. A PM listener is closed.
  84. Attributes: family, sport, saddr4 | saddr6.
  85. attribute-sets:
  86. -
  87. name: address
  88. name-prefix: mptcp-pm-addr-attr-
  89. attributes:
  90. -
  91. name: unspec
  92. type: unused
  93. value: 0
  94. -
  95. name: family
  96. type: u16
  97. -
  98. name: id
  99. type: u8
  100. -
  101. name: addr4
  102. type: u32
  103. byte-order: big-endian
  104. -
  105. name: addr6
  106. type: binary
  107. checks:
  108. exact-len: 16
  109. -
  110. name: port
  111. type: u16
  112. -
  113. name: flags
  114. type: u32
  115. -
  116. name: if-idx
  117. type: s32
  118. -
  119. name: subflow-attribute
  120. name-prefix: mptcp-subflow-attr-
  121. attributes:
  122. -
  123. name: unspec
  124. type: unused
  125. value: 0
  126. -
  127. name: token-rem
  128. type: u32
  129. -
  130. name: token-loc
  131. type: u32
  132. -
  133. name: relwrite-seq
  134. type: u32
  135. -
  136. name: map-seq
  137. type: u64
  138. -
  139. name: map-sfseq
  140. type: u32
  141. -
  142. name: ssn-offset
  143. type: u32
  144. -
  145. name: map-datalen
  146. type: u16
  147. -
  148. name: flags
  149. type: u32
  150. -
  151. name: id-rem
  152. type: u8
  153. -
  154. name: id-loc
  155. type: u8
  156. -
  157. name: pad
  158. type: pad
  159. -
  160. name: endpoint
  161. name-prefix: mptcp-pm-endpoint-
  162. attributes:
  163. -
  164. name: addr
  165. type: nest
  166. nested-attributes: address
  167. -
  168. name: attr
  169. name-prefix: mptcp-pm-attr-
  170. attr-cnt-name: --mptcp-attr-after-last
  171. attributes:
  172. -
  173. name: unspec
  174. type: unused
  175. value: 0
  176. -
  177. name: addr
  178. type: nest
  179. nested-attributes: address
  180. -
  181. name: rcv-add-addrs
  182. type: u32
  183. -
  184. name: subflows
  185. type: u32
  186. -
  187. name: token
  188. type: u32
  189. -
  190. name: loc-id
  191. type: u8
  192. -
  193. name: addr-remote
  194. type: nest
  195. nested-attributes: address
  196. -
  197. name: event-attr
  198. enum-name: mptcp-event-attr
  199. name-prefix: mptcp-attr-
  200. attributes:
  201. -
  202. name: unspec
  203. type: unused
  204. value: 0
  205. -
  206. name: token
  207. type: u32
  208. -
  209. name: family
  210. type: u16
  211. -
  212. name: loc-id
  213. type: u8
  214. -
  215. name: rem-id
  216. type: u8
  217. -
  218. name: saddr4
  219. type: u32
  220. byte-order: big-endian
  221. -
  222. name: saddr6
  223. type: binary
  224. checks:
  225. min-len: 16
  226. -
  227. name: daddr4
  228. type: u32
  229. byte-order: big-endian
  230. -
  231. name: daddr6
  232. type: binary
  233. checks:
  234. min-len: 16
  235. -
  236. name: sport
  237. type: u16
  238. byte-order: big-endian
  239. -
  240. name: dport
  241. type: u16
  242. byte-order: big-endian
  243. -
  244. name: backup
  245. type: u8
  246. -
  247. name: error
  248. type: u8
  249. -
  250. name: flags
  251. type: u16
  252. -
  253. name: timeout
  254. type: u32
  255. -
  256. name: if-idx
  257. type: s32
  258. -
  259. name: reset-reason
  260. type: u32
  261. -
  262. name: reset-flags
  263. type: u32
  264. -
  265. name: server-side
  266. type: u8
  267. doc: "Deprecated: use 'flags'"
  268. operations:
  269. list:
  270. -
  271. name: unspec
  272. doc: unused
  273. value: 0
  274. -
  275. name: add-addr
  276. doc: Add endpoint
  277. attribute-set: endpoint
  278. dont-validate: [strict]
  279. flags: [uns-admin-perm]
  280. do: &add-addr-attrs
  281. request:
  282. attributes:
  283. - addr
  284. -
  285. name: del-addr
  286. doc: Delete endpoint
  287. attribute-set: endpoint
  288. dont-validate: [strict]
  289. flags: [uns-admin-perm]
  290. do: *add-addr-attrs
  291. -
  292. name: get-addr
  293. doc: Get endpoint information
  294. attribute-set: attr
  295. dont-validate: [strict]
  296. do: &get-addr-attrs
  297. request:
  298. attributes:
  299. - addr
  300. - token
  301. reply:
  302. attributes:
  303. - addr
  304. dump:
  305. reply:
  306. attributes:
  307. - addr
  308. -
  309. name: flush-addrs
  310. doc: Flush addresses
  311. attribute-set: endpoint
  312. dont-validate: [strict]
  313. flags: [uns-admin-perm]
  314. do: *add-addr-attrs
  315. -
  316. name: set-limits
  317. doc: Set protocol limits
  318. attribute-set: attr
  319. dont-validate: [strict]
  320. flags: [uns-admin-perm]
  321. do: &mptcp-limits
  322. request:
  323. attributes:
  324. - rcv-add-addrs
  325. - subflows
  326. -
  327. name: get-limits
  328. doc: Get protocol limits
  329. attribute-set: attr
  330. dont-validate: [strict]
  331. do: &mptcp-get-limits
  332. request:
  333. attributes:
  334. - rcv-add-addrs
  335. - subflows
  336. reply:
  337. attributes:
  338. - rcv-add-addrs
  339. - subflows
  340. -
  341. name: set-flags
  342. doc: Change endpoint flags
  343. attribute-set: attr
  344. dont-validate: [strict]
  345. flags: [uns-admin-perm]
  346. do: &mptcp-set-flags
  347. request:
  348. attributes:
  349. - addr
  350. - token
  351. - addr-remote
  352. -
  353. name: announce
  354. doc: Announce new address
  355. attribute-set: attr
  356. dont-validate: [strict]
  357. flags: [uns-admin-perm]
  358. do: &announce-add
  359. request:
  360. attributes:
  361. - addr
  362. - token
  363. -
  364. name: remove
  365. doc: Announce removal
  366. attribute-set: attr
  367. dont-validate: [strict]
  368. flags: [uns-admin-perm]
  369. do:
  370. request:
  371. attributes:
  372. - token
  373. - loc-id
  374. -
  375. name: subflow-create
  376. doc: Create subflow
  377. attribute-set: attr
  378. dont-validate: [strict]
  379. flags: [uns-admin-perm]
  380. do: &sf-create
  381. request:
  382. attributes:
  383. - addr
  384. - token
  385. - addr-remote
  386. -
  387. name: subflow-destroy
  388. doc: Destroy subflow
  389. attribute-set: attr
  390. dont-validate: [strict]
  391. flags: [uns-admin-perm]
  392. do: *sf-create