Skip to content

Commit 4e2b87d

Browse files
committed
Remove public header file seap-command.h
The symbols and definitions are moved in _seap-command.h, which is private. The functions are dropped from public API.
1 parent 720dc90 commit 4e2b87d

File tree

5 files changed

+30
-76
lines changed

5 files changed

+30
-76
lines changed

src/OVAL/probes/SEAP/_seap-command.h

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,16 @@
2828
#include <stddef.h>
2929
#include <pthread.h>
3030

31-
#include "public/seap-command.h"
3231
#include "_sexp-types.h"
32+
#include "public/seap-types.h"
3333
#include "../../../common/util.h"
3434

3535

3636
typedef uint8_t SEAP_cmdclass_t;
37+
typedef uint16_t SEAP_cmdcode_t;
38+
typedef uint16_t SEAP_cmdid_t;
39+
typedef uint8_t SEAP_cmdtype_t;
40+
typedef SEXP_t * (*SEAP_cmdfn_t) (SEXP_t *, void *);
3741

3842
#define SEAP_CMDCLASS_INT 1
3943
#define SEAP_CMDCLASS_USR 2
@@ -43,6 +47,21 @@ typedef uint8_t SEAP_cmdclass_t;
4347
#define SEAP_CMDFLAG_REPLY 0x02
4448
#define SEAP_CMDFLAG_MASK 0xff
4549

50+
#define SEAP_CMDTYPE_SYNC 1
51+
#define SEAP_CMDTYPE_ASYNC 2
52+
53+
#define SEAP_CMDREG_LOCAL 0x00000001
54+
#define SEAP_CMDREG_USEARG 0x00000002
55+
#define SEAP_CMDREG_THREAD 0x00000004
56+
57+
#define SEAP_EXEC_LOCAL 0x01
58+
#define SEAP_EXEC_LONLY 0x02
59+
#define SEAP_EXEC_GFIRST 0x04
60+
#define SEAP_EXEC_THREAD 0x08
61+
#define SEAP_EXEC_WQUEUE 0x10
62+
#define SEAP_EXEC_RECV 0x20
63+
64+
4665
struct SEAP_cmd {
4766
SEAP_cmdid_t id;
4867
SEAP_cmdid_t rid;
@@ -115,5 +134,15 @@ void SEAP_cmdjob_free (SEAP_cmdjob_t *j);
115134

116135
SEXP_t *SEAP_cmd2sexp (SEAP_cmd_t *cmd);
117136

137+
int SEAP_cmd_register(SEAP_CTX_t *ctx, SEAP_cmdcode_t code, uint32_t flags, SEAP_cmdfn_t func, ...);
138+
139+
SEXP_t *SEAP_cmd_exec(SEAP_CTX_t *ctx,
140+
int sd,
141+
uint32_t flags,
142+
SEAP_cmdcode_t code,
143+
SEXP_t *args,
144+
SEAP_cmdtype_t type,
145+
SEAP_cmdfn_t func,
146+
void *funcarg);
118147

119148
#endif /* _SEAP_COMMAND_H */

src/OVAL/probes/SEAP/public/seap-command.h

Lines changed: 0 additions & 72 deletions
This file was deleted.

src/OVAL/probes/SEAP/public/seap.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ extern "C" {
3636
#include <errno.h>
3737
#include <sexp.h>
3838
#include <seap-types.h>
39-
#include <seap-command.h>
4039
#include <seap-error.h>
4140
#include "oscap_export.h"
4241
#include "sch_queue.h"

src/OVAL/probes/SEAP/seap-descriptor.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
#include "_seap-packetq.h"
3535
#include "_sexp-output.h"
3636
#include "_seap-command.h"
37-
#include "public/seap-command.h"
3837
#include "public/seap-error.h"
3938
#include "../../../common/util.h"
4039

src/OVAL/probes/SEAP/seap-packet.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
#include "_seap-packet.h"
3535
#include "_seap-types.h"
3636
#include "seap-descriptor.h"
37-
#include "public/seap-command.h"
3837
#include "public/seap-error.h"
3938
#include "sch_queue.h"
4039
#include "debug_priv.h"

0 commit comments

Comments
 (0)