| 1 | /* |
| 2 | * Copyright 2009 Red Hat Inc., Durham, North Carolina. |
| 3 | * All Rights Reserved. |
| 4 | * |
| 5 | * This library is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU Lesser General Public |
| 7 | * License as published by the Free Software Foundation; either |
| 8 | * version 2.1 of the License, or (at your option) any later version. |
| 9 | * |
| 10 | * This library is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * Lesser General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU Lesser General Public |
| 16 | * License along with this library; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 | * |
| 19 | * Authors: |
| 20 | * "Daniel Kopecek" <[email protected]> |
| 21 | */ |
| 22 | |
| 23 | #pragma once |
| 24 | #ifndef _SEAP_COMMAND_H |
| 25 | #define _SEAP_COMMAND_Hcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:25:9`! |
| 26 | |
| 27 | #include <stdint.h> |
| 28 | #include <stddef.h> |
| 29 | #include <pthread.h> |
| 30 | |
| 31 | #include "_sexp-types.h"cxx . . $ `<file>/src/OVAL/probes/SEAP/_sexp-types.h`/ |
| 32 | #include "_seap-types.h"cxx . . $ `<file>/src/OVAL/probes/SEAP/_seap-types.h`/ |
| 33 | #include "../../../common/util.h"cxx . . $ `<file>/src/common/util.h`/ |
| 34 | |
| 35 | |
| 36 | #define SEAP_CMDCLASS_INTcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:36:9`! 1 |
| 37 | #define SEAP_CMDCLASS_USRcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:37:9`! 2 |
| 38 | |
| 39 | #define SEAP_CMDFLAG_SYNCcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:39:9`! 0x01 |
| 40 | #define SEAP_CMDFLAG_ASYNCcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:40:9`! 0x00 |
| 41 | #define SEAP_CMDFLAG_REPLYcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:41:9`! 0x02 |
| 42 | #define SEAP_CMDFLAG_MASKcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:42:9`! 0xff |
| 43 | |
| 44 | #define SEAP_CMDTYPE_SYNCcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:44:9`! 1 |
| 45 | #define SEAP_CMDTYPE_ASYNCcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:45:9`! 2 |
| 46 | |
| 47 | #define SEAP_CMDREG_LOCALcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:47:9`! 0x00000001 |
| 48 | #define SEAP_CMDREG_USEARGcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:48:9`! 0x00000002 |
| 49 | #define SEAP_CMDREG_THREADcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:49:9`! 0x00000004 |
| 50 | |
| 51 | #define SEAP_EXEC_LOCALcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:51:9`! 0x01 |
| 52 | #define SEAP_EXEC_LONLYcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:52:9`! 0x02 |
| 53 | #define SEAP_EXEC_GFIRSTcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:53:9`! 0x04 |
| 54 | #define SEAP_EXEC_THREADcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:54:9`! 0x08 |
| 55 | #define SEAP_EXEC_WQUEUEcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:55:9`! 0x10 |
| 56 | #define SEAP_EXEC_RECVcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:56:9`! 0x20 |
| 57 | |
| 58 | |
| 59 | struct SEAP_cmdcxx . . $ SEAP_cmd# { |
| 60 | SEAP_cmdid_tcxx . . $ SEAP_cmdid_t# idcxx . . $ SEAP_cmd#id.; |
| 61 | SEAP_cmdid_tcxx . . $ SEAP_cmdid_t# ridcxx . . $ SEAP_cmd#rid.; |
| 62 | uint8_tcxx . . $ uint8_t# flagscxx . . $ SEAP_cmd#flags.; |
| 63 | SEAP_cmdclass_tcxx . . $ SEAP_cmdclass_t# classcxx . . $ SEAP_cmd#class.; |
| 64 | SEAP_cmdcode_tcxx . . $ SEAP_cmdcode_t# codecxx . . $ SEAP_cmd#code.; |
| 65 | SEXP_tcxx . . $ SEXP_t# *argscxx . . $ SEAP_cmd#args.; |
| 66 | }; |
| 67 | typedef struct SEAP_cmdcxx . . $ SEAP_cmd# SEAP_cmd_tcxx . . $ SEAP_cmd_t#; |
| 68 | |
| 69 | struct SEAP_synchelpercxx . . $ SEAP_synchelper# { |
| 70 | SEXP_tcxx . . $ SEXP_t# *argscxx . . $ SEAP_synchelper#args.; |
| 71 | pthread_cond_tcxx . . $ pthread_cond_t# condcxx . . $ SEAP_synchelper#cond.; |
| 72 | pthread_mutex_tcxx . . $ pthread_mutex_t# mtxcxx . . $ SEAP_synchelper#mtx.; |
| 73 | int signaledcxx . . $ SEAP_synchelper#signaled.; |
| 74 | }; |
| 75 | |
| 76 | #define SEAP_CMDTBL_LARGEcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:76:9`! 0x01 |
| 77 | #define SEAP_CMDTBL_LARGE_TRESHOLDcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:77:9`! 32 |
| 78 | |
| 79 | typedef structcxx . . $ $anonymous_type_a585f4dc5f186eef_0# { |
| 80 | SEAP_cmdcode_tcxx . . $ SEAP_cmdcode_t# codecxx . . $ $anonymous_type_a585f4dc5f186eef_0#code.; |
| 81 | SEAP_cmdfn_tcxx . . $ SEAP_cmdfn_t# funccxx . . $ $anonymous_type_a585f4dc5f186eef_0#func.; |
| 82 | void *argcxx . . $ $anonymous_type_a585f4dc5f186eef_0#arg.; |
| 83 | } SEAP_cmdrec_tcxx . . $ SEAP_cmdrec_t#; |
| 84 | |
| 85 | SEAP_cmdtbl_tcxx . . $ SEAP_cmdtbl_t# *SEAP_cmdtbl_newcxx . . $ SEAP_cmdtbl_new(d478133e2e207a3d). (void); |
| 86 | void SEAP_cmdtbl_freecxx . . $ SEAP_cmdtbl_free(52f2919cbb21a2a). (SEAP_cmdtbl_tcxx . . $ SEAP_cmdtbl_t# *t); |
| 87 | |
| 88 | int SEAP_cmdtbl_setsizecxx . . $ SEAP_cmdtbl_setsize(9a74fad16344486a). (SEAP_cmdtbl_tcxx . . $ SEAP_cmdtbl_t# *t, size_tcxx . . $ size_t# maxsz); |
| 89 | int SEAP_cmdtbl_setflcxx . . $ SEAP_cmdtbl_setfl(da4bbfea9cf010c). (SEAP_cmdtbl_tcxx . . $ SEAP_cmdtbl_t# *t, uint8_tcxx . . $ uint8_t# f); |
| 90 | int SEAP_cmdtbl_unsetflcxx . . $ SEAP_cmdtbl_unsetfl(da4bbfea9cf010c). (SEAP_cmdtbl_tcxx . . $ SEAP_cmdtbl_t# *t, uint8_tcxx . . $ uint8_t# f); |
| 91 | |
| 92 | /* Generic operations */ |
| 93 | int SEAP_cmdtbl_addcxx . . $ SEAP_cmdtbl_add(91a94bcfad148675). (SEAP_cmdtbl_tcxx . . $ SEAP_cmdtbl_t# *t, SEAP_cmdrec_tcxx . . $ SEAP_cmdrec_t# *r); |
| 94 | int SEAP_cmdtbl_inscxx . . $ SEAP_cmdtbl_ins(91a94bcfad148675). (SEAP_cmdtbl_tcxx . . $ SEAP_cmdtbl_t# *t, SEAP_cmdrec_tcxx . . $ SEAP_cmdrec_t# *r); |
| 95 | int SEAP_cmdtbl_delcxx . . $ SEAP_cmdtbl_del(91a94bcfad148675). (SEAP_cmdtbl_tcxx . . $ SEAP_cmdtbl_t# *t, SEAP_cmdrec_tcxx . . $ SEAP_cmdrec_t# *r); |
| 96 | SEAP_cmdrec_tcxx . . $ SEAP_cmdrec_t# *SEAP_cmdtbl_getcxx . . $ SEAP_cmdtbl_get(e4b5e91c7ff4ee30). (SEAP_cmdtbl_tcxx . . $ SEAP_cmdtbl_t# *t, SEAP_cmdcode_tcxx . . $ SEAP_cmdcode_t# c); |
| 97 | int SEAP_cmdtbl_cmpcxx . . $ SEAP_cmdtbl_cmp(8997b9623a79863c). (SEAP_cmdrec_tcxx . . $ SEAP_cmdrec_t# *a, SEAP_cmdrec_tcxx . . $ SEAP_cmdrec_t# *b); |
| 98 | |
| 99 | #define SEAP_CMDTBL_ECOLLcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:99:9`! 1 |
| 100 | |
| 101 | SEAP_cmdrec_tcxx . . $ SEAP_cmdrec_t# *SEAP_cmdrec_newcxx . . $ SEAP_cmdrec_new(6a77a790710a8e8e). (void); |
| 102 | void SEAP_cmdrec_freecxx . . $ SEAP_cmdrec_free(5f039f4040bea21b). (SEAP_cmdrec_tcxx . . $ SEAP_cmdrec_t# *r); |
| 103 | |
| 104 | #define SEAP_CFLG_THREADcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:104:9`! 0x01 |
| 105 | #define SEAP_CFLG_WATCHcxx . . $ `src/OVAL/probes/SEAP/_seap-command.h:105:9`! 0x02 |
| 106 | |
| 107 | /* Backends */ |
| 108 | #include "seap-command-backendT.h"cxx . . $ `<file>/src/OVAL/probes/SEAP/seap-command-backendT.h`/ |
| 109 | |
| 110 | typedef structcxx . . $ $anonymous_type_a585f4dc5f186eef_1# { |
| 111 | SEAP_CTX_tcxx . . $ SEAP_CTX_t# *ctxcxx . . $ $anonymous_type_a585f4dc5f186eef_1#ctx.; |
| 112 | int sdcxx . . $ $anonymous_type_a585f4dc5f186eef_1#sd.; |
| 113 | SEAP_cmd_tcxx . . $ SEAP_cmd_t# *cmdcxx . . $ $anonymous_type_a585f4dc5f186eef_1#cmd.; |
| 114 | } SEAP_cmdjob_tcxx . . $ SEAP_cmdjob_t#; |
| 115 | |
| 116 | SEAP_cmdjob_tcxx . . $ SEAP_cmdjob_t# *SEAP_cmdjob_newcxx . . $ SEAP_cmdjob_new(20f750e0dec7af40). (void); |
| 117 | void SEAP_cmdjob_freecxx . . $ SEAP_cmdjob_free(c3ce16d0b4ef215). (SEAP_cmdjob_tcxx . . $ SEAP_cmdjob_t# *j); |
| 118 | |
| 119 | SEXP_tcxx . . $ SEXP_t# *SEAP_cmd2sexpcxx . . $ SEAP_cmd2sexp(41192abad4b730e3). (SEAP_cmd_tcxx . . $ SEAP_cmd_t# *cmd); |
| 120 | |
| 121 | int SEAP_cmd_registercxx . . $ SEAP_cmd_register(8e6e8c3c92801ad2).(SEAP_CTX_tcxx . . $ SEAP_CTX_t# *ctx, SEAP_cmdcode_tcxx . . $ SEAP_cmdcode_t# code, uint32_tcxx . . $ uint32_t# flags, SEAP_cmdfn_tcxx . . $ SEAP_cmdfn_t# func, ...); |
| 122 | |
| 123 | SEXP_tcxx . . $ SEXP_t# *SEAP_cmd_execcxx . . $ SEAP_cmd_exec(68703026cc6e447d).(SEAP_CTX_tcxx . . $ SEAP_CTX_t# *ctx, |
| 124 | int sd, |
| 125 | uint32_tcxx . . $ uint32_t# flags, |
| 126 | SEAP_cmdcode_tcxx . . $ SEAP_cmdcode_t# code, |
| 127 | SEXP_tcxx . . $ SEXP_t# *args, |
| 128 | SEAP_cmdtype_tcxx . . $ SEAP_cmdtype_t# type, |
| 129 | SEAP_cmdfn_tcxx . . $ SEAP_cmdfn_t# func, |
| 130 | void *funcarg); |
| 131 | |
| 132 | #endif /* _SEAP_COMMAND_H */ |