tdl-xoa-driver 1.0.0b1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (325) hide show
  1. tdl_xoa_driver-1.0.0b1.dist-info/LICENSE +202 -0
  2. tdl_xoa_driver-1.0.0b1.dist-info/METADATA +177 -0
  3. tdl_xoa_driver-1.0.0b1.dist-info/RECORD +325 -0
  4. tdl_xoa_driver-1.0.0b1.dist-info/WHEEL +5 -0
  5. tdl_xoa_driver-1.0.0b1.dist-info/top_level.txt +1 -0
  6. xoa_driver/__init__.py +2 -0
  7. xoa_driver/enums.py +399 -0
  8. xoa_driver/exceptions.py +77 -0
  9. xoa_driver/functions/__init__.py +0 -0
  10. xoa_driver/functions/anlt.py +744 -0
  11. xoa_driver/functions/anlt_ll_debug.py +429 -0
  12. xoa_driver/functions/cli.py +581 -0
  13. xoa_driver/functions/exceptions.py +72 -0
  14. xoa_driver/functions/headers.py +608 -0
  15. xoa_driver/functions/mgmt.py +515 -0
  16. xoa_driver/functions/tools.py +256 -0
  17. xoa_driver/hlfuncs.py +18 -0
  18. xoa_driver/internals/__init__.py +0 -0
  19. xoa_driver/internals/commands/__init__.py +31 -0
  20. xoa_driver/internals/commands/c_commands.py +2041 -0
  21. xoa_driver/internals/commands/enums.py +3289 -0
  22. xoa_driver/internals/commands/m4_commands.py +700 -0
  23. xoa_driver/internals/commands/m4e_commands.py +107 -0
  24. xoa_driver/internals/commands/m_commands.py +1875 -0
  25. xoa_driver/internals/commands/p4_commands.py +2221 -0
  26. xoa_driver/internals/commands/p4e_commands.py +160 -0
  27. xoa_driver/internals/commands/p4g_commands.py +7253 -0
  28. xoa_driver/internals/commands/p_commands.py +6000 -0
  29. xoa_driver/internals/commands/pc_commands.py +335 -0
  30. xoa_driver/internals/commands/pd_commands.py +355 -0
  31. xoa_driver/internals/commands/pe_commands.py +1018 -0
  32. xoa_driver/internals/commands/pec_commands.py +265 -0
  33. xoa_driver/internals/commands/ped_commands.py +1034 -0
  34. xoa_driver/internals/commands/pef_commands.py +2216 -0
  35. xoa_driver/internals/commands/pf_commands.py +379 -0
  36. xoa_driver/internals/commands/pl1_commands.py +1588 -0
  37. xoa_driver/internals/commands/pl_commands.py +178 -0
  38. xoa_driver/internals/commands/pm_commands.py +256 -0
  39. xoa_driver/internals/commands/pp_commands.py +2341 -0
  40. xoa_driver/internals/commands/pr_commands.py +812 -0
  41. xoa_driver/internals/commands/ps_commands.py +2311 -0
  42. xoa_driver/internals/commands/pt_commands.py +370 -0
  43. xoa_driver/internals/commands/px_commands.py +303 -0
  44. xoa_driver/internals/commands/subtypes.py +86 -0
  45. xoa_driver/internals/core/__init__.py +0 -0
  46. xoa_driver/internals/core/builders.py +39 -0
  47. xoa_driver/internals/core/exceptions.py +69 -0
  48. xoa_driver/internals/core/funcs.py +81 -0
  49. xoa_driver/internals/core/funcs.pyi +1072 -0
  50. xoa_driver/internals/core/interfaces.py +47 -0
  51. xoa_driver/internals/core/token.py +44 -0
  52. xoa_driver/internals/core/transporter/__init__.py +0 -0
  53. xoa_driver/internals/core/transporter/_processor.py +83 -0
  54. xoa_driver/internals/core/transporter/_publisher.py +101 -0
  55. xoa_driver/internals/core/transporter/_request_id_counter.py +28 -0
  56. xoa_driver/internals/core/transporter/_stream.py +99 -0
  57. xoa_driver/internals/core/transporter/_typings.py +43 -0
  58. xoa_driver/internals/core/transporter/exceptions.py +44 -0
  59. xoa_driver/internals/core/transporter/handler.py +127 -0
  60. xoa_driver/internals/core/transporter/logger/__init__.py +10 -0
  61. xoa_driver/internals/core/transporter/logger/__logger.py +94 -0
  62. xoa_driver/internals/core/transporter/logger/__state_off.py +32 -0
  63. xoa_driver/internals/core/transporter/logger/__state_on_default.py +70 -0
  64. xoa_driver/internals/core/transporter/logger/__state_on_loguru.py +51 -0
  65. xoa_driver/internals/core/transporter/logger/__state_on_user.py +48 -0
  66. xoa_driver/internals/core/transporter/protocol/__init__.py +0 -0
  67. xoa_driver/internals/core/transporter/protocol/_constants.py +77 -0
  68. xoa_driver/internals/core/transporter/protocol/_utils.py +59 -0
  69. xoa_driver/internals/core/transporter/protocol/exceptions.py +271 -0
  70. xoa_driver/internals/core/transporter/protocol/payload/__init__.py +70 -0
  71. xoa_driver/internals/core/transporter/protocol/payload/base_struct.py +283 -0
  72. xoa_driver/internals/core/transporter/protocol/payload/descriptor.py +119 -0
  73. xoa_driver/internals/core/transporter/protocol/payload/exceptions.py +20 -0
  74. xoa_driver/internals/core/transporter/protocol/payload/field.py +296 -0
  75. xoa_driver/internals/core/transporter/protocol/payload/types.py +173 -0
  76. xoa_driver/internals/core/transporter/protocol/payload/utils.py +53 -0
  77. xoa_driver/internals/core/transporter/protocol/struct_header.py +123 -0
  78. xoa_driver/internals/core/transporter/protocol/struct_request.py +65 -0
  79. xoa_driver/internals/core/transporter/protocol/struct_response.py +89 -0
  80. xoa_driver/internals/core/transporter/registry.py +43 -0
  81. xoa_driver/internals/exceptions/__init__.py +9 -0
  82. xoa_driver/internals/exceptions/modules.py +13 -0
  83. xoa_driver/internals/exceptions/testers.py +21 -0
  84. xoa_driver/internals/hli_v1/__init__.py +0 -0
  85. xoa_driver/internals/hli_v1/indices/__init__.py +0 -0
  86. xoa_driver/internals/hli_v1/indices/base_index.py +39 -0
  87. xoa_driver/internals/hli_v1/indices/connection_group/__init__.py +0 -0
  88. xoa_driver/internals/hli_v1/indices/connection_group/cg.py +186 -0
  89. xoa_driver/internals/hli_v1/indices/connection_group/histogram.py +78 -0
  90. xoa_driver/internals/hli_v1/indices/connection_group/l2.py +94 -0
  91. xoa_driver/internals/hli_v1/indices/connection_group/l3.py +130 -0
  92. xoa_driver/internals/hli_v1/indices/connection_group/raw.py +200 -0
  93. xoa_driver/internals/hli_v1/indices/connection_group/replay.py +109 -0
  94. xoa_driver/internals/hli_v1/indices/connection_group/tcp.py +314 -0
  95. xoa_driver/internals/hli_v1/indices/connection_group/tls.py +198 -0
  96. xoa_driver/internals/hli_v1/indices/connection_group/udp.py +133 -0
  97. xoa_driver/internals/hli_v1/indices/connection_group/user_state.py +28 -0
  98. xoa_driver/internals/hli_v1/indices/filter/__init__.py +0 -0
  99. xoa_driver/internals/hli_v1/indices/filter/base_filter.py +65 -0
  100. xoa_driver/internals/hli_v1/indices/filter/genuine_filter.py +20 -0
  101. xoa_driver/internals/hli_v1/indices/length_term.py +49 -0
  102. xoa_driver/internals/hli_v1/indices/macsecscs/__init__.py +0 -0
  103. xoa_driver/internals/hli_v1/indices/macsecscs/base_macsecsc.py +224 -0
  104. xoa_driver/internals/hli_v1/indices/macsecscs/genuine_macsecsc.py +72 -0
  105. xoa_driver/internals/hli_v1/indices/match_term.py +64 -0
  106. xoa_driver/internals/hli_v1/indices/port_dataset.py +72 -0
  107. xoa_driver/internals/hli_v1/indices/streams/__init__.py +0 -0
  108. xoa_driver/internals/hli_v1/indices/streams/base_stream.py +405 -0
  109. xoa_driver/internals/hli_v1/indices/streams/genuine_stream.py +64 -0
  110. xoa_driver/internals/hli_v1/modules/__init__.py +0 -0
  111. xoa_driver/internals/hli_v1/modules/__interfaces.py +21 -0
  112. xoa_driver/internals/hli_v1/modules/base_module.py +138 -0
  113. xoa_driver/internals/hli_v1/modules/module_chimera.py +366 -0
  114. xoa_driver/internals/hli_v1/modules/module_l23ve.py +73 -0
  115. xoa_driver/internals/hli_v1/modules/module_l47.py +397 -0
  116. xoa_driver/internals/hli_v1/modules/module_l47ve.py +9 -0
  117. xoa_driver/internals/hli_v1/modules/modules_l23/__init__.py +0 -0
  118. xoa_driver/internals/hli_v1/modules/modules_l23/family_combi.py +83 -0
  119. xoa_driver/internals/hli_v1/modules/modules_l23/family_d.py +75 -0
  120. xoa_driver/internals/hli_v1/modules/modules_l23/family_e.py +85 -0
  121. xoa_driver/internals/hli_v1/modules/modules_l23/family_f.py +145 -0
  122. xoa_driver/internals/hli_v1/modules/modules_l23/family_g.py +84 -0
  123. xoa_driver/internals/hli_v1/modules/modules_l23/family_h.py +40 -0
  124. xoa_driver/internals/hli_v1/modules/modules_l23/family_i.py +25 -0
  125. xoa_driver/internals/hli_v1/modules/modules_l23/family_j.py +25 -0
  126. xoa_driver/internals/hli_v1/modules/modules_l23/family_k.py +39 -0
  127. xoa_driver/internals/hli_v1/modules/modules_l23/family_l.py +55 -0
  128. xoa_driver/internals/hli_v1/modules/modules_l23/family_l1.py +800 -0
  129. xoa_driver/internals/hli_v1/modules/modules_l23/family_m.py +25 -0
  130. xoa_driver/internals/hli_v1/modules/modules_l23/family_n.py +40 -0
  131. xoa_driver/internals/hli_v1/modules/modules_l23/module_l23_base.py +383 -0
  132. xoa_driver/internals/hli_v1/ports/__init__.py +0 -0
  133. xoa_driver/internals/hli_v1/ports/base_port.py +125 -0
  134. xoa_driver/internals/hli_v1/ports/port_l23/__init__.py +0 -0
  135. xoa_driver/internals/hli_v1/ports/port_l23/bases/__init__.py +0 -0
  136. xoa_driver/internals/hli_v1/ports/port_l23/bases/port_capture.py +70 -0
  137. xoa_driver/internals/hli_v1/ports/port_l23/bases/port_l23.py +527 -0
  138. xoa_driver/internals/hli_v1/ports/port_l23/bases/port_l23_genuine.py +229 -0
  139. xoa_driver/internals/hli_v1/ports/port_l23/bases/port_reception_statistics.py +231 -0
  140. xoa_driver/internals/hli_v1/ports/port_l23/bases/port_transceiver.py +117 -0
  141. xoa_driver/internals/hli_v1/ports/port_l23/bases/port_transmission_statistics.py +131 -0
  142. xoa_driver/internals/hli_v1/ports/port_l23/chimera/__init__.py +0 -0
  143. xoa_driver/internals/hli_v1/ports/port_l23/chimera/filter_definition/__init__.py +0 -0
  144. xoa_driver/internals/hli_v1/ports/port_l23/chimera/filter_definition/_utils.py +15 -0
  145. xoa_driver/internals/hli_v1/ports/port_l23/chimera/filter_definition/general.py +396 -0
  146. xoa_driver/internals/hli_v1/ports/port_l23/chimera/filter_definition/shadow.py +104 -0
  147. xoa_driver/internals/hli_v1/ports/port_l23/chimera/filter_definition/working.py +36 -0
  148. xoa_driver/internals/hli_v1/ports/port_l23/chimera/pe_custom_distribution.py +125 -0
  149. xoa_driver/internals/hli_v1/ports/port_l23/chimera/pe_distribution.py +174 -0
  150. xoa_driver/internals/hli_v1/ports/port_l23/chimera/port_chimera.py +119 -0
  151. xoa_driver/internals/hli_v1/ports/port_l23/chimera/port_emulation.py +244 -0
  152. xoa_driver/internals/hli_v1/ports/port_l23/chimera/reception_statistics.py +24 -0
  153. xoa_driver/internals/hli_v1/ports/port_l23/chimera/transmission_statistics.py +24 -0
  154. xoa_driver/internals/hli_v1/ports/port_l23/family_combi.py +37 -0
  155. xoa_driver/internals/hli_v1/ports/port_l23/family_d.py +51 -0
  156. xoa_driver/internals/hli_v1/ports/port_l23/family_e.py +107 -0
  157. xoa_driver/internals/hli_v1/ports/port_l23/family_f.py +151 -0
  158. xoa_driver/internals/hli_v1/ports/port_l23/family_g.py +77 -0
  159. xoa_driver/internals/hli_v1/ports/port_l23/family_h.py +67 -0
  160. xoa_driver/internals/hli_v1/ports/port_l23/family_i.py +84 -0
  161. xoa_driver/internals/hli_v1/ports/port_l23/family_j.py +68 -0
  162. xoa_driver/internals/hli_v1/ports/port_l23/family_k.py +73 -0
  163. xoa_driver/internals/hli_v1/ports/port_l23/family_l.py +82 -0
  164. xoa_driver/internals/hli_v1/ports/port_l23/family_l1.py +166 -0
  165. xoa_driver/internals/hli_v1/ports/port_l23/family_m.py +29 -0
  166. xoa_driver/internals/hli_v1/ports/port_l23/fault_jkl.py +24 -0
  167. xoa_driver/internals/hli_v1/ports/port_l23/freya_l1.py +722 -0
  168. xoa_driver/internals/hli_v1/ports/port_l23/pcs_pma_ghijkl.py +369 -0
  169. xoa_driver/internals/hli_v1/ports/port_l23/pcs_pma_ijkl_chimera.py +60 -0
  170. xoa_driver/internals/hli_v1/ports/port_l23/pcs_pma_l.py +78 -0
  171. xoa_driver/internals/hli_v1/ports/port_l23/port_l23ve.py +101 -0
  172. xoa_driver/internals/hli_v1/ports/port_l47/__init__.py +0 -0
  173. xoa_driver/internals/hli_v1/ports/port_l47/counters.py +174 -0
  174. xoa_driver/internals/hli_v1/ports/port_l47/main.py +228 -0
  175. xoa_driver/internals/hli_v1/ports/port_l47/packet_engine.py +31 -0
  176. xoa_driver/internals/hli_v1/revisions.py +11 -0
  177. xoa_driver/internals/hli_v1/testers/__init__.py +0 -0
  178. xoa_driver/internals/hli_v1/testers/_base_tester.py +259 -0
  179. xoa_driver/internals/hli_v1/testers/genuine/__init__.py +0 -0
  180. xoa_driver/internals/hli_v1/testers/genuine/l_23/__init__.py +0 -0
  181. xoa_driver/internals/hli_v1/testers/genuine/l_23/health.py +16 -0
  182. xoa_driver/internals/hli_v1/testers/genuine/l_23/rest_api.py +38 -0
  183. xoa_driver/internals/hli_v1/testers/genuine/l_23/time_keeper.py +57 -0
  184. xoa_driver/internals/hli_v1/testers/genuine/l_23/upload_file.py +29 -0
  185. xoa_driver/internals/hli_v1/testers/genuine/management_interface.py +42 -0
  186. xoa_driver/internals/hli_v1/testers/l23_tester.py +196 -0
  187. xoa_driver/internals/hli_v1/testers/l23ve_tester.py +114 -0
  188. xoa_driver/internals/hli_v1/testers/l47_tester.py +106 -0
  189. xoa_driver/internals/hli_v1/testers/l47ve_tester.py +54 -0
  190. xoa_driver/internals/hli_v2/__init__.py +0 -0
  191. xoa_driver/internals/hli_v2/indices/__init__.py +0 -0
  192. xoa_driver/internals/hli_v2/indices/base_index.py +39 -0
  193. xoa_driver/internals/hli_v2/indices/connection_group/__init__.py +0 -0
  194. xoa_driver/internals/hli_v2/indices/connection_group/cg.py +115 -0
  195. xoa_driver/internals/hli_v2/indices/connection_group/histogram.py +59 -0
  196. xoa_driver/internals/hli_v2/indices/connection_group/l2.py +71 -0
  197. xoa_driver/internals/hli_v2/indices/connection_group/l3.py +96 -0
  198. xoa_driver/internals/hli_v2/indices/connection_group/raw.py +148 -0
  199. xoa_driver/internals/hli_v2/indices/connection_group/replay.py +89 -0
  200. xoa_driver/internals/hli_v2/indices/connection_group/tcp.py +261 -0
  201. xoa_driver/internals/hli_v2/indices/connection_group/tls.py +166 -0
  202. xoa_driver/internals/hli_v2/indices/connection_group/udp.py +112 -0
  203. xoa_driver/internals/hli_v2/indices/connection_group/user_state.py +25 -0
  204. xoa_driver/internals/hli_v2/indices/filter/__init__.py +0 -0
  205. xoa_driver/internals/hli_v2/indices/filter/base_filter.py +50 -0
  206. xoa_driver/internals/hli_v2/indices/filter/genuine_filter.py +17 -0
  207. xoa_driver/internals/hli_v2/indices/length_term.py +44 -0
  208. xoa_driver/internals/hli_v2/indices/match_term.py +49 -0
  209. xoa_driver/internals/hli_v2/indices/port_dataset.py +53 -0
  210. xoa_driver/internals/hli_v2/indices/streams/__init__.py +0 -0
  211. xoa_driver/internals/hli_v2/indices/streams/base_stream.py +234 -0
  212. xoa_driver/internals/hli_v2/indices/streams/genuine_stream.py +32 -0
  213. xoa_driver/internals/hli_v2/modules/__init__.py +0 -0
  214. xoa_driver/internals/hli_v2/modules/__interfaces.py +21 -0
  215. xoa_driver/internals/hli_v2/modules/base_module.py +125 -0
  216. xoa_driver/internals/hli_v2/modules/module_chimera.py +358 -0
  217. xoa_driver/internals/hli_v2/modules/module_l23ve.py +58 -0
  218. xoa_driver/internals/hli_v2/modules/module_l47.py +230 -0
  219. xoa_driver/internals/hli_v2/modules/module_l47ve.py +8 -0
  220. xoa_driver/internals/hli_v2/modules/modules_l23/__init__.py +0 -0
  221. xoa_driver/internals/hli_v2/modules/modules_l23/family_combi.py +73 -0
  222. xoa_driver/internals/hli_v2/modules/modules_l23/family_d.py +75 -0
  223. xoa_driver/internals/hli_v2/modules/modules_l23/family_e.py +85 -0
  224. xoa_driver/internals/hli_v2/modules/modules_l23/family_f.py +144 -0
  225. xoa_driver/internals/hli_v2/modules/modules_l23/family_g.py +84 -0
  226. xoa_driver/internals/hli_v2/modules/modules_l23/family_h.py +40 -0
  227. xoa_driver/internals/hli_v2/modules/modules_l23/family_i.py +25 -0
  228. xoa_driver/internals/hli_v2/modules/modules_l23/family_j.py +25 -0
  229. xoa_driver/internals/hli_v2/modules/modules_l23/family_k.py +39 -0
  230. xoa_driver/internals/hli_v2/modules/modules_l23/family_l.py +55 -0
  231. xoa_driver/internals/hli_v2/modules/modules_l23/family_l1.py +797 -0
  232. xoa_driver/internals/hli_v2/modules/modules_l23/family_m.py +25 -0
  233. xoa_driver/internals/hli_v2/modules/modules_l23/family_n.py +40 -0
  234. xoa_driver/internals/hli_v2/modules/modules_l23/module_l23_base.py +339 -0
  235. xoa_driver/internals/hli_v2/ports/__init__.py +0 -0
  236. xoa_driver/internals/hli_v2/ports/base_port.py +105 -0
  237. xoa_driver/internals/hli_v2/ports/port_l23/__init__.py +0 -0
  238. xoa_driver/internals/hli_v2/ports/port_l23/bases/__init__.py +0 -0
  239. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_capture.py +64 -0
  240. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_l23.py +441 -0
  241. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_l23_genuine.py +172 -0
  242. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_reception_statistics.py +156 -0
  243. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_transceiver.py +117 -0
  244. xoa_driver/internals/hli_v2/ports/port_l23/bases/port_transmission_statistics.py +59 -0
  245. xoa_driver/internals/hli_v2/ports/port_l23/chimera/__init__.py +0 -0
  246. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/__init__.py +0 -0
  247. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/_utils.py +15 -0
  248. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/general.py +340 -0
  249. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/shadow.py +99 -0
  250. xoa_driver/internals/hli_v2/ports/port_l23/chimera/filter_definition/working.py +36 -0
  251. xoa_driver/internals/hli_v2/ports/port_l23/chimera/pe_custom_distribution.py +116 -0
  252. xoa_driver/internals/hli_v2/ports/port_l23/chimera/pe_distribution.py +102 -0
  253. xoa_driver/internals/hli_v2/ports/port_l23/chimera/port_chimera.py +113 -0
  254. xoa_driver/internals/hli_v2/ports/port_l23/chimera/port_emulation.py +420 -0
  255. xoa_driver/internals/hli_v2/ports/port_l23/chimera/reception_statistics.py +22 -0
  256. xoa_driver/internals/hli_v2/ports/port_l23/chimera/transmission_statistics.py +22 -0
  257. xoa_driver/internals/hli_v2/ports/port_l23/family_combi.py +36 -0
  258. xoa_driver/internals/hli_v2/ports/port_l23/family_d.py +49 -0
  259. xoa_driver/internals/hli_v2/ports/port_l23/family_e.py +96 -0
  260. xoa_driver/internals/hli_v2/ports/port_l23/family_f.py +144 -0
  261. xoa_driver/internals/hli_v2/ports/port_l23/family_g.py +77 -0
  262. xoa_driver/internals/hli_v2/ports/port_l23/family_h.py +60 -0
  263. xoa_driver/internals/hli_v2/ports/port_l23/family_i.py +66 -0
  264. xoa_driver/internals/hli_v2/ports/port_l23/family_j.py +53 -0
  265. xoa_driver/internals/hli_v2/ports/port_l23/family_k.py +58 -0
  266. xoa_driver/internals/hli_v2/ports/port_l23/family_l.py +67 -0
  267. xoa_driver/internals/hli_v2/ports/port_l23/family_l1.py +149 -0
  268. xoa_driver/internals/hli_v2/ports/port_l23/family_m.py +28 -0
  269. xoa_driver/internals/hli_v2/ports/port_l23/fault_jkl.py +22 -0
  270. xoa_driver/internals/hli_v2/ports/port_l23/pcs_pma_ghijkl.py +342 -0
  271. xoa_driver/internals/hli_v2/ports/port_l23/pcs_pma_ijkl_chimera.py +50 -0
  272. xoa_driver/internals/hli_v2/ports/port_l23/pcs_pma_l.py +65 -0
  273. xoa_driver/internals/hli_v2/ports/port_l23/port_l23ve.py +81 -0
  274. xoa_driver/internals/hli_v2/ports/port_l47/__init__.py +0 -0
  275. xoa_driver/internals/hli_v2/ports/port_l47/counters.py +146 -0
  276. xoa_driver/internals/hli_v2/ports/port_l47/main.py +137 -0
  277. xoa_driver/internals/hli_v2/ports/port_l47/packet_engine.py +20 -0
  278. xoa_driver/internals/hli_v2/revisions.py +11 -0
  279. xoa_driver/internals/hli_v2/testers/__init__.py +0 -0
  280. xoa_driver/internals/hli_v2/testers/_base_tester.py +207 -0
  281. xoa_driver/internals/hli_v2/testers/genuine/__init__.py +0 -0
  282. xoa_driver/internals/hli_v2/testers/genuine/l_23/__init__.py +0 -0
  283. xoa_driver/internals/hli_v2/testers/genuine/l_23/health.py +16 -0
  284. xoa_driver/internals/hli_v2/testers/genuine/l_23/rest_api.py +34 -0
  285. xoa_driver/internals/hli_v2/testers/genuine/l_23/time_keeper.py +50 -0
  286. xoa_driver/internals/hli_v2/testers/genuine/l_23/upload_file.py +26 -0
  287. xoa_driver/internals/hli_v2/testers/genuine/management_interface.py +38 -0
  288. xoa_driver/internals/hli_v2/testers/l23_tester.py +159 -0
  289. xoa_driver/internals/hli_v2/testers/l23ve_tester.py +98 -0
  290. xoa_driver/internals/hli_v2/testers/l47_tester.py +95 -0
  291. xoa_driver/internals/hli_v2/testers/l47ve_tester.py +50 -0
  292. xoa_driver/internals/state_storage/__init__.py +0 -0
  293. xoa_driver/internals/state_storage/_speed_detector.py +121 -0
  294. xoa_driver/internals/state_storage/modules_state.py +128 -0
  295. xoa_driver/internals/state_storage/ports_state.py +154 -0
  296. xoa_driver/internals/state_storage/testers_state.py +104 -0
  297. xoa_driver/internals/utils/__init__.py +0 -0
  298. xoa_driver/internals/utils/attributes.py +33 -0
  299. xoa_driver/internals/utils/cap_id.py +63 -0
  300. xoa_driver/internals/utils/con_traffic_light.py +88 -0
  301. xoa_driver/internals/utils/indices/__init__.py +0 -0
  302. xoa_driver/internals/utils/indices/_interfaces.py +26 -0
  303. xoa_driver/internals/utils/indices/header_modifier_manager.py +56 -0
  304. xoa_driver/internals/utils/indices/index_manager.py +95 -0
  305. xoa_driver/internals/utils/indices/observer.py +17 -0
  306. xoa_driver/internals/utils/kind.py +19 -0
  307. xoa_driver/internals/utils/managers/__init__.py +0 -0
  308. xoa_driver/internals/utils/managers/abc.py +44 -0
  309. xoa_driver/internals/utils/managers/exceptions.py +22 -0
  310. xoa_driver/internals/utils/managers/modules_manager.py +118 -0
  311. xoa_driver/internals/utils/managers/ports_manager.py +116 -0
  312. xoa_driver/internals/utils/rev_tool.py +21 -0
  313. xoa_driver/internals/utils/session.py +117 -0
  314. xoa_driver/internals/warn.py +32 -0
  315. xoa_driver/lli.py +15 -0
  316. xoa_driver/misc.py +57 -0
  317. xoa_driver/modules.py +448 -0
  318. xoa_driver/ports.py +332 -0
  319. xoa_driver/testers.py +37 -0
  320. xoa_driver/utils.py +12 -0
  321. xoa_driver/v2/__init__.py +11 -0
  322. xoa_driver/v2/misc.py +77 -0
  323. xoa_driver/v2/modules.py +308 -0
  324. xoa_driver/v2/ports.py +232 -0
  325. xoa_driver/v2/testers.py +24 -0
@@ -0,0 +1,2216 @@
1
+ from __future__ import annotations
2
+ from dataclasses import dataclass
3
+ import ipaddress
4
+ import typing
5
+ import functools
6
+
7
+ from xoa_driver.internals.core.builders import (
8
+ build_get_request,
9
+ build_set_request
10
+ )
11
+ from xoa_driver.internals.core import interfaces
12
+ from xoa_driver.internals.core.token import Token
13
+ from xoa_driver.internals.core.transporter.registry import register_command
14
+ from xoa_driver.internals.core.transporter.protocol.payload import (
15
+ field,
16
+ RequestBodyStruct,
17
+ ResponseBodyStruct,
18
+ XmpByte,
19
+ XmpHex,
20
+ XmpInt,
21
+ XmpIPv4Address,
22
+ XmpIPv6Address,
23
+ XmpSequence,
24
+ Hex,
25
+ )
26
+ from .enums import (
27
+ OnOff,
28
+ YesNo,
29
+ ProtocolOption,
30
+ FilterUse,
31
+ InfoAction,
32
+ L2PlusPresent,
33
+ L3Present,
34
+ FilterMode,
35
+ FilterType,
36
+ FilterVlanType,
37
+ )
38
+
39
+
40
+ @register_command
41
+ @dataclass
42
+ class PEF_INIT:
43
+ """
44
+ Prepares for setting up a filter definition. When called, all filter
45
+ definitions in the shadow-set which are not applied are discarded and replaced
46
+ with the default values (DEFAULT).
47
+
48
+ .. note::
49
+
50
+ There are 2 register copies used to configure the filters:
51
+
52
+ (1) ``Shadow-copy (type value = 0)`` temporary copy configured by sever.
53
+ Values stored in ``shadow-copy`` have no immediate effect on the flow filters. PEF_APPLY will pass the values from the ``shadow-copy`` to the ``working-copy``.
54
+
55
+ (2) ``Working-copy (type value = 1)`` reflects what is currently used for filtering in the FPGA.
56
+ ``Working-copy`` cannot be written directly. Only ``shadow-copy`` allows direct write.
57
+
58
+ (3) All ``set`` actions are performed on ``shadow-copy`` ONLY.
59
+
60
+ (4) Only when PEF_APPLY is called, ``working-copy`` and FPGA are updated with values from the ``shadow-copy``.
61
+ """
62
+
63
+ code: typing.ClassVar[int] = 1700
64
+ pushed: typing.ClassVar[bool] = False
65
+
66
+ _connection: 'interfaces.IConnection'
67
+ _module: int
68
+ _port: int
69
+ _flow_xindex: int
70
+
71
+ class SetDataAttr(RequestBodyStruct):
72
+ pass
73
+
74
+ def set(self) -> Token[None]:
75
+ """Setting up a filter definition.
76
+ """
77
+
78
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex]))
79
+
80
+
81
+ @register_command
82
+ @dataclass
83
+ class PEF_APPLY:
84
+ """
85
+ Applies filter definitions from "shadow-copy" to "working-copy". This
86
+ also pushes these settings to the FPGA.
87
+ """
88
+
89
+ code: typing.ClassVar[int] = 1701
90
+ pushed: typing.ClassVar[bool] = False
91
+
92
+ _connection: 'interfaces.IConnection'
93
+ _module: int
94
+ _port: int
95
+ _flow_xindex: int
96
+
97
+ class SetDataAttr(RequestBodyStruct):
98
+ pass
99
+
100
+ def set(self) -> Token[None]:
101
+ """Applies filter definitions from "shadow-copy" to "working-copy"."""
102
+
103
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex]))
104
+
105
+
106
+ @register_command
107
+ @dataclass
108
+ class PEF_ENABLE:
109
+ """
110
+ Defines if filtering is enabled for the flow.
111
+
112
+ .. note::
113
+
114
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``
115
+
116
+ """
117
+
118
+ code: typing.ClassVar[int] = 1702
119
+ pushed: typing.ClassVar[bool] = False
120
+
121
+ _connection: 'interfaces.IConnection'
122
+ _module: int
123
+ _port: int
124
+ _flow_xindex: int
125
+ _filter_type: FilterType
126
+
127
+ class GetDataAttr(ResponseBodyStruct):
128
+ state: OnOff = field(XmpByte())
129
+ """coded byte, specifies the state of the filter."""
130
+
131
+ class SetDataAttr(RequestBodyStruct):
132
+ state: OnOff = field(XmpByte())
133
+ """coded byte, specifies the state of the filter."""
134
+
135
+ def get(self) -> Token[GetDataAttr]:
136
+ """Get if filtering is enabled for the flow.
137
+
138
+ :return: filter state
139
+ :rtype: PEF_ENABLE.GetDataAttr
140
+ """
141
+
142
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
143
+
144
+ def set(self, state: OnOff) -> Token[None]:
145
+ """Set the filter state.
146
+
147
+ :param state: state of the filter
148
+ :type state: OnOff
149
+ """
150
+
151
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], state=state))
152
+
153
+ set_off = functools.partialmethod(set, OnOff.OFF)
154
+ """Set the filter state to OFF.
155
+ """
156
+
157
+ set_on = functools.partialmethod(set, OnOff.ON)
158
+ """Set the filter state to ON.
159
+ """
160
+
161
+
162
+ @register_command
163
+ @dataclass
164
+ class PEF_ETHSETTINGS:
165
+ """
166
+ Defines what filter action is performed on the Ethernet header.
167
+
168
+ .. note::
169
+
170
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``
171
+
172
+ """
173
+
174
+ code: typing.ClassVar[int] = 1703
175
+ pushed: typing.ClassVar[bool] = False
176
+
177
+ _connection: 'interfaces.IConnection'
178
+ _module: int
179
+ _port: int
180
+ _flow_xindex: int
181
+ _filter_type: FilterType
182
+
183
+ class GetDataAttr(ResponseBodyStruct):
184
+ use: FilterUse = field(XmpByte())
185
+ """coded byte, specifies the use of Ethernet information."""
186
+ action: InfoAction = field(XmpByte())
187
+ """coded byte, specifies the action of Ethernet information."""
188
+
189
+ class SetDataAttr(RequestBodyStruct):
190
+ use: FilterUse = field(XmpByte())
191
+ """coded byte, specifies the use of Ethernet information."""
192
+ action: InfoAction = field(XmpByte())
193
+ """coded byte, specifies the action of Ethernet information."""
194
+
195
+ def get(self) -> Token[GetDataAttr]:
196
+ """Get the filter action settings on Ethernet header.
197
+
198
+ :return: Filter setting
199
+ :rtype: PEF_ETHSETTINGS.GetDataAttr
200
+ """
201
+
202
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
203
+
204
+ def set(self, use: FilterUse, action: InfoAction) -> Token[None]:
205
+ """Set the filter action settings on Ethernet header.
206
+
207
+ :param use: specifies if Ethernet information is expected
208
+ :type use: FilterUse
209
+ :param action: specifies the use of Ethernet information.
210
+ :type action: InfoAction
211
+ """
212
+
213
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], use=use, action=action))
214
+
215
+
216
+ @register_command
217
+ @dataclass
218
+ class PEF_ETHSRCADDR:
219
+ """
220
+ Defines the Ethernet Source Address settings for the Ethernet filter.
221
+
222
+ .. note::
223
+
224
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``
225
+
226
+ """
227
+
228
+ code: typing.ClassVar[int] = 1704
229
+ pushed: typing.ClassVar[bool] = False
230
+
231
+ _connection: 'interfaces.IConnection'
232
+ _module: int
233
+ _port: int
234
+ _flow_xindex: int
235
+ _filter_type: FilterType
236
+
237
+ class GetDataAttr(ResponseBodyStruct):
238
+ use: OnOff = field(XmpByte())
239
+ """coded byte, specifies the use of Ethernet Source Address information."""
240
+ value: Hex = field(XmpHex(size=6))
241
+ """six hex bytes, specifying the six bytes of the address. Default value: 0x000000000000."""
242
+ mask: Hex = field(XmpHex(size=6))
243
+ """six hex bytes, specifying the mask corresponding to the address. Default value: 0xFFFFFFFFFFFF."""
244
+
245
+ class SetDataAttr(RequestBodyStruct):
246
+ use: OnOff = field(XmpByte())
247
+ """coded byte, specifies the use of Ethernet Source Address information."""
248
+ value: Hex = field(XmpHex(size=6))
249
+ """six hex bytes, specifying the six bytes of the address. Default value: 0x000000000000."""
250
+ mask: Hex = field(XmpHex(size=6))
251
+ """six hex bytes, specifying the mask corresponding to the address. Default value: 0xFFFFFFFFFFFF."""
252
+
253
+ def get(self) -> Token[GetDataAttr]:
254
+ """Get the Ethernet Source Address settings for the Ethernet filter.
255
+
256
+ :return: the Ethernet Source Address settings for the Ethernet filter
257
+ :rtype: PEF_ETHSRCADDR.GetDataAttr
258
+ """
259
+
260
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
261
+
262
+ def set(self, use: OnOff, value: Hex, mask: Hex) -> Token[None]:
263
+ """Set the Ethernet Source Address settings for the Ethernet filter.
264
+
265
+ :param use: specifies the use of Ethernet Source Address information
266
+ :type use: OnOff
267
+ :param value: specifying the six bytes of the address. Default value: 0x000000000000.
268
+ :type value: Hex
269
+ :param mask: specifying the mask corresponding to the address. Default value: 0xFFFFFFFFFFFF.
270
+ :type mask: Hex
271
+ """
272
+
273
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], use=use, value=value, mask=mask))
274
+
275
+ set_off = functools.partialmethod(set, OnOff.OFF)
276
+ """Ethernet Source Address is not used for the filter."""
277
+
278
+ set_on = functools.partialmethod(set, OnOff.ON)
279
+ """Ethernet Source Address is used for the filter."""
280
+
281
+
282
+ @register_command
283
+ @dataclass
284
+ class PEF_ETHDESTADDR:
285
+ """
286
+ Defines the Ethernet Destination Address settings for the Ethernet filter.
287
+
288
+ .. note::
289
+
290
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``
291
+
292
+ """
293
+
294
+ code: typing.ClassVar[int] = 1705
295
+ pushed: typing.ClassVar[bool] = False
296
+
297
+ _connection: 'interfaces.IConnection'
298
+ _module: int
299
+ _port: int
300
+ _flow_xindex: int
301
+ _filter_type: FilterType
302
+
303
+ class GetDataAttr(ResponseBodyStruct):
304
+ use: OnOff = field(XmpByte())
305
+ """coded byte, specifies the use of Ethernet information"""
306
+ value: Hex = field(XmpHex(size=6))
307
+ """six hex bytes, specifying the six bytes of the address. Default value: 0x000000000000"""
308
+ mask: Hex = field(XmpHex(size=6))
309
+ """six hex bytes, specifying the mask corresponding to the address. Default value: 0xFFFFFFFFFFFF"""
310
+
311
+ class SetDataAttr(RequestBodyStruct):
312
+ use: OnOff = field(XmpByte())
313
+ """coded byte, specifies the use of Ethernet information"""
314
+ value: Hex = field(XmpHex(size=6))
315
+ """six hex bytes, specifying the six bytes of the address. Default value: 0x000000000000"""
316
+ mask: Hex = field(XmpHex(size=6))
317
+ """six hex bytes, specifying the mask corresponding to the address. Default value: 0xFFFFFFFFFFFF"""
318
+
319
+ def get(self) -> Token[GetDataAttr]:
320
+ """Get the Ethernet Destination Address settings for the Ethernet filter.
321
+
322
+ :return: the Ethernet Destination Address settings for the Ethernet filter.
323
+ :rtype: PEF_ETHDESTADDR.GetDataAttr
324
+ """
325
+
326
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
327
+
328
+ def set(self, use: OnOff, value: Hex, mask: Hex) -> Token[None]:
329
+ """Set the Ethernet Destination Address settings for the Ethernet filter.
330
+
331
+ :param use: specifies the use of Ethernet Destination Address information
332
+ :type use: OnOff
333
+ :param value: specifying the six bytes of the address. Default value: 0x000000000000
334
+ :type value: Hex
335
+ :param mask: specifying the mask corresponding to the address. Default value: 0xFFFFFFFFFFFF
336
+ :type mask: Hex
337
+ """
338
+
339
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], use=use, value=value, mask=mask))
340
+
341
+ set_off = functools.partialmethod(set, OnOff.OFF)
342
+ """Ethernet Destination Address is not used for the filter."""
343
+
344
+ set_on = functools.partialmethod(set, OnOff.ON)
345
+ """Ethernet Destination Address is used for the filter."""
346
+
347
+
348
+ @register_command
349
+ @dataclass
350
+ class PEF_L2PUSE:
351
+ """
352
+ Defines what Layer 2+ protocols that are present and may be used for the filter.
353
+
354
+ .. note::
355
+
356
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``
357
+
358
+ """
359
+
360
+ code: typing.ClassVar[int] = 1706
361
+ pushed: typing.ClassVar[bool] = False
362
+
363
+ _connection: 'interfaces.IConnection'
364
+ _module: int
365
+ _port: int
366
+ _flow_xindex: int
367
+ _filter_type: FilterType
368
+
369
+ class GetDataAttr(ResponseBodyStruct):
370
+ use: L2PlusPresent = field(XmpByte())
371
+ """coded byte, specifies the presence of Layer 2+ protocols."""
372
+
373
+ class SetDataAttr(RequestBodyStruct):
374
+ use: L2PlusPresent = field(XmpByte())
375
+ """coded byte, specifies the presence of Layer 2+ protocols."""
376
+
377
+ def get(self) -> Token[GetDataAttr]:
378
+ """Get the Layer 2+ protocols settings for the filter.
379
+
380
+ :return: the Layer 2+ protocols settings for the filter
381
+ :rtype: PEF_L2PUSE.GetDataAttr
382
+ """
383
+
384
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
385
+
386
+ def set(self, use: L2PlusPresent) -> Token[None]:
387
+ """Set the Layer 2+ protocols settings for the filter.
388
+
389
+ :param use: specifies the presence of Layer 2+ protocols.
390
+ :type use: L2PlusPresent
391
+ """
392
+
393
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], use=use))
394
+
395
+ set_na = functools.partialmethod(set, L2PlusPresent.NA)
396
+ """Set the presence of Layer 2+ protocols to NA."""
397
+
398
+ set_vlan1 = functools.partialmethod(set, L2PlusPresent.VLAN1)
399
+ """Set the presence of Layer 2+ protocols to one VLAN Tag."""
400
+
401
+ set_vlan2 = functools.partialmethod(set, L2PlusPresent.VLAN2)
402
+ """Set the presence of Layer 2+ protocols to two VLAN Tags."""
403
+
404
+ set_mpls = functools.partialmethod(set, L2PlusPresent.MPLS)
405
+ """Set the presence of Layer 2+ protocols to MPLS."""
406
+
407
+
408
+ @register_command
409
+ @dataclass
410
+ class PEF_VLANSETTINGS:
411
+ """
412
+ Defines what filter action is performed on the VLAN header.
413
+
414
+ .. note::
415
+
416
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``
417
+
418
+ """
419
+
420
+ code: typing.ClassVar[int] = 1707
421
+ pushed: typing.ClassVar[bool] = False
422
+
423
+ _connection: 'interfaces.IConnection'
424
+ _module: int
425
+ _port: int
426
+ _flow_xindex: int
427
+ _filter_type: FilterType
428
+
429
+ class GetDataAttr(ResponseBodyStruct):
430
+ use: FilterUse = field(XmpByte())
431
+ """coded byte, specifies if VLAN information is expected."""
432
+ action: InfoAction = field(XmpByte())
433
+ """coded byte, specifies the use of VLAN information."""
434
+
435
+ class SetDataAttr(RequestBodyStruct):
436
+ use: FilterUse = field(XmpByte())
437
+ """coded byte, specifies if VLAN information is expected."""
438
+ action: InfoAction = field(XmpByte())
439
+ """coded byte, specifies the use of VLAN information."""
440
+
441
+ def get(self) -> Token[GetDataAttr]:
442
+ """Get filter action settings on VLAN header.
443
+
444
+ :return: filter action settings on VLAN header
445
+ :rtype: PEF_VLANSETTINGS.GetDataAttr
446
+ """
447
+
448
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
449
+
450
+ def set(self, use: FilterUse, action: InfoAction) -> Token[None]:
451
+ """Set filter action settings on VLAN header.
452
+
453
+ :param use: specifies if VLAN information is expected
454
+ :type use: FilterUse
455
+ :param action: specifies the action of VLAN information
456
+ :type action: InfoAction
457
+ """
458
+
459
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], use=use, action=action))
460
+
461
+
462
+ @register_command
463
+ @dataclass
464
+ class PEF_VLANTAG:
465
+ """
466
+ Basic mode only. Defines the VLAN TAG settings for the VLAN filter.
467
+
468
+ .. note::
469
+
470
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``
471
+
472
+ """
473
+
474
+ code: typing.ClassVar[int] = 1708
475
+ pushed: typing.ClassVar[bool] = False
476
+
477
+ _connection: 'interfaces.IConnection'
478
+ _module: int
479
+ _port: int
480
+ _flow_xindex: int
481
+ _filter_type: FilterType
482
+ _vlan_type: FilterVlanType
483
+
484
+ class GetDataAttr(ResponseBodyStruct):
485
+ use: OnOff = field(XmpByte())
486
+ """coded byte, specifies the use of VLAN information"""
487
+ value: int = field(XmpInt())
488
+ """decimal digits, specifying the 12 bit value of the tag. Default value: 0."""
489
+ mask: Hex = field(XmpHex(size=2))
490
+ """two hex digits, specifying the 12 bit value of the tag. Default value: 0x0FFF"""
491
+
492
+ class SetDataAttr(RequestBodyStruct):
493
+ use: OnOff = field(XmpByte())
494
+ """coded byte, specifies the use of VLAN information"""
495
+ value: int = field(XmpInt())
496
+ """decimal digits, specifying the 12 bit value of the tag. Default value: 0."""
497
+ mask: Hex = field(XmpHex(size=2))
498
+ """two hex digits, specifying the 12 bit value of the tag. Default value: 0x0FFF"""
499
+
500
+ def get(self) -> Token[GetDataAttr]:
501
+ """Get the VLAN TAG settings for the VLAN filter.
502
+
503
+ :return: the VLAN TAG settings for the VLAN filter
504
+ :rtype: PEF_VLANTAG.GetDataAttr
505
+ """
506
+
507
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type, self._vlan_type]))
508
+
509
+ def set(self, use: OnOff, value: int, mask: Hex) -> Token[None]:
510
+ """Set the VLAN TAG settings for the VLAN filter.
511
+
512
+ :param use: specifies the use of VLAN TAG information
513
+ :type use: OnOff
514
+ :param value: specifying the 12 bit value of the tag. Default value: 0.
515
+ :type value: int
516
+ :param mask: specifying the 12 bit value of the tag. Default value: 0x0FFF
517
+ :type mask: Hex
518
+ """
519
+
520
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type, self._vlan_type], use=use, value=value, mask=mask))
521
+
522
+ set_off = functools.partialmethod(set, OnOff.OFF)
523
+ """VLAN TAG is not used for the filter."""
524
+
525
+ set_on = functools.partialmethod(set, OnOff.ON)
526
+ """VLAN TAG is used for the filter."""
527
+
528
+
529
+ @register_command
530
+ @dataclass
531
+ class PEF_VLANPCP:
532
+ """
533
+ Basic mode only. Defines the VLAN PCP settings for the VLAN filter.
534
+
535
+ .. note::
536
+
537
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``
538
+
539
+ """
540
+
541
+ code: typing.ClassVar[int] = 1709
542
+ pushed: typing.ClassVar[bool] = False
543
+
544
+ _connection: 'interfaces.IConnection'
545
+ _module: int
546
+ _port: int
547
+ _flow_xindex: int
548
+ _filter_type: FilterType
549
+ _vlan_type: FilterVlanType
550
+
551
+ class GetDataAttr(ResponseBodyStruct):
552
+ use: OnOff = field(XmpByte())
553
+ """coded byte, specifies the use of VLAN information."""
554
+ value: int = field(XmpByte())
555
+ """byte, specifying the value of the PCP. Default value: 0 (Range: 0 to 7)"""
556
+ mask: Hex = field(XmpHex(size=1))
557
+ """hex byte, specifying the 8 bit value mask. Default value: 0x07"""
558
+
559
+ class SetDataAttr(RequestBodyStruct):
560
+ use: OnOff = field(XmpByte())
561
+ """coded byte, specifies the use of VLAN information."""
562
+ value: int = field(XmpByte())
563
+ """byte, specifying the value of the PCP. Default value: 0 (Range: 0 to 7)"""
564
+ mask: Hex = field(XmpHex(size=1))
565
+ """hex byte, specifying the 8 bit value mask. Default value: 0x07"""
566
+
567
+ def get(self) -> Token[GetDataAttr]:
568
+ """Get the VLAN PCP settings for the VLAN filter.
569
+
570
+ :return: the VLAN PCP settings for the VLAN filter
571
+ :rtype: PEF_VLANPCP.GetDataAttr
572
+ """
573
+
574
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type, self._vlan_type]))
575
+
576
+ def set(self, use: OnOff, value: int, mask: Hex) -> Token[None]:
577
+ """Set the VLAN PCP settings for the VLAN filter.
578
+
579
+ :param use: specifies the use of VLAN PCP information
580
+ :type use: OnOff
581
+ :param value: specifying the value of the PCP. Default value: 0 (Range: 0 to 7)
582
+ :type value: int
583
+ :param mask: specifying the 8 bit value mask. Default value: 0x07
584
+ :type mask: Hex
585
+ """
586
+
587
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type, self._vlan_type], use=use, value=value, mask=mask))
588
+
589
+ set_off = functools.partialmethod(set, OnOff.OFF)
590
+ """VLAN PCP is not used for the filter."""
591
+
592
+ set_on = functools.partialmethod(set, OnOff.ON)
593
+ """VLAN PCP is used for the filter."""
594
+
595
+
596
+ @register_command
597
+ @dataclass
598
+ class PEF_MPLSSETTINGS:
599
+ """
600
+ Basic mode only. Defines what filter action is performed on the MPLS header.
601
+ """
602
+
603
+ code: typing.ClassVar[int] = 1710
604
+ pushed: typing.ClassVar[bool] = False
605
+
606
+ _connection: 'interfaces.IConnection'
607
+ _module: int
608
+ _port: int
609
+ _flow_xindex: int
610
+ _filter_type: FilterType
611
+
612
+ class GetDataAttr(ResponseBodyStruct):
613
+ use: FilterUse = field(XmpByte())
614
+ """coded byte, specifies the use of MPLS information"""
615
+ action: InfoAction = field(XmpByte())
616
+ """coded byte, specifies the action on MPLS information"""
617
+
618
+ class SetDataAttr(RequestBodyStruct):
619
+ use: FilterUse = field(XmpByte())
620
+ """coded byte, specifies the use of MPLS information."""
621
+ action: InfoAction = field(XmpByte())
622
+ """coded byte, specifies the action on MPLS information"""
623
+
624
+ def get(self) -> Token[GetDataAttr]:
625
+ """Get the filter action settings on the MPLS header.
626
+
627
+ :return: the filter action settings on the MPLS header
628
+ :rtype: PEF_MPLSSETTINGS.GetDataAttr
629
+ """
630
+
631
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
632
+
633
+ def set(self, use: FilterUse, action: InfoAction) -> Token[None]:
634
+ """Set the filter action settings on the MPLS header.
635
+
636
+ :param use: specifies the use of MPLS information
637
+ :type use: FilterUse
638
+ :param action: specifies specifies if MPLS information is expected
639
+ :type action: InfoAction
640
+ """
641
+
642
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], use=use, action=action))
643
+
644
+
645
+ @register_command
646
+ @dataclass
647
+ class PEF_MPLSLABEL:
648
+ """
649
+ Basic mode only. Defines the MPLS label settings for the filter.
650
+
651
+ .. note::
652
+
653
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``
654
+
655
+ """
656
+
657
+ code: typing.ClassVar[int] = 1711
658
+ pushed: typing.ClassVar[bool] = False
659
+
660
+ _connection: 'interfaces.IConnection'
661
+ _module: int
662
+ _port: int
663
+ _flow_xindex: int
664
+ _filter_type: FilterType
665
+
666
+ class GetDataAttr(ResponseBodyStruct):
667
+ use: OnOff = field(XmpByte())
668
+ """coded byte, specifies the use of MPLS information."""
669
+ value: int = field(XmpInt())
670
+ """integer, specifying the 20 bit value of the label. Default value: 0."""
671
+ mask: Hex = field(XmpHex(size=3))
672
+ """three hex bytes, specifying the 20 bit value of the label. Default value: 0x0FFFFF,"""
673
+
674
+ class SetDataAttr(RequestBodyStruct):
675
+ use: OnOff = field(XmpByte())
676
+ """coded byte, specifies the use of MPLS information."""
677
+ value: int = field(XmpInt())
678
+ """integer, specifying the 20 bit value of the label. Default value: 0."""
679
+ mask: Hex = field(XmpHex(size=3))
680
+ """three hex bytes, specifying the 20 bit value of the label. Default value: 0x0FFFFF,"""
681
+
682
+ def get(self) -> Token[GetDataAttr]:
683
+ """Get the MPLS label settings for the filter.
684
+
685
+ :return: the MPLS label settings for the filter
686
+ :rtype: PEF_MPLSLABEL.GetDataAttr
687
+ """
688
+
689
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
690
+
691
+ def set(self, use: OnOff, value: int, mask: Hex) -> Token[None]:
692
+ """Set the MPLS label settings for the filter.
693
+
694
+ :param use: specifies the use of MPLS label information.
695
+ :type use: OnOff
696
+ :param value: specifying the 20-bit value of the label. Default value: 0.
697
+ :type value: int
698
+ :param mask: specifying the 20-bit value of the label. Default value: 0x0FFFFF,
699
+ :type mask: Hex
700
+ """
701
+
702
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], use=use, value=value, mask=mask))
703
+
704
+ set_off = functools.partialmethod(set, OnOff.OFF)
705
+ """The MPLS label is not used by the filter"""
706
+
707
+ set_on = functools.partialmethod(set, OnOff.ON)
708
+ """The MPLS label is used by the filter"""
709
+
710
+
711
+ @register_command
712
+ @dataclass
713
+ class PEF_MPLSTOC:
714
+ """
715
+ Basic mode only. Defines the MPLS TOC settings for the filter.
716
+
717
+ .. note::
718
+
719
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``
720
+
721
+ """
722
+
723
+ code: typing.ClassVar[int] = 1712
724
+ pushed: typing.ClassVar[bool] = False
725
+
726
+ _connection: 'interfaces.IConnection'
727
+ _module: int
728
+ _port: int
729
+ _flow_xindex: int
730
+ _filter_type: FilterType
731
+
732
+ class GetDataAttr(ResponseBodyStruct):
733
+ use: OnOff = field(XmpByte())
734
+ """coded byte, specifies the use of MPLS TOC information."""
735
+ value: int = field(XmpByte())
736
+ """byte, specifying the value of the MPLS TOC. Default value: 0 (Range: 0 to 7)."""
737
+ mask: Hex = field(XmpHex(size=1))
738
+ """hex byte, specifying the filter mask for the value of the MPLS TOC. Default value: 0x07"""
739
+
740
+ class SetDataAttr(RequestBodyStruct):
741
+ use: OnOff = field(XmpByte())
742
+ """coded byte, specifies the use of MPLS TOC information."""
743
+ value: int = field(XmpByte())
744
+ """byte, specifying the value of the MPLS TOC. Default value: 0 (Range: 0 to 7)."""
745
+ mask: Hex = field(XmpHex(size=1))
746
+ """hex byte, specifying the filter mask for the value of the MPLS TOC. Default value: 0x07"""
747
+
748
+ def get(self) -> Token[GetDataAttr]:
749
+ """Get the MPLS TOC settings for the filter.
750
+
751
+ :return: the MPLS TOC settings for the filter
752
+ :rtype: PEF_MPLSTOC.GetDataAttr
753
+ """
754
+
755
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
756
+
757
+ def set(self, use: OnOff, value: int, mask: Hex) -> Token[None]:
758
+ """Set the MPLS TOC settings for the filter.
759
+
760
+ :param use: specifies the use of MPLS TOC information
761
+ :type use: OnOff
762
+ :param value: specifying the value of the MPLS TOC. Default value: 0 (Range: 0 to 7).
763
+ :type value: int
764
+ :param mask: specifying the filter mask for the value of the MPLS TOC. Default value: 0x07
765
+ :type mask: Hex
766
+ """
767
+
768
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], use=use, value=value, mask=mask))
769
+
770
+ set_off = functools.partialmethod(set, OnOff.OFF)
771
+ """The MPLS TOC is not used by the filter."""
772
+
773
+ set_on = functools.partialmethod(set, OnOff.ON)
774
+ """The MPLS TOC is used by the filter."""
775
+
776
+
777
+ @register_command
778
+ @dataclass
779
+ class PEF_L3USE:
780
+ """
781
+ Basic mode only. Defines what Layer 3 protocols that are present and may be used
782
+ for the filter.
783
+
784
+ .. note::
785
+
786
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``
787
+
788
+ """
789
+
790
+ code: typing.ClassVar[int] = 1713
791
+ pushed: typing.ClassVar[bool] = False
792
+
793
+ _connection: 'interfaces.IConnection'
794
+ _module: int
795
+ _port: int
796
+ _flow_xindex: int
797
+ _filter_type: FilterType
798
+
799
+ class GetDataAttr(ResponseBodyStruct):
800
+ use: L3Present = field(XmpByte())
801
+ """coded byte, specifies the presence of Layer 3 protocols:"""
802
+
803
+ class SetDataAttr(RequestBodyStruct):
804
+ use: L3Present = field(XmpByte())
805
+ """coded byte, specifies the presence of Layer 3 protocols:"""
806
+
807
+ def get(self) -> Token[GetDataAttr]:
808
+ """Get Layer 3 protocols settings for the filter.
809
+
810
+ :return: Layer 3 protocols settings for the filter.
811
+ :rtype: PEF_L3USE.GetDataAttr
812
+ """
813
+
814
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
815
+
816
+ def set(self, use: L3Present) -> Token[None]:
817
+ """Set Layer 3 protocols settings for the filter.
818
+
819
+ :param use: specifies the presence of Layer 3 protocols
820
+ :type use: L3Present
821
+ """
822
+
823
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], use=use))
824
+
825
+ set_na = functools.partialmethod(set, L3Present.NA)
826
+ """Set Layer 3 protocol presence to NA."""
827
+
828
+ set_ip4 = functools.partialmethod(set, L3Present.IP4)
829
+ """Set Layer 3 protocol presence to IPv4."""
830
+
831
+ set_ip6 = functools.partialmethod(set, L3Present.IP6)
832
+ """Set Layer 3 protocol presence to IPv6."""
833
+
834
+
835
+ @register_command
836
+ @dataclass
837
+ class PEF_IPV4SETTINGS:
838
+ """
839
+ Basic mode only. Defines what filter action is performed on the IPv4 header.
840
+
841
+ .. note::
842
+
843
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``
844
+
845
+ """
846
+
847
+ code: typing.ClassVar[int] = 1714
848
+ pushed: typing.ClassVar[bool] = False
849
+
850
+ _connection: 'interfaces.IConnection'
851
+ _module: int
852
+ _port: int
853
+ _flow_xindex: int
854
+ _filter_type: FilterType
855
+
856
+ class GetDataAttr(ResponseBodyStruct):
857
+ use: FilterUse = field(XmpByte())
858
+ """coded byte, specifies the use of IPv4 information."""
859
+ action: InfoAction = field(XmpByte())
860
+ """coded byte, specifies the action of IPv4 information."""
861
+
862
+ class SetDataAttr(RequestBodyStruct):
863
+ use: FilterUse = field(XmpByte())
864
+ """coded byte, specifies the use of IPv4 information."""
865
+ action: InfoAction = field(XmpByte())
866
+ """coded byte, specifies the action of IPv4 information."""
867
+
868
+ def get(self) -> Token[GetDataAttr]:
869
+ """Get the filter action settings on IPv4 header.
870
+
871
+ :return: the filter action settings on IPv4 header
872
+ :rtype: PEF_IPV4SETTINGS.GetDataAttr
873
+ """
874
+
875
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
876
+
877
+ def set(self, use: FilterUse, action: InfoAction) -> Token[None]:
878
+ """Set the filter action settings on IPv4 header.
879
+
880
+ :param use: specifies the use of IPv4 information
881
+ :type use: FilterUse
882
+ :param action: specifies the action of IPv4 information
883
+ :type action: InfoAction
884
+ """
885
+
886
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], use=use, action=action))
887
+
888
+
889
+ @register_command
890
+ @dataclass
891
+ class PEF_IPV4SRCADDR:
892
+ """
893
+ Basic mode only. Defines the IPv4 Source Address settings for the IPv4 filter.
894
+
895
+ .. note::
896
+
897
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``
898
+
899
+ """
900
+
901
+ code: typing.ClassVar[int] = 1715
902
+ pushed: typing.ClassVar[bool] = False
903
+
904
+ _connection: 'interfaces.IConnection'
905
+ _module: int
906
+ _port: int
907
+ _flow_xindex: int
908
+ _filter_type: FilterType
909
+
910
+ class GetDataAttr(ResponseBodyStruct):
911
+ use: OnOff = field(XmpByte())
912
+ """coded byte, specifies the use of IPv4 Source Address."""
913
+ value: ipaddress.IPv4Address = field(XmpIPv4Address())
914
+ """address, specifying the four bytes of the address. Default value: 0.0.0.0"""
915
+ mask: Hex = field(XmpHex(size=4))
916
+ """four hex bytes, specifying the filter mask of the value. Default value: 0xFFFFFFFF"""
917
+
918
+ class SetDataAttr(RequestBodyStruct):
919
+ use: OnOff = field(XmpByte())
920
+ """coded byte, specifies the use of IPv4 Source Address."""
921
+ value: ipaddress.IPv4Address = field(XmpIPv4Address())
922
+ """address, specifying the four bytes of the address. Default value: 0.0.0.0"""
923
+ mask: Hex = field(XmpHex(size=4))
924
+ """four hex bytes, specifying the filter mask of the value. Default value: 0xFFFFFFFF"""
925
+
926
+ def get(self) -> Token[GetDataAttr]:
927
+ """Get the IPv4 Source Address settings for the IPv4 filter.
928
+
929
+ :return: the IPv4 Source Address settings for the IPv4 filter
930
+ :rtype: PEF_IPV4SRCADDR.GetDataAttr
931
+ """
932
+
933
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
934
+
935
+ def set(self, use: OnOff, value: ipaddress.IPv4Address, mask: Hex) -> Token[None]:
936
+ """Set the IPv4 Source Address settings for the IPv4 filter.
937
+
938
+ :param use: specifies the use of IPv4 Source Address information
939
+ :type use: OnOff
940
+ :param value: specifying the four bytes of the address. Default value: 0.0.0.0
941
+ :type value: ipaddress.IPv4Address
942
+ :param mask: specifying the filter mask of the value. Default value: 0xFFFFFFFF
943
+ :type mask: Hex
944
+ """
945
+
946
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], use=use, value=value, mask=mask))
947
+
948
+ set_off = functools.partialmethod(set, OnOff.OFF)
949
+ """IPv4 Source Address is not used by the filter."""
950
+
951
+ set_on = functools.partialmethod(set, OnOff.ON)
952
+ """IPv4 Source Address is used by the filter."""
953
+
954
+
955
+ @register_command
956
+ @dataclass
957
+ class PEF_IPV4DESTADDR:
958
+ """
959
+ Basic mode only. Defines the IPv4 Destination Address settings for the IPv4 filter.
960
+
961
+ .. note::
962
+
963
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``
964
+
965
+ """
966
+
967
+ code: typing.ClassVar[int] = 1716
968
+ pushed: typing.ClassVar[bool] = False
969
+
970
+ _connection: 'interfaces.IConnection'
971
+ _module: int
972
+ _port: int
973
+ _flow_xindex: int
974
+ _filter_type: FilterType
975
+
976
+ class GetDataAttr(ResponseBodyStruct):
977
+ use: OnOff = field(XmpByte())
978
+ """coded byte, specifies the use of IPv4 Destination Address."""
979
+ value: ipaddress.IPv4Address = field(XmpIPv4Address())
980
+ """address, specifying the four bytes of the address. Default value: 0.0.0.0"""
981
+ mask: Hex = field(XmpHex(size=4))
982
+ """four hex bytes, specifying the filter mask of the value. Default value: 0xFFFFFFFF"""
983
+
984
+ class SetDataAttr(RequestBodyStruct):
985
+ use: OnOff = field(XmpByte())
986
+ """coded byte, specifies the use of IPv4 Destination Address."""
987
+ value: ipaddress.IPv4Address = field(XmpIPv4Address())
988
+ """address, specifying the four bytes of the address. Default value: 0.0.0.0"""
989
+ mask: Hex = field(XmpHex(size=4))
990
+ """four hex bytes, specifying the filter mask of the value. Default value: 0xFFFFFFFF"""
991
+
992
+ def get(self) -> Token[GetDataAttr]:
993
+ """Get the IPv4 Destination Address settings for the IPv4 filter.
994
+
995
+ :return: the IPv4 Destination Address settings for the IPv4 filter
996
+ :rtype: PEF_IPV4DESTADDR.GetDataAttr
997
+ """
998
+
999
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
1000
+
1001
+ def set(self, use: OnOff, value: ipaddress.IPv4Address, mask: Hex) -> Token[None]:
1002
+ """Set the IPv4 Destination Address settings for the IPv4 filter.
1003
+
1004
+ :param use: specifies the use of IPv4 Destination Address information
1005
+ :type use: OnOff
1006
+ :param value: specifying the four bytes of the address. Default value: 0.0.0.0
1007
+ :type value: ipaddress.IPv4Address
1008
+ :param mask: specifying the filter mask of the value. Default value: 0xFFFFFFFF
1009
+ :type mask: Hex
1010
+ """
1011
+
1012
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], use=use, value=value, mask=mask))
1013
+
1014
+ set_off = functools.partialmethod(set, OnOff.OFF)
1015
+ """IPv4 Destination Address is not used by the filter."""
1016
+
1017
+ set_on = functools.partialmethod(set, OnOff.ON)
1018
+ """IPv4 Destination Address is used by the filter."""
1019
+
1020
+
1021
+ @register_command
1022
+ @dataclass
1023
+ class PEF_IPV4DSCP:
1024
+ """
1025
+ Basic mode only. Defines if IPv4 DSCP/TOS settings used for the IPv4 filter.
1026
+
1027
+ .. note::
1028
+
1029
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``
1030
+
1031
+ """
1032
+
1033
+ code: typing.ClassVar[int] = 1717
1034
+ pushed: typing.ClassVar[bool] = False
1035
+
1036
+ _connection: 'interfaces.IConnection'
1037
+ _module: int
1038
+ _port: int
1039
+ _flow_xindex: int
1040
+ _filter_type: FilterType
1041
+
1042
+ class GetDataAttr(ResponseBodyStruct):
1043
+ use: OnOff = field(XmpByte())
1044
+ """coded byte, specifies the use of IPv4 information."""
1045
+ value: int = field(XmpByte())
1046
+ """byte, specifying the value of the IPv4 DSCP/TOS in the upper 6 bits. value[7:2] = DSCP/TOS, value[1:0] = reserved (must be zero). Default value: 0"""
1047
+ mask: Hex = field(XmpHex(size=1))
1048
+ """hex byte, specifying the filter mask of the value in the upper 6 bits. mask[7:2] = DSCP/TOS mask, mask[1:0] = reserved (must be zero). Default value: 0xFC"""
1049
+
1050
+ class SetDataAttr(RequestBodyStruct):
1051
+ use: OnOff = field(XmpByte())
1052
+ """coded byte, specifies the use of IPv4 information."""
1053
+ value: int = field(XmpByte())
1054
+ """byte, specifying the value of the IPv4 DSCP/TOS in the upper 6 bits. value[7:2] = DSCP/TOS, value[1:0] = reserved (must be zero). Default value: 0"""
1055
+ mask: Hex = field(XmpHex(size=1))
1056
+ """hex byte, specifying the filter mask of the value in the upper 6 bits. mask[7:2] = DSCP/TOS mask, mask[1:0] = reserved (must be zero). Default value: 0xFC"""
1057
+
1058
+ def get(self) -> Token[GetDataAttr]:
1059
+ """Get IPv4 DSCP/TOS settings for the filter.
1060
+
1061
+ :return: IPv4 DSCP/TOS settings for the filter.
1062
+ :rtype: PEF_IPV4DSCP.GetDataAttr
1063
+ """
1064
+
1065
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
1066
+
1067
+ def set(self, use: OnOff, value: int, mask: Hex) -> Token[None]:
1068
+ """Set IPv4 DSCP/TOS settings for the filter.
1069
+
1070
+ :param use: specifies the use of IPv4 DSCP/TOS information.
1071
+ :type use: OnOff
1072
+ :param value: specifying the value of the IPv4 DSCP/TOS in the upper 6 bits. value[7:2] = DSCP/TOS, value[1:0] = reserved (must be zero). Default value: 0
1073
+ :type value: int
1074
+ :param mask: specifying the filter mask of the value in the upper 6 bits. mask[7:2] = DSCP/TOS mask, mask[1:0] = reserved (must be zero). Default value: 0xFC
1075
+ :type mask: Hex
1076
+ """
1077
+
1078
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], use=use, value=value, mask=mask))
1079
+
1080
+ set_off = functools.partialmethod(set, OnOff.OFF)
1081
+ """IPv4 DSCP/TOS is not used in the filter."""
1082
+
1083
+ set_on = functools.partialmethod(set, OnOff.ON)
1084
+ """IPv4 DSCP/TOS is used in the filter."""
1085
+
1086
+
1087
+ @register_command
1088
+ @dataclass
1089
+ class PEF_IPV6SETTINGS:
1090
+ """
1091
+ Basic mode only. Defines what filter action is performed on the IPv6 header.
1092
+
1093
+ .. note::
1094
+
1095
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``
1096
+
1097
+ """
1098
+
1099
+ code: typing.ClassVar[int] = 1718
1100
+ pushed: typing.ClassVar[bool] = False
1101
+
1102
+ _connection: 'interfaces.IConnection'
1103
+ _module: int
1104
+ _port: int
1105
+ _flow_xindex: int
1106
+ _filter_type: FilterType
1107
+
1108
+ class GetDataAttr(ResponseBodyStruct):
1109
+ use: FilterUse = field(XmpByte())
1110
+ """coded byte, specifies the use of IPv6 information."""
1111
+ action: InfoAction = field(XmpByte())
1112
+ """coded byte, specifies the action of IPv6 information."""
1113
+
1114
+ class SetDataAttr(RequestBodyStruct):
1115
+ use: FilterUse = field(XmpByte())
1116
+ """coded byte, specifies the use of IPv6 information."""
1117
+ action: InfoAction = field(XmpByte())
1118
+ """coded byte, specifies the action of IPv6 information."""
1119
+
1120
+ def get(self) -> Token[GetDataAttr]:
1121
+ """Get filter action settings on the IPv6 header.
1122
+
1123
+ :return: specifies the use of IPv6 header
1124
+ :rtype: PEF_IPV6SETTINGS.GetDataAttr
1125
+ """
1126
+
1127
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
1128
+
1129
+ def set(self, use: FilterUse, action: InfoAction) -> Token[None]:
1130
+ """Set filter action settings on the IPv6 header.
1131
+
1132
+ :param use: specifies the use of IPv6 header
1133
+ :type use: FilterUse
1134
+ :param action: specifies the action of IPv6 header
1135
+ :type action: InfoAction
1136
+ """
1137
+
1138
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], use=use, action=action))
1139
+
1140
+
1141
+ @register_command
1142
+ @dataclass
1143
+ class PEF_IPV6SRCADDR:
1144
+ """
1145
+ Basic mode only. Defines the IPv6 Source Address settings for the IPv6 filter.
1146
+
1147
+ .. note::
1148
+
1149
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``
1150
+
1151
+ """
1152
+
1153
+ code: typing.ClassVar[int] = 1719
1154
+ pushed: typing.ClassVar[bool] = False
1155
+
1156
+ _connection: 'interfaces.IConnection'
1157
+ _module: int
1158
+ _port: int
1159
+ _flow_xindex: int
1160
+ _filter_type: FilterType
1161
+
1162
+ class GetDataAttr(ResponseBodyStruct):
1163
+ use: OnOff = field(XmpByte())
1164
+ """coded byte, specifies the use of IPv6 Source Address."""
1165
+ value: ipaddress.IPv6Address = field(XmpIPv6Address())
1166
+ """16 hex bytes, specifying the address. Default : 0x00000000000000000000000000000000"""
1167
+ mask: Hex = field(XmpHex(size=16))
1168
+ """16 hex bytes, specifying the six first bytes of the address. Default value: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"""
1169
+
1170
+ class SetDataAttr(RequestBodyStruct):
1171
+ use: OnOff = field(XmpByte())
1172
+ """coded byte, specifies the use of IPv6 Source Address."""
1173
+ value: ipaddress.IPv6Address = field(XmpIPv6Address())
1174
+ """16 hex bytes, specifying the address. Default : 0x00000000000000000000000000000000"""
1175
+ mask: Hex = field(XmpHex(size=16))
1176
+ """16 hex bytes, specifying the six first bytes of the address. Default value: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"""
1177
+
1178
+ def get(self) -> Token[GetDataAttr]:
1179
+ """Get the IPv6 Source Address settings for the IPv6 filter.
1180
+
1181
+ :return: the IPv6 Source Address settings for the IPv6 filter
1182
+ :rtype: PEF_IPV6SRCADDR.GetDataAttr
1183
+ """
1184
+
1185
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
1186
+
1187
+ def set(self, use: OnOff, value: ipaddress.IPv6Address, mask: Hex) -> Token[None]:
1188
+ """Set the IPv6 Source Address settings for the IPv6 filter.
1189
+
1190
+ :param use: specifies the use of IPv6 Source Address information
1191
+ :type use: OnOff
1192
+ :param value: specifying the address. Default : 0x00000000000000000000000000000000
1193
+ :type value: ipaddress.IPv6Address
1194
+ :param mask: specifying the six first bytes of the address. Default value: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
1195
+ :type mask: Hex
1196
+ """
1197
+
1198
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], use=use, value=value, mask=mask))
1199
+
1200
+ set_off = functools.partialmethod(set, OnOff.OFF)
1201
+ """IPv6 Source Address is not used in the filter."""
1202
+
1203
+ set_on = functools.partialmethod(set, OnOff.ON)
1204
+ """IPv6 Source Address is used in the filter."""
1205
+
1206
+
1207
+ @register_command
1208
+ @dataclass
1209
+ class PEF_IPV6DESTADDR:
1210
+ """
1211
+ Basic mode only. Defines the IPv6 Destination Address settings for the IPv6 filter.
1212
+
1213
+ .. note::
1214
+
1215
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``
1216
+
1217
+ """
1218
+
1219
+ code: typing.ClassVar[int] = 1720
1220
+ pushed: typing.ClassVar[bool] = False
1221
+
1222
+ _connection: 'interfaces.IConnection'
1223
+ _module: int
1224
+ _port: int
1225
+ _flow_xindex: int
1226
+ _filter_type: FilterType
1227
+
1228
+ class GetDataAttr(ResponseBodyStruct):
1229
+ use: OnOff = field(XmpByte())
1230
+ """coded byte, specifies the use of IPv6 Destination Address."""
1231
+ value: ipaddress.IPv6Address = field(XmpIPv6Address())
1232
+ """16 hex bytes, specifying the address. Default : 0x00000000000000000000000000000000"""
1233
+ mask: Hex = field(XmpHex(size=16))
1234
+ """16 hex bytes, specifying the six first bytes of the address. Default value: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"""
1235
+
1236
+ class SetDataAttr(RequestBodyStruct):
1237
+ use: OnOff = field(XmpByte())
1238
+ """coded byte, specifies the use of IPv6 Destination Address."""
1239
+ value: ipaddress.IPv6Address = field(XmpIPv6Address())
1240
+ """16 hex bytes, specifying the address. Default : 0x00000000000000000000000000000000"""
1241
+ mask: Hex = field(XmpHex(size=16))
1242
+ """16 hex bytes, specifying the six first bytes of the address. Default value: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"""
1243
+
1244
+ def get(self) -> Token[GetDataAttr]:
1245
+ """Get the IPv6 Destination Address settings for the IPv6 filter.
1246
+
1247
+ :return: IPv6 Destination Address settings for the IPv6 filter
1248
+ :rtype: PEF_IPV6DESTADDR.GetDataAttr
1249
+ """
1250
+
1251
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
1252
+
1253
+ def set(self, use: OnOff, value: ipaddress.IPv6Address, mask: Hex) -> Token[None]:
1254
+ """Set the IPv6 Destination Address settings for the IPv6 filter.
1255
+
1256
+ :param use: specifies the use of IPv6 Destination Address information
1257
+ :type use: OnOff
1258
+ :param value: specifying the address. Default : 0x00000000000000000000000000000000
1259
+ :type value: ipaddress.IPv6Address
1260
+ :param mask: specifying the six first bytes of the address. Default value: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
1261
+ :type mask: Hex
1262
+ """
1263
+
1264
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], use=use, value=value, mask=mask))
1265
+
1266
+ set_off = functools.partialmethod(set, OnOff.OFF)
1267
+ """IPv6 Destination Address is not used in the filter."""
1268
+
1269
+ set_on = functools.partialmethod(set, OnOff.ON)
1270
+ """IPv6 Destination Address is used in the filter."""
1271
+
1272
+
1273
+ @register_command
1274
+ @dataclass
1275
+ class PEF_IPV6TC:
1276
+ """
1277
+ Basic mode only. Defines the IPv6 Traffic Class settings used for the filter.
1278
+
1279
+ .. note::
1280
+
1281
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``
1282
+
1283
+ """
1284
+
1285
+ code: typing.ClassVar[int] = 1721
1286
+ pushed: typing.ClassVar[bool] = False
1287
+
1288
+ _connection: 'interfaces.IConnection'
1289
+ _module: int
1290
+ _port: int
1291
+ _flow_xindex: int
1292
+ _filter_type: FilterType
1293
+
1294
+ class GetDataAttr(ResponseBodyStruct):
1295
+ use: OnOff = field(XmpByte())
1296
+ """coded byte, specifies the use of IPv6 information."""
1297
+ value: int = field(XmpByte())
1298
+ """byte, specifying the value of the IPv6 Traffic Class in the upper 6 bits. value[7:2] = IPv6 Traffic Class. value[1:0] = reserved (must be zero). Default value: 0"""
1299
+ mask: Hex = field(XmpHex(size=1))
1300
+ """hex byte, specifying the filter mask for the value in the upper 6 bits. mask[7:2] = IPv6 Traffic Class mask. mask[1:0] = reserved (must be zero). Default value: 0xFC"""
1301
+
1302
+ class SetDataAttr(RequestBodyStruct):
1303
+ use: OnOff = field(XmpByte())
1304
+ """coded byte, specifies the use of IPv6 information."""
1305
+ value: int = field(XmpByte())
1306
+ """byte, specifying the value of the IPv6 Traffic Class in the upper 6 bits. value[7:2] = IPv6 Traffic Class. value[1:0] = reserved (must be zero). Default value: 0"""
1307
+ mask: Hex = field(XmpHex(size=1))
1308
+ """hex byte, specifying the filter mask for the value in the upper 6 bits. mask[7:2] = IPv6 Traffic Class mask. mask[1:0] = reserved (must be zero). Default value: 0xFC"""
1309
+
1310
+ def get(self) -> Token[GetDataAttr]:
1311
+ """Get IPv6 Traffic Class settings used for the filter.
1312
+
1313
+ :return: IPv6 Traffic Class settings used for the filter
1314
+ :rtype: PEF_IPV6TC.GetDataAttr
1315
+ """
1316
+
1317
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
1318
+
1319
+ def set(self, use: OnOff, value: int, mask: Hex) -> Token[None]:
1320
+ """Set IPv6 Traffic Class settings used for the filter.
1321
+
1322
+ :param use: specifies the use of the IPv6 Traffic Class information.
1323
+ :type use: OnOff
1324
+ :param value: specifying the value of the IPv6 Traffic Class in the upper 6 bits. value[7:2] = IPv6 Traffic Class. value[1:0] = reserved (must be zero). Default value: 0
1325
+ :type value: int
1326
+ :param mask: specifying the filter mask for the value in the upper 6 bits. mask[7:2] = IPv6 Traffic Class mask. mask[1:0] = reserved (must be zero). Default value: 0xFC
1327
+ :type mask: Hex
1328
+ """
1329
+
1330
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], use=use, value=value, mask=mask))
1331
+
1332
+ set_off = functools.partialmethod(set, OnOff.OFF)
1333
+ """IPv6 Traffic Class is not used in the filter."""
1334
+
1335
+ set_on = functools.partialmethod(set, OnOff.ON)
1336
+ """IPv6 Traffic Class is used in the filter."""
1337
+
1338
+
1339
+ @register_command
1340
+ @dataclass
1341
+ class PEF_UDPSETTINGS:
1342
+ """
1343
+ Basic mode only. Controls if UDP packet information is used for flow filtering.
1344
+
1345
+ .. note::
1346
+
1347
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``
1348
+
1349
+ """
1350
+
1351
+ code: typing.ClassVar[int] = 1722
1352
+ pushed: typing.ClassVar[bool] = False
1353
+
1354
+ _connection: 'interfaces.IConnection'
1355
+ _module: int
1356
+ _port: int
1357
+ _flow_xindex: int
1358
+ _filter_type: FilterType
1359
+
1360
+ class GetDataAttr(ResponseBodyStruct):
1361
+ use: FilterUse = field(XmpByte())
1362
+ """coded byte, specifies the use of UDP information."""
1363
+ action: InfoAction = field(XmpByte())
1364
+ """coded byte, specifies action use of UDP information."""
1365
+
1366
+ class SetDataAttr(RequestBodyStruct):
1367
+ use: FilterUse = field(XmpByte())
1368
+ """coded byte, specifies the use of UDP information."""
1369
+ action: InfoAction = field(XmpByte())
1370
+ """coded byte, specifies the action of UDP information."""
1371
+
1372
+ def get(self) -> Token[GetDataAttr]:
1373
+ """Get filter settings on the UDP header.
1374
+
1375
+ :return: filter action settings on the UDP header
1376
+ :rtype: PEF_UDPSETTINGS.GetDataAttr
1377
+ """
1378
+
1379
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
1380
+
1381
+ def set(self, use: FilterUse, action: InfoAction) -> Token[None]:
1382
+ """Set filter settings on the UDP header.
1383
+
1384
+ :param use: specifies the use of UDP information.
1385
+ :type use: FilterUse
1386
+ :param action: specifies the action of UDP information.
1387
+ :type action: InfoAction
1388
+ """
1389
+
1390
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], use=use, action=action))
1391
+
1392
+
1393
+ @register_command
1394
+ @dataclass
1395
+ class PEF_UDPSRCPORT:
1396
+ """
1397
+ Basic mode only. Defines UDP Source Port settings used for the filter.
1398
+
1399
+ .. note::
1400
+
1401
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``
1402
+
1403
+ """
1404
+
1405
+ code: typing.ClassVar[int] = 1723
1406
+ pushed: typing.ClassVar[bool] = False
1407
+
1408
+ _connection: 'interfaces.IConnection'
1409
+ _module: int
1410
+ _port: int
1411
+ _flow_xindex: int
1412
+ _filter_type: FilterType
1413
+
1414
+ class GetDataAttr(ResponseBodyStruct):
1415
+ use: OnOff = field(XmpByte())
1416
+ """coded byte, specifies the use of UDP Source Port information"""
1417
+ value: int = field(XmpInt())
1418
+ """integer , specifying the value of the UDP Source Port. Default value: 0"""
1419
+ mask: Hex = field(XmpHex(size=2))
1420
+ """two hex bytes , specifying the filter mask for the value. Default value: 0xFFFF"""
1421
+
1422
+ class SetDataAttr(RequestBodyStruct):
1423
+ use: OnOff = field(XmpByte())
1424
+ """coded byte, specifies the use of UDP Source Port information"""
1425
+ value: int = field(XmpInt())
1426
+ """integer , specifying the value of the UDP Source Port. Default value: 0"""
1427
+ mask: Hex = field(XmpHex(size=2))
1428
+ """two hex bytes , specifying the filter mask for the value. Default value: 0xFFFF"""
1429
+
1430
+ def get(self) -> Token[GetDataAttr]:
1431
+ """Get UDP Source Port settings used for the filter.
1432
+
1433
+ :return: UDP Source Port settings used for the filter.
1434
+ :rtype: PEF_UDPSRCPORT.GetDataAttr
1435
+ """
1436
+
1437
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
1438
+
1439
+ def set(self, use: OnOff, value: int, mask: Hex) -> Token[None]:
1440
+ """Set UDP Source Port settings used for the filter.
1441
+
1442
+ :param use: specifies the use of UDP Source Port information
1443
+ :type use: OnOff
1444
+ :param value: specifying the value of the UDP Source Port. Default value: 0
1445
+ :type value: int
1446
+ :param mask: specifying the filter mask for the value. Default value: 0xFFFF
1447
+ :type mask: Hex
1448
+ """
1449
+
1450
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], use=use, value=value, mask=mask))
1451
+
1452
+ set_off = functools.partialmethod(set, OnOff.OFF)
1453
+ """UDP Source Port is not used in the filter."""
1454
+
1455
+ set_on = functools.partialmethod(set, OnOff.ON)
1456
+ """UDP Source Port is used in the filter."""
1457
+
1458
+
1459
+ @register_command
1460
+ @dataclass
1461
+ class PEF_UDPDESTPORT:
1462
+ """
1463
+ Basic mode only. Defines UDP Destination Port settings used for the filter.
1464
+
1465
+ .. note::
1466
+
1467
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``.
1468
+ """
1469
+
1470
+ code: typing.ClassVar[int] = 1724
1471
+ pushed: typing.ClassVar[bool] = False
1472
+
1473
+ _connection: 'interfaces.IConnection'
1474
+ _module: int
1475
+ _port: int
1476
+ _flow_xindex: int
1477
+ _filter_type: FilterType
1478
+
1479
+ class GetDataAttr(ResponseBodyStruct):
1480
+ use: OnOff = field(XmpByte())
1481
+ """coded byte, specifies the use of UDP Destination Port information"""
1482
+ value: int = field(XmpInt())
1483
+ """integer , specifying the value of the UDP Destination Port. Default value: 0"""
1484
+ mask: Hex = field(XmpHex(size=2))
1485
+ """two hex bytes , specifying the filter mask for the value. Default value: 0xFFFF"""
1486
+
1487
+ class SetDataAttr(RequestBodyStruct):
1488
+ use: OnOff = field(XmpByte())
1489
+ """coded byte, specifies the use of UDP Destination Port information"""
1490
+ value: int = field(XmpInt())
1491
+ """integer , specifying the value of the UDP Destination Port. Default value: 0"""
1492
+ mask: Hex = field(XmpHex(size=2))
1493
+ """two hex bytes , specifying the filter mask for the value. Default value: 0xFFFF"""
1494
+
1495
+ def get(self) -> Token[GetDataAttr]:
1496
+ """Get UDP Destination Port settings used for the filter.
1497
+
1498
+ :return: UDP Destination Port settings used for the filter.
1499
+ :rtype: PEF_UDPDESTPORT.GetDataAttr
1500
+ """
1501
+
1502
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
1503
+
1504
+ def set(self, use: OnOff, value: int, mask: Hex) -> Token[None]:
1505
+ """Set UDP Destination Port settings used for the filter.
1506
+
1507
+ :param use: specifies the use of UDP Destination Port information
1508
+ :type use: OnOff
1509
+ :param value: specifying the value of the UDP Destination Port. Default value: 0
1510
+ :type value: int
1511
+ :param mask: specifying the filter mask for the value. Default value: 0xFFFF
1512
+ :type mask: Hex
1513
+ """
1514
+
1515
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], use=use, value=value, mask=mask))
1516
+
1517
+ set_off = functools.partialmethod(set, OnOff.OFF)
1518
+ """UDP Destination Port is not used in the filter."""
1519
+
1520
+ set_on = functools.partialmethod(set, OnOff.ON)
1521
+ """UDP Destination Port is used in the filter."""
1522
+
1523
+
1524
+ @register_command
1525
+ @dataclass
1526
+ class PEF_TCPSETTINGS:
1527
+ """
1528
+ Basic mode only. Defines if filtering on TCP information is used for flow
1529
+ filtering.
1530
+
1531
+ .. note::
1532
+
1533
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``.
1534
+
1535
+ """
1536
+
1537
+ code: typing.ClassVar[int] = 1725
1538
+ pushed: typing.ClassVar[bool] = False
1539
+
1540
+ _connection: 'interfaces.IConnection'
1541
+ _module: int
1542
+ _port: int
1543
+ _flow_xindex: int
1544
+ _filter_type: FilterType
1545
+
1546
+ class GetDataAttr(ResponseBodyStruct):
1547
+ use: FilterUse = field(XmpByte())
1548
+ """coded byte, specifies the use of TCP information."""
1549
+ action: InfoAction = field(XmpByte())
1550
+ """coded byte, specifies the action of TCP information."""
1551
+
1552
+ class SetDataAttr(RequestBodyStruct):
1553
+ use: FilterUse = field(XmpByte())
1554
+ """coded byte, specifies the use of TCP information."""
1555
+ action: InfoAction = field(XmpByte())
1556
+ """coded byte, specifies the action of TCP information."""
1557
+
1558
+ def get(self) -> Token[GetDataAttr]:
1559
+ """Get filter action settings on the TCP header.
1560
+
1561
+ :return: filter action settings on the TCP header.
1562
+ :rtype: PEF_TCPSETTINGS.GetDataAttr
1563
+ """
1564
+
1565
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
1566
+
1567
+ def set(self, use: FilterUse, action: InfoAction) -> Token[None]:
1568
+ """Set filter action settings on the TCP header.
1569
+
1570
+ :param use: specifies the use of TCP information.
1571
+ :type use: FilterUse
1572
+ :param action: specifies the action of TCP information.
1573
+ :type action: InfoAction
1574
+ """
1575
+
1576
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], use=use, action=action))
1577
+
1578
+
1579
+ @register_command
1580
+ @dataclass
1581
+ class PEF_TCPSRCPORT:
1582
+ """
1583
+ Basic mode only. Defines TCP Source Port settings used for the filter.
1584
+
1585
+ .. note::
1586
+
1587
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``.
1588
+
1589
+ """
1590
+
1591
+ code: typing.ClassVar[int] = 1726
1592
+ pushed: typing.ClassVar[bool] = False
1593
+
1594
+ _connection: 'interfaces.IConnection'
1595
+ _module: int
1596
+ _port: int
1597
+ _flow_xindex: int
1598
+ _filter_type: FilterType
1599
+
1600
+ class GetDataAttr(ResponseBodyStruct):
1601
+ use: OnOff = field(XmpByte())
1602
+ """coded byte, specifies the use of TCP Source Port information"""
1603
+ value: int = field(XmpInt())
1604
+ """integer , specifying the value of the TCP Source Port. Default value: 0"""
1605
+ mask: Hex = field(XmpHex(size=2))
1606
+ """two hex bytes , specifying the filter mask for the value. Default value: 0xFFFF"""
1607
+
1608
+ class SetDataAttr(RequestBodyStruct):
1609
+ use: OnOff = field(XmpByte())
1610
+ """coded byte, specifies the use of TCP Source Port information"""
1611
+ value: int = field(XmpInt())
1612
+ """integer , specifying the value of the TCP Source Port. Default value: 0"""
1613
+ mask: Hex = field(XmpHex(size=2))
1614
+ """two hex bytes , specifying the filter mask for the value. Default value: 0xFFFF"""
1615
+
1616
+ def get(self) -> Token[GetDataAttr]:
1617
+ """Get TCP Source Port settings used for the filter.
1618
+
1619
+ :return: TCP Source Port settings used for the filter.
1620
+ :rtype: PEF_TCPSRCPORT.GetDataAttr
1621
+ """
1622
+
1623
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
1624
+
1625
+ def set(self, use: OnOff, value: int, mask: Hex) -> Token[None]:
1626
+ """Set TCP Source Port settings used for the filter.
1627
+
1628
+ :param use: specifies the use of TCP Source Port information
1629
+ :type use: OnOff
1630
+ :param value: specifies the value of the TCP Source Port. Default value: 0
1631
+ :type value: int
1632
+ :param mask: specifies the filter mask for the value. Default value: 0xFFFF
1633
+ :type mask: Hex
1634
+ """
1635
+
1636
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], use=use, value=value, mask=mask))
1637
+
1638
+ set_off = functools.partialmethod(set, OnOff.OFF)
1639
+ """TCP Source Port is not used in the filter."""
1640
+
1641
+ set_on = functools.partialmethod(set, OnOff.ON)
1642
+ """TCP Source Port is used in the filter."""
1643
+
1644
+
1645
+ @register_command
1646
+ @dataclass
1647
+ class PEF_TCPDESTPORT:
1648
+ """
1649
+ Basic mode only. Defines TCP Destination Port settings used for the filter.
1650
+
1651
+ .. note::
1652
+
1653
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``.
1654
+
1655
+ """
1656
+
1657
+ code: typing.ClassVar[int] = 1727
1658
+ pushed: typing.ClassVar[bool] = False
1659
+
1660
+ _connection: 'interfaces.IConnection'
1661
+ _module: int
1662
+ _port: int
1663
+ _flow_xindex: int
1664
+ _filter_type: FilterType
1665
+
1666
+ class GetDataAttr(ResponseBodyStruct):
1667
+ use: OnOff = field(XmpByte())
1668
+ """coded byte, specifies the use of TCP Destination Port information"""
1669
+ value: int = field(XmpInt())
1670
+ """integer , specifying the value of the TCP Destination Port. Default value: 0"""
1671
+ mask: Hex = field(XmpHex(size=2))
1672
+ """two hex bytes , specifying the filter mask for the value. Default value: 0xFFFF"""
1673
+
1674
+ class SetDataAttr(RequestBodyStruct):
1675
+ use: OnOff = field(XmpByte())
1676
+ """coded byte, specifies the use of TCP Destination Port information"""
1677
+ value: int = field(XmpInt())
1678
+ """integer , specifying the value of the TCP Destination Port. Default value: 0"""
1679
+ mask: Hex = field(XmpHex(size=2))
1680
+ """two hex bytes , specifying the filter mask for the value. Default value: 0xFFFF"""
1681
+
1682
+ def get(self) -> Token[GetDataAttr]:
1683
+ """Get TCP Destination Port settings used for the filter.
1684
+
1685
+ :return: TCP Destination Port settings used for the filter.
1686
+ :rtype: PEF_TCPDESTPORT.GetDataAttr
1687
+ """
1688
+
1689
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
1690
+
1691
+ def set(self, use: OnOff, value: int, mask: Hex) -> Token[None]:
1692
+ """Set TCP Destination Port settings used for the filter.
1693
+
1694
+ :param use: specifies the use of TCP Destination Port information
1695
+ :type use: OnOff
1696
+ :param value: specifies the value of the TCP Destination Port. Default value: 0
1697
+ :type value: int
1698
+ :param mask: specifies the filter mask for the value. Default value: 0xFFFF
1699
+ :type mask: Hex
1700
+ """
1701
+
1702
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], use=use, value=value, mask=mask))
1703
+
1704
+ set_off = functools.partialmethod(set, OnOff.OFF)
1705
+ """TCP Destination Port is not used in the filter."""
1706
+
1707
+ set_on = functools.partialmethod(set, OnOff.ON)
1708
+ """TCP Destination Port is used in the filter."""
1709
+
1710
+
1711
+ @register_command
1712
+ @dataclass
1713
+ class PEF_ANYSETTINGS:
1714
+ """
1715
+ Basic mode only. Defines if filtering on ANY field in a packet is used for flow filtering.
1716
+
1717
+ .. note::
1718
+
1719
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``.
1720
+
1721
+ """
1722
+
1723
+ code: typing.ClassVar[int] = 1728
1724
+ pushed: typing.ClassVar[bool] = False
1725
+
1726
+ _connection: 'interfaces.IConnection'
1727
+ _module: int
1728
+ _port: int
1729
+ _flow_xindex: int
1730
+ _filter_type: FilterType
1731
+
1732
+ class GetDataAttr(ResponseBodyStruct):
1733
+ use: FilterUse = field(XmpByte())
1734
+ """coded byte, specifies the use of ANY field information."""
1735
+ action: InfoAction = field(XmpByte())
1736
+ """coded byte, specifies the action of ANY field information."""
1737
+
1738
+ class SetDataAttr(RequestBodyStruct):
1739
+ use: FilterUse = field(XmpByte())
1740
+ """coded byte, specifies the use of ANY field information."""
1741
+ action: InfoAction = field(XmpByte())
1742
+ """coded byte, specifies the action of ANY field information."""
1743
+
1744
+ def get(self) -> Token[GetDataAttr]:
1745
+ """Get the settings of filtering state on ANY field in a packet.
1746
+
1747
+ :return: settings of filtering state on ANY field in a packet.
1748
+ :rtype: PEF_ANYSETTINGS.GetDataAttr
1749
+ """
1750
+
1751
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
1752
+
1753
+ def set(self, use: FilterUse, action: InfoAction) -> Token[None]:
1754
+ """Set the settings of filtering state on ANY field in a packet.
1755
+
1756
+ :param use: specifies the use of ANY field information.
1757
+ :type use: FilterUse
1758
+ :param action: specifies the action of ANY field information.
1759
+ :type action: InfoAction
1760
+ """
1761
+
1762
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], use=use, action=action))
1763
+
1764
+
1765
+ @register_command
1766
+ @dataclass
1767
+ class PEF_ANYCONFIG:
1768
+ """
1769
+ Basic mode only. Defines the ANY field filter configuration. The "ANY field"
1770
+ filter will match 6 consecutive bytes in the incoming packets at a programmable
1771
+ offset. Applying a mask, allows to only filter based on selected bits within the
1772
+ 6 bytes.
1773
+
1774
+ .. note::
1775
+
1776
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``.
1777
+
1778
+ """
1779
+
1780
+ code: typing.ClassVar[int] = 1729
1781
+ pushed: typing.ClassVar[bool] = False
1782
+
1783
+ _connection: 'interfaces.IConnection'
1784
+ _module: int
1785
+ _port: int
1786
+ _flow_xindex: int
1787
+ _filter_type: FilterType
1788
+
1789
+ class GetDataAttr(ResponseBodyStruct):
1790
+ position: int = field(XmpByte())
1791
+ """byte, specifies the start position of the ANY field. Default value: 0, Range:0-127"""
1792
+ value: Hex = field(XmpHex(size=6))
1793
+ """6 hex bytes, specifying the six bytes of the field. Default value: 0x000000000000"""
1794
+ mask: Hex = field(XmpHex(size=6))
1795
+ """6 hex bytes, specifying the six bytes of the field. Default value: 0xFFFFFFFFFFFF"""
1796
+
1797
+ class SetDataAttr(RequestBodyStruct):
1798
+ position: int = field(XmpByte())
1799
+ """byte, specifies the start position of the ANY field. Default value: 0, Range:0-127"""
1800
+ value: Hex = field(XmpHex(size=6))
1801
+ """6 hex bytes, specifying the six bytes of the field. Default value: 0x000000000000"""
1802
+ mask: Hex = field(XmpHex(size=6))
1803
+ """6 hex bytes, specifying the six bytes of the field. Default value: 0xFFFFFFFFFFFF"""
1804
+
1805
+ def get(self) -> Token[GetDataAttr]:
1806
+ """Get the ANY field filter configuration.
1807
+
1808
+ :return: the ANY field filter configuration
1809
+ :rtype: PEF_ANYCONFIG.GetDataAttr
1810
+ """
1811
+
1812
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
1813
+
1814
+ def set(self, position: int, value: Hex, mask: Hex) -> Token[None]:
1815
+ """Set the ANY field filter configuration
1816
+
1817
+ :param position: specifies the start position of the ANY field. Default value: 0, Range:0-127
1818
+ :type position: int
1819
+ :param value: specifying the six bytes of the field. Default value: 0x000000000000
1820
+ :type value: str
1821
+ :param mask: specifying the six bytes of the field. Default value: 0xFFFFFFFFFFFF
1822
+ :type mask: str
1823
+ """
1824
+
1825
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], position=position, value=value, mask=mask))
1826
+
1827
+
1828
+ @register_command
1829
+ @dataclass
1830
+ class PEF_TPLDSETTINGS:
1831
+ """
1832
+ Defines if filtering on TPLD field in a packet is used for flow filtering. The
1833
+ TPLD filter allows filtering based on the Xena TPLD ID. The TPLD
1834
+ ID is meta data, which can be inserted into the Ethernet packets by Xena traffic
1835
+ generators. For each flow filter, can the filter be based on 16 TPLD ID values.
1836
+
1837
+ .. note::
1838
+
1839
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``.
1840
+
1841
+ """
1842
+
1843
+ code: typing.ClassVar[int] = 1730
1844
+ pushed: typing.ClassVar[bool] = False
1845
+
1846
+ _connection: 'interfaces.IConnection'
1847
+ _module: int
1848
+ _port: int
1849
+ _flow_xindex: int
1850
+ _filter_type: FilterType
1851
+
1852
+ class GetDataAttr(ResponseBodyStruct):
1853
+ action: InfoAction = field(XmpByte())
1854
+ """coded byte, specifies the action of TPLD information."""
1855
+
1856
+ class SetDataAttr(RequestBodyStruct):
1857
+ action: InfoAction = field(XmpByte())
1858
+ """coded byte, specifies the action of TPLD information."""
1859
+
1860
+ def get(self) -> Token[GetDataAttr]:
1861
+ """Get the settings of filtering on TPLD field in a packet.
1862
+
1863
+ :return: the settings of filtering on TPLD field in a packet.
1864
+ :rtype: PEF_TPLDSETTINGS.GetDataAttr
1865
+ """
1866
+
1867
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
1868
+
1869
+ def set(self, action: InfoAction) -> Token[None]:
1870
+ """Set the settings of filtering on TPLD field in a packet.
1871
+
1872
+ :param action: specifies the action of TPLD information.
1873
+ :type action: InfoAction
1874
+ """
1875
+
1876
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], action=action))
1877
+
1878
+
1879
+ @register_command
1880
+ @dataclass
1881
+ class PEF_TPLDCONFIG:
1882
+ """
1883
+ Defines the TPLD filter configuration. There are only 16 TPLD filter, thus the index values are from 0 to 15.
1884
+
1885
+ .. note::
1886
+
1887
+ For SET, the only allowed ``_filter_type`` is ``shadow-copy``.
1888
+
1889
+ """
1890
+
1891
+ code: typing.ClassVar[int] = 1731
1892
+ pushed: typing.ClassVar[bool] = False
1893
+
1894
+ _connection: 'interfaces.IConnection'
1895
+ _module: int
1896
+ _port: int
1897
+ _flow_xindex: int
1898
+ _filter_type: FilterType
1899
+ _test_payload_filter_index: int
1900
+
1901
+ class GetDataAttr(ResponseBodyStruct):
1902
+ use: OnOff = field(XmpByte())
1903
+ """coded byte, specifies the use of TPLD field information."""
1904
+ id: int = field(XmpInt())
1905
+ """int, specifies the TPLD ID. Range: 0-2015, Default value: 0"""
1906
+
1907
+ class SetDataAttr(RequestBodyStruct):
1908
+ use: OnOff = field(XmpByte())
1909
+ """coded byte, specifies the use of TPLD field information."""
1910
+ id: int = field(XmpInt())
1911
+ """int, specifies the TPLD ID. Range: 0-2015, Default value: 0"""
1912
+
1913
+ def get(self) -> Token[GetDataAttr]:
1914
+ """Get the TPLD filter configuration.
1915
+
1916
+ :return: the use of TPLD field information, and the TPLD ID. Range: 0-2015, Default value: 0
1917
+ :rtype: PEF_TPLDCONFIG.GetDataAttr
1918
+ """
1919
+
1920
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type, self._test_payload_filter_index]))
1921
+
1922
+ def set(self, use: OnOff, id: int) -> Token[None]:
1923
+ """Set the TPLD filter configuration.
1924
+
1925
+ :param use: specifies the use of TPLD field information
1926
+ :type use: OnOff
1927
+ :param id: specifies the TPLD ID. Range: 0-2015, Default value: 0
1928
+ :type id: int
1929
+ """
1930
+
1931
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type, self._test_payload_filter_index], use=use, id=id))
1932
+
1933
+ set_off = functools.partialmethod(set, OnOff.OFF)
1934
+ """The TPLD information is not used."""
1935
+
1936
+ set_on = functools.partialmethod(set, OnOff.ON)
1937
+ """The TPLD information is used."""
1938
+
1939
+
1940
+ @register_command
1941
+ @dataclass
1942
+ class PEF_ISSHADOWDIRTY:
1943
+ """
1944
+ Get shadow filter status (if shadow is in sync with working copy or not).
1945
+ """
1946
+
1947
+ code: typing.ClassVar[int] = 1734
1948
+ pushed: typing.ClassVar[bool] = False
1949
+
1950
+ _connection: 'interfaces.IConnection'
1951
+ _module: int
1952
+ _port: int
1953
+ _flow_xindex: int
1954
+
1955
+ class GetDataAttr(ResponseBodyStruct):
1956
+ is_in_sync: YesNo = field(XmpByte())
1957
+ """coded byte, if shadow is in sync with working copy or not."""
1958
+
1959
+ def get(self) -> Token[GetDataAttr]:
1960
+ """Get shadow filter status.
1961
+
1962
+ :return: if shadow is in sync with working copy or not.
1963
+ :rtype: PEF_ISSHADOWDIRTY.GetDataAttr
1964
+ """
1965
+
1966
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex]))
1967
+
1968
+
1969
+ @register_command
1970
+ @dataclass
1971
+ class PEF_CANCEL:
1972
+ """Undo updates to shadow filter settings, sets dirty false."""
1973
+
1974
+ code: typing.ClassVar[int] = 1735
1975
+ pushed: typing.ClassVar[bool] = False
1976
+
1977
+ _connection: 'interfaces.IConnection'
1978
+ _module: int
1979
+ _port: int
1980
+ _flow_xindex: int
1981
+
1982
+ class SetDataAttr(RequestBodyStruct):
1983
+ pass
1984
+
1985
+ def set(self) -> Token[None]:
1986
+ """Undo updates to shadow filter settings, sets dirty false.
1987
+ """
1988
+
1989
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex]))
1990
+
1991
+
1992
+ @register_command
1993
+ @dataclass
1994
+ class PEF_VALUE:
1995
+ """
1996
+ This command is valid only for ``Extended filter mode`` (check :class:`PEF_MODE`).
1997
+
1998
+ Defines the byte values that can be matched if selected by :class:`PEF_MASK`.
1999
+
2000
+ If ``<protocol_segment_index> = 0`` the maximum number of match value
2001
+ bytes that can be set is determined by the total length of the protocol segments
2002
+ specified with PEF_PROTOCOL.
2003
+
2004
+ E.g. if PEF_PROTOCOL is set to ETHERNET then only
2005
+ 12 bytes can be set. In order to set the full 128 bytes, either specify a
2006
+ detailed protocol segment list, or use the raw protocol segment type. This specifies 12 + 116 = 128 bytes.
2007
+
2008
+ If ``<protocol_segment_index> != 0`` only the bytes covered by that segment are manipulated,
2009
+ so if PEF_PROTOCOL is set to ``ETHERNET VLAN ETHERTYPE eCPRI`` then ``<protocol_segment_index> = 4`` selects the 8
2010
+ bytes of the eCPRI header starting at byte position (12 + 2 + 4) = 18.
2011
+
2012
+ For ``set`` command where fewer value bytes are provided than specified by the protocol segment, those unspecified bytes are set to zero.
2013
+
2014
+ The ``get`` command always returns the number of bytes specified by the protocol segment.
2015
+ """
2016
+
2017
+ code: typing.ClassVar[int] = 1777
2018
+ pushed: typing.ClassVar[bool] = False
2019
+
2020
+ _connection: 'interfaces.IConnection'
2021
+ _module: int
2022
+ _port: int
2023
+ _flow_xindex: int
2024
+ _filter_type: FilterType
2025
+ _protocol_segment_index: int
2026
+
2027
+ class GetDataAttr(ResponseBodyStruct):
2028
+ value: Hex = field(XmpHex())
2029
+ """list of hex bytes, the raw bytes comprising the packet header."""
2030
+
2031
+ class SetDataAttr(RequestBodyStruct):
2032
+ value: Hex = field(XmpHex())
2033
+ """list of hex bytes, the raw bytes comprising the packet header."""
2034
+
2035
+ def get(self) -> Token[GetDataAttr]:
2036
+ """Get the byte values that can be matched if selected by :class:`PEF_MASK`.
2037
+
2038
+ :return: the byte values that can be matched if selected by :class:`PEF_MASK`
2039
+ :rtype: PEF_VALUE.GetDataAttr
2040
+ """
2041
+
2042
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
2043
+
2044
+ def set(self, value: Hex) -> Token[None]:
2045
+ """Set the byte values that can be matched if selected by :class:`PEF_MASK`.
2046
+
2047
+ :param value: the raw bytes comprising the packet header
2048
+ :type value: Hex
2049
+ """
2050
+
2051
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], value=value))
2052
+
2053
+
2054
+ @register_command
2055
+ @dataclass
2056
+ class PEF_MASK:
2057
+ """
2058
+ This command is valid only for ``Extended filter mode`` (check :class:`PEF_MODE`).
2059
+
2060
+ Defines the mask byte values that select the values specified by :class:`PEF_VALUE`.
2061
+
2062
+ For a chosen ``<protocol_segment_index>`` the first byte in the value masks the
2063
+ first byte of the corresponding :class:`PEF_VALUE` and so on.
2064
+
2065
+ If ``<protocol_segment_index> = 0`` the maximum number of match value
2066
+ bytes that can be set is determined by the total length of the protocol segments
2067
+ specified with PEF_PROTOCOL`.
2068
+
2069
+ E.g. if PEF_PROTOCOL is set to ETHERNET then only
2070
+ 12 bytes can be set. In order to set the full 128 bytes, either specify a
2071
+ detailed protocol segment list, or use the raw protocol segment type. This specifies 12 + 116 = 128 bytes.
2072
+
2073
+ If ``<protocol_segment_index> != 0`` only the bytes covered by that segment are manipulated,
2074
+ so if PEF_PROTOCOL is set to ``ETHERNET VLAN ETHERTYPE eCPRI`` then ``<protocol_segment_index> = 4`` selects the 8
2075
+ bytes of the eCPRI header starting at byte position (12 + 2 + 4) = 18.
2076
+
2077
+ ``get/set`` semantics are similar to :class:`PEF_VALUE`.
2078
+ """
2079
+
2080
+ code: typing.ClassVar[int] = 1778
2081
+ pushed: typing.ClassVar[bool] = False
2082
+
2083
+ _connection: 'interfaces.IConnection'
2084
+ _module: int
2085
+ _port: int
2086
+ _flow_xindex: int
2087
+ _filter_type: FilterType
2088
+ _protocol_segment_index: int
2089
+
2090
+ class GetDataAttr(ResponseBodyStruct):
2091
+ masks: Hex = field(XmpHex())
2092
+
2093
+ class SetDataAttr(RequestBodyStruct):
2094
+ masks: Hex = field(XmpHex())
2095
+
2096
+ def get(self) -> Token[GetDataAttr]:
2097
+ """Get the mask byte values that select the values specified by :class:`PEF_VALUE`.
2098
+
2099
+ :return: the mask byte values that select the values specified by :class:`PEF_VALUE`.
2100
+ :rtype: PEF_MASK.GetDataAttr
2101
+ """
2102
+
2103
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
2104
+
2105
+ def set(self, masks: Hex) -> Token[None]:
2106
+ """Set the mask byte values that select the values specified by :class:`PEF_VALUE``.
2107
+
2108
+ :param masks: mask byte values
2109
+ :type masks: Hex
2110
+ """
2111
+
2112
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], masks=masks))
2113
+
2114
+
2115
+ @register_command
2116
+ @dataclass
2117
+ class PEF_PROTOCOL:
2118
+ """
2119
+ This command is valid only for ``Extended filter mode`` (check :class:`PEF_MODE`).
2120
+
2121
+ Defines the sequence of protocol segments that can be
2122
+ matched. The total length of the specified segments cannot exceed 128 bytes. If
2123
+ an existing sequence of segments is changed (using PEF_PROTOCOL) the underlying
2124
+ value and mask bytes remain unchanged, even though the semantics of those bytes
2125
+ may have changed. However, if the total length, in bytes, of the segments is
2126
+ reduced, then the excess bytes of value and mask are set to zero. I.e. to update
2127
+ an existing filter, you must first correct the list of segments (using
2128
+ PEF_PROTOCOL) and subsequently update the filtering value (using :class:`PEF_VALUE`) and filtering mask (:class:`PEF_MASK`).
2129
+ """
2130
+
2131
+ code: typing.ClassVar[int] = 1779
2132
+ pushed: typing.ClassVar[bool] = False
2133
+
2134
+ _connection: 'interfaces.IConnection'
2135
+ _module: int
2136
+ _port: int
2137
+ _flow_xindex: int
2138
+ _filter_type: FilterType
2139
+
2140
+ class GetDataAttr(ResponseBodyStruct):
2141
+ segment_list: typing.List[ProtocolOption] = field(XmpSequence(types_chunk=[XmpByte()]))
2142
+ """list of bytes, specifying the list of protocol segment types in the order they are expected in a frame. First segment type must be ETHERNET;
2143
+ the following can be chosen freely.
2144
+ """
2145
+
2146
+ class SetDataAttr(RequestBodyStruct):
2147
+ segment_list: typing.List[ProtocolOption] = field(XmpSequence(types_chunk=[XmpByte()]))
2148
+ """list of bytes, specifying the list of protocol segment types in the order they are expected in a frame. First segment type must be ETHERNET;
2149
+ the following can be chosen freely.
2150
+ """
2151
+
2152
+ def get(self) -> Token[GetDataAttr]:
2153
+ """Get the sequence of protocol segments that can be matched.
2154
+
2155
+ :return: the sequence of protocol segments that can be matched.
2156
+ :rtype: PEF_PROTOCOL.GetDataAttr
2157
+ """
2158
+
2159
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
2160
+
2161
+ def set(self, segment_list: typing.List[ProtocolOption]) -> Token[None]:
2162
+ """Set the sequence of protocol segments that can be matched.
2163
+
2164
+ :param segment_list: specifying the list of protocol segment types in the order they are expected in a frame.
2165
+ First segment type must be ``ETHERNET``; the following can be chosen freely.
2166
+ :type segment_list: typing.List[ProtocolOption]
2167
+ """
2168
+
2169
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], segment_list=segment_list))
2170
+
2171
+
2172
+ @register_command
2173
+ @dataclass
2174
+ class PEF_MODE:
2175
+ """Control the filter mode."""
2176
+
2177
+ code: typing.ClassVar[int] = 1780
2178
+ pushed: typing.ClassVar[bool] = False
2179
+
2180
+ _connection: 'interfaces.IConnection'
2181
+ _module: int
2182
+ _port: int
2183
+ _flow_xindex: int
2184
+ _filter_type: FilterType
2185
+
2186
+ class GetDataAttr(ResponseBodyStruct):
2187
+ mode: FilterMode = field(XmpByte())
2188
+ """integer, the mode of the filter."""
2189
+
2190
+ class SetDataAttr(RequestBodyStruct):
2191
+ mode: FilterMode = field(XmpByte())
2192
+ """integer, the mode of the filter."""
2193
+
2194
+ def get(self) -> Token[GetDataAttr]:
2195
+ """Get the filter mode.
2196
+
2197
+ :return: the filter mode
2198
+ :rtype: PEF_MODE.GetDataAttr
2199
+ """
2200
+
2201
+ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type]))
2202
+
2203
+ def set(self, mode: FilterMode) -> Token[None]:
2204
+ """Set the filter mode.
2205
+
2206
+ :param mode: the mode of the filter.
2207
+ :type sid: FlowMode
2208
+ """
2209
+
2210
+ return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._flow_xindex, self._filter_type], mode=mode))
2211
+
2212
+ set_basic = functools.partialmethod(set, FilterMode.BASIC)
2213
+ """Set the filter mode to Basic."""
2214
+
2215
+ set_extended = functools.partialmethod(set, FilterMode.EXTENDED)
2216
+ """Set the filter mode to Extended."""