VULN_CHECK_I913V6 7mjHddlZddlZddlZddlZddlZddlZej jeje jjjddl mZmZmZdZdZdZdZGddej*Zd Zed k(reyy) N) YnlFamilyNetlinkNlErrorz/usr/share/ynlz!../../../../Documentation/netlinkc|tjjtjjt}tjj|dt }tjj |st}tjj |std|d|S)N/zSchema directory  does not exist) ospathdirnameabspath__file__relative_schema_dirisdirsys_schema_dir Exception) script_dir schema_dirs ./usr/lib/python3.12/site-packages/pyynl/cli.pyrrs!:;JJ ! c3 9 ''c22rN)__name__ __module__ __qualname__r"rrrr!s3rrc@ d}d}tj||}|jd}|jddtd |jd d d |jddtd |jddt|jdd |jddt|j}|jdddt|jddddd t!|jd"d#d$t|jd%d |jd&d |jd'd(t d) |jd*d(t d+ |jd,d-t|jd.d/d0t j1|jd2d/d0t j1|jd3d/d0t j1|jd4d/d0t j1|jd5tj|jd6d |jd7d8d9d:d;t <|jfd=}jrXttj t#D].}|j%d>st'|j)d>0yj*rd?_i}j.rt1j2j.}j4rVt#d@j4d>}j,|j7t8rd?_j:d_n j<}tj>jA|stCdA|dBtE|j,j:jFC} jFr| jIdjJr| jMjJjNrI| jPjSD],\} } t'| dDdEjU| jVdF.jXrI| jZjSD],\} } t'| dDdEjU| jVdF. j\r/| j]j\|j^} || j`r$| jaj`|} || jbr\jbD cgc].} | d8t1j2| dGj^xsgf0}} | je|} || jJr*| jgjhHD] }|| yycc} w#tj$r }t'|tmdGYd}~yd}~wtn$rYytp$rYywxYw)INz YNL CLI utility - a general purpose netlink utility that uses YAML specs to drive protocol encoding and decoding. zn The --multi option can be repeated to include several do operations in the same netlink payload. ) descriptionepilogT)requiredz--familyfamilyzname of the netlink FAMILY)desttypehelpz--list-families store_truez5list all netlink families supported by YNL (has spec))actionr0z--specspecz#choose the family by SPEC file pathz--schemaschema)r.r/z --no-schema)r2z--json json_textz--dodo DO-OPERATION)r.metavarr/z--multimultiappend)r7 JSON_TEXT)r.nargsr2r8r/z--dumpdumpzDUMP-OPERATIONz --list-opsz --list-msgsz --durationdurationz+when subscribed, watch for DURATION secondsz--sleepzalias for durationz --subscribentfz --replaceflags append_const)r.r2constz--exclz--createz--appendz--process-unknownz --output-jsonz--dbg-small-recvristore?)r"rCr2r=r/cjr%ttj|tyt j j |y)N)cls) output_jsonprintr dumpsrpprint PrettyPrinter)msgargss routputzmain..output]s6    $**Sj1 2  " ) )# .rz.yamlrz Spec file r) recv_sizez [z, ])r?)9argparseArgumentParseradd_mutually_exclusive_group add_argumentstrintr NLM_F_REPLACE NLM_F_EXCL NLM_F_CREATE NLM_F_APPENDBooleanOptionalAction parse_args list_familiessortedr listdirrendswithrI removesuffix no_schemar4r5r loadsr- startswithrprocess_unknownr3r isfilerrdbg_small_recv set_recv_dbgr@ ntf_subscribelist_opsopsitemsjoinmodes list_msgsmsgsr6rAr>r9do_multipoll_ntfr?rexitKeyboardInterruptBrokenPipeError)r*r+parser spec_groupgrouprOfilenameattrsr3ynlop_nameopreplyitemrnrMerNs @rmainr*sWKF  $ $,24F44d4CJJXC!=?-l!XZH6!FH  <  l; {=  / / 1E vD.sK ywa<3H xf6FSQ |L9 }\:  :CJL  13  E<  '.%335 w~%002  %224  %224 +H4R4RS  = *AT&c=    D/  rzz(*56H  )h++G457  ~~ E ~~ 4>>* {{*Qt{{m51 ;; 4??>#BDK    '#'D yy 77>>$ *TF/:;; D$++t';';"11 3C   xx $((# }}77==?KGR '4288!4c :+ ~~88>>+KGR '4288!4c :, 77FF477E4::6E 5M 99HHTYY.E 5M ::QUQ[Q[]Q[T!Wdjja14::3CDQ[C]LL%E 5M 88||T]]|;s <  ^  a Q      s8BW 3W AW W X)X XXX__main__)rTr r pathlibrKsysr r;Pathr resolveparentas_posixlibrrrrrrrr!rrr%r(rrrs    X&..077@@BC++73!!3u p zFr