@@ -601,109 +601,134 @@ impl ExtractPlugin for KrsiPlugin {
601601 const EVENT_TYPES : & ' static [ EventType ] = & [ EventType :: ASYNCEVENT_E ] ;
602602 const EVENT_SOURCES : & ' static [ & ' static str ] = & [ "syscall" ] ;
603603 type ExtractContext = Option < KrsiEvent > ;
604- #[ rustfmt:: skip]
605604 const EXTRACT_FIELDS : & ' static [ ExtractFieldInfo < Self > ] = & [
606605 field ( "krsi.name" , & Self :: extract_name) . with_description (
607- "Availability: `krsi_open`, `krsi_connect`.
608- Per-event descriptions:
609- - `krsi_open`: full path to file
610- - `krsi_connect`: connection display name (e.g. `127.0.0.1:54321->10.0.0.1:8000`)" ) ,
606+ "Availability: `krsi_open`, `krsi_connect`.
607+ Per-event descriptions:
608+ - `krsi_open`: full path to file
609+ - `krsi_connect`: connection display name (e.g. `127.0.0.1:54321->10.0.0.1:8000`)" ,
610+ ) ,
611611 field ( "krsi.fd" , & Self :: extract_fd) . with_description (
612- "Availability: `krsi_open`, `krsi_socket`, `krsi_connect`.
613- Description: fd number (if available)" ) ,
612+ "Availability: `krsi_open`, `krsi_socket`, `krsi_connect`.
613+ Description: fd number (if available)" ,
614+ ) ,
614615 field ( "krsi.file_index" , & Self :: extract_file_index) . with_description (
615- "Availability: `krsi_open`, `krsi_socket`, `krsi_connect`.
616- Description: file index number (if available)" ) ,
616+ "Availability: `krsi_open`, `krsi_socket`, `krsi_connect`.
617+ Description: file index number (if available)" ,
618+ ) ,
617619 field ( "krsi.flags" , & Self :: extract_flags) . with_description (
618- "Availability: `krsi_open`, `krsi_linkat`, `krsi_unlinkat`.
619- Per-event descriptions:
620- - `krsi_open`: open* flags, equivalent to open* syscall family flags
621- - `krsi_linkat`: linkat flags
622- - `krsi_unlinkat`: unlinkat flags" ) ,
620+ "Availability: `krsi_open`, `krsi_linkat`, `krsi_unlinkat`.
621+ Per-event descriptions:
622+ - `krsi_open`: open* flags, equivalent to open* syscall family flags
623+ - `krsi_linkat`: linkat flags
624+ - `krsi_unlinkat`: unlinkat flags" ,
625+ ) ,
623626 field ( "krsi.mode" , & Self :: extract_mode) . with_description (
624- "Availability: `krsi_open`, `krsi_mkdirat`.
625- Per-event descriptions:
626- - `krsi_open`: open file mode
627- - `krsi_mkdirat`: mkdirat mode, indicating permission to use" ) ,
627+ "Availability: `krsi_open`, `krsi_mkdirat`.
628+ Per-event descriptions:
629+ - `krsi_open`: open file mode
630+ - `krsi_mkdirat`: mkdirat mode, indicating permission to use" ,
631+ ) ,
628632 field ( "krsi.dev" , & Self :: extract_dev) . with_description (
629- "Availability: `krsi_open`.
630- Per-event descriptions:
631- - `krsi_open`: file device number" ) ,
633+ "Availability: `krsi_open`.
634+ Per-event descriptions:
635+ - `krsi_open`: file device number" ,
636+ ) ,
632637 field ( "krsi.ino" , & Self :: extract_ino) . with_description (
633- "Availability: `krsi_open`.
634- Per-event descriptions:
635- - `krsi_open`: file inode number" ) ,
638+ "Availability: `krsi_open`.
639+ Per-event descriptions:
640+ - `krsi_open`: file inode number" ,
641+ ) ,
636642 field ( "krsi.domain" , & Self :: extract_domain) . with_description (
637- "Availability: `krsi_socket`.
638- Per-event descriptions:
639- - `krsi_socket`: socket domain" ) ,
643+ "Availability: `krsi_socket`.
644+ Per-event descriptions:
645+ - `krsi_socket`: socket domain" ,
646+ ) ,
640647 field ( "krsi.type" , & Self :: extract_type) . with_description (
641- "Availability: `krsi_socket`.
642- Per-event descriptions:
643- - `krsi_socket`: socket type" ) ,
648+ "Availability: `krsi_socket`.
649+ Per-event descriptions:
650+ - `krsi_socket`: socket type" ,
651+ ) ,
644652 field ( "krsi.protocol" , & Self :: extract_protocol) . with_description (
645- "Availability: `krsi_socket`.
646- Per-event descriptions:
647- - `krsi_socket`: socket protocol" ) ,
653+ "Availability: `krsi_socket`.
654+ Per-event descriptions:
655+ - `krsi_socket`: socket protocol" ,
656+ ) ,
648657 field ( "krsi.iou_ret" , & Self :: extract_iou_ret) . with_description (
649- "Availability: `krsi_open`, `krsi_socket`, `krsi_connect`, `krsi_symlinkat`, `krsi_linkat`, \
650- `krsi_unlinkat`, `krsi_mkdirat`.
651- Description: io_uring internal return value (if available)" ) ,
658+ "Availability: `krsi_open`, `krsi_socket`, `krsi_connect`, `krsi_symlinkat`, \
659+ `krsi_linkat`, `krsi_unlinkat`, `krsi_mkdirat`.
660+ Description: io_uring internal return value (if available)" ,
661+ ) ,
652662 field ( "krsi.res" , & Self :: extract_res) . with_description (
653- "Availability: `krsi_connect`, `krsi_symlinkat`, `krsi_linkat`, `krsi_unlinkat`, `krsi_mkdirat`.
654- Description: `operation return value (if available)" ) ,
663+ "Availability: `krsi_connect`, `krsi_symlinkat`, `krsi_linkat`, `krsi_unlinkat`, \
664+ `krsi_mkdirat`.
665+ Description: `operation return value (if available)" ,
666+ ) ,
655667 field ( "krsi.target" , & Self :: extract_target) . with_description (
656- "Availability: `krsi_symlinkat`.
657- Per-event descriptions:
658- - `krsi_symlinkat`: symbolic link target path" ) ,
668+ "Availability: `krsi_symlinkat`.
669+ Per-event descriptions:
670+ - `krsi_symlinkat`: symbolic link target path" ,
671+ ) ,
659672 field ( "krsi.linkdirfd" , & Self :: extract_linkdirfd) . with_description (
660- "Availability: `krsi_symlinkat`.
661- Per-event descriptions:
662- - `krsi_symlinkat`: symbolic link dir fd" ) ,
673+ "Availability: `krsi_symlinkat`.
674+ Per-event descriptions:
675+ - `krsi_symlinkat`: symbolic link dir fd" ,
676+ ) ,
663677 field ( "krsi.linkpath" , & Self :: extract_linkpath) . with_description (
664- "Availability: `krsi_symlinkat`.
665- Per-event descriptions:
666- - `krsi_symlinkat`: symbolic link path" ) ,
678+ "Availability: `krsi_symlinkat`.
679+ Per-event descriptions:
680+ - `krsi_symlinkat`: symbolic link path" ,
681+ ) ,
667682 field ( "krsi.olddirfd" , & Self :: extract_olddirfd) . with_description (
668- "Availability: `krsi_linkat`.
669- Per-event descriptions:
670- - `krsi_linkat`: dir fd for the target path" ) ,
683+ "Availability: `krsi_linkat`.
684+ Per-event descriptions:
685+ - `krsi_linkat`: dir fd for the target path" ,
686+ ) ,
671687 field ( "krsi.newdirfd" , & Self :: extract_newdirfd) . with_description (
672- "Availability: `krsi_linkat`.
673- Per-event descriptions:
674- - `krsi_linkat`: dir fd for the link path" ) ,
688+ "Availability: `krsi_linkat`.
689+ Per-event descriptions:
690+ - `krsi_linkat`: dir fd for the link path" ,
691+ ) ,
675692 field ( "krsi.dirfd" , & Self :: extract_dirfd) . with_description (
676- "Availability: `krsi_unlinkat`, `krsi_mkdirat`.
677- Description: dir fd of the path" ) ,
693+ "Availability: `krsi_unlinkat`, `krsi_mkdirat`.
694+ Description: dir fd of the path" ,
695+ ) ,
678696 field ( "krsi.path" , & Self :: extract_path) . with_description (
679- "Availability: `krsi_unlinkat`, `krsi_mkdirat`.
680- Per-event descriptions:
681- - `krsi_unlinkat`: path to be unlinked
682- - `krsi_mkdirat`: path to the directory to be created" ) ,
697+ "Availability: `krsi_unlinkat`, `krsi_mkdirat`.
698+ Per-event descriptions:
699+ - `krsi_unlinkat`: path to be unlinked
700+ - `krsi_mkdirat`: path to the directory to be created" ,
701+ ) ,
683702 field ( "krsi.oldpath" , & Self :: extract_oldpath) . with_description (
684- "Availability: `krsi_linkat`.
685- Per-event descriptions:
686- - `krsi_linkat`: target path" ) ,
703+ "Availability: `krsi_linkat`.
704+ Per-event descriptions:
705+ - `krsi_linkat`: target path" ,
706+ ) ,
687707 field ( "krsi.newpath" , & Self :: extract_newpath) . with_description (
688- "Availability: `krsi_linkat`.
689- Per-event descriptions:
690- - `krsi_linkat`: link path" ) ,
708+ "Availability: `krsi_linkat`.
709+ Per-event descriptions:
710+ - `krsi_linkat`: link path" ,
711+ ) ,
691712 field ( "krsi.cip" , & Self :: extract_client_addr) . with_description (
692- "Availability: `krsi_connect`.
693- Per-event descriptions:
694- - `krsi_connect`: client IP address" ) ,
713+ "Availability: `krsi_connect`.
714+ Per-event descriptions:
715+ - `krsi_connect`: client IP address" ,
716+ ) ,
695717 field ( "krsi.sip" , & Self :: extract_server_addr) . with_description (
696- "Availability: `krsi_connect`.
697- Per-event descriptions:
698- - `krsi_connect`: server IP address" ) ,
718+ "Availability: `krsi_connect`.
719+ Per-event descriptions:
720+ - `krsi_connect`: server IP address" ,
721+ ) ,
699722 field ( "krsi.cport" , & Self :: extract_client_port) . with_description (
700- "Availability: `krsi_connect`.
701- Per-event descriptions:
702- - `krsi_connect`: client port" ) ,
723+ "Availability: `krsi_connect`.
724+ Per-event descriptions:
725+ - `krsi_connect`: client port" ,
726+ ) ,
703727 field ( "krsi.sport" , & Self :: extract_server_port) . with_description (
704- "Availability: `krsi_connect`.
705- Per-event descriptions:
706- - `krsi_connect`: server port" ) ,
728+ "Availability: `krsi_connect`.
729+ Per-event descriptions:
730+ - `krsi_connect`: server port" ,
731+ ) ,
707732 ] ;
708733}
709734
0 commit comments