mptcp_pm.yaml 8.4 KB

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