Skip to content

Commit 92aab09

Browse files
committed
Drop public header seap.h and move the functions to a private header
Those functions are OpenSCAP internal implementation details and therefore they should not be exposed in the public API.
1 parent db85217 commit 92aab09

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+85
-127
lines changed

src/OVAL/oval_probe_ext.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include <config.h>
2424
#endif
2525

26-
#include <seap.h>
26+
#include "_seap.h"
2727
#include <stdarg.h>
2828
#include <string.h>
2929
#include <errno.h>

src/OVAL/oval_probe_ext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#ifndef OVAL_PROBE_EXT_H
2323
#define OVAL_PROBE_EXT_H
2424

25-
#include <seap.h>
25+
#include "_seap.h"
2626
#include <pthread.h>
2727
#include <stdbool.h>
2828
#include "oval_probe_impl.h"

src/OVAL/oval_sexp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#include <inttypes.h>
4040
#include <stdlib.h>
4141
#include <string.h>
42-
#include <seap.h>
42+
#include "_seap.h"
4343
#include <assert.h>
4444

4545
#include "oval_probe_impl.h"

src/OVAL/oval_sexp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#ifndef OVAL_SEXP_H
3535
#define OVAL_SEXP_H
3636

37-
#include <seap.h>
37+
#include "_seap.h"
3838
#include "../common/util.h"
3939
#include "oval_definitions_impl.h"
4040

src/OVAL/probes/SEAP/_seap.h

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,48 @@
2424
#ifndef _SEAP_H
2525
#define _SEAP_H
2626

27-
#include "public/seap.h"
27+
#include "_seap-message.h"
28+
#include "sch_queue.h"
2829
#include "../../../common/util.h"
2930

31+
#ifndef EOPNOTSUPP
32+
# define EOPNOTSUPP 1001
33+
#endif
34+
35+
#ifndef ECANCELED
36+
# define ECANCELED 1002
37+
#endif
38+
39+
SEAP_CTX_t *SEAP_CTX_new(void);
40+
void SEAP_CTX_init(SEAP_CTX_t *ctx);
41+
void SEAP_CTX_free(SEAP_CTX_t *ctx);
42+
43+
int SEAP_connect(SEAP_CTX_t *ctx);
44+
int SEAP_listen(SEAP_CTX_t *ctx, int sd, uint32_t maxcli);
45+
int SEAP_accept(SEAP_CTX_t *ctx, int sd);
46+
47+
int SEAP_open(SEAP_CTX_t *ctx, const char *path, uint32_t flags);
48+
SEXP_t *SEAP_read(SEAP_CTX_t *ctx, int sd);
49+
int SEAP_write(SEAP_CTX_t *ctx, int sd, SEXP_t *sexp);
50+
int SEAP_close(SEAP_CTX_t *ctx, int sd);
51+
52+
int SEAP_openfd(SEAP_CTX_t *ctx, int fd, uint32_t flags);
53+
int SEAP_openfd2(SEAP_CTX_t *ctx, int ifd, int ofd, uint32_t flags);
54+
int SEAP_add_probe(SEAP_CTX_t *ctx, sch_queuedata_t *data);
55+
56+
int SEAP_recvsexp(SEAP_CTX_t *ctx, int sd, SEXP_t **sexp);
57+
int SEAP_recvmsg(SEAP_CTX_t *ctx, int sd, SEAP_msg_t **seap_msg);
58+
59+
int SEAP_sendsexp(SEAP_CTX_t *ctx, int sd, SEXP_t *sexp);
60+
int SEAP_sendmsg(SEAP_CTX_t *ctx, int sd, SEAP_msg_t *seap_msg);
61+
62+
int SEAP_reply(SEAP_CTX_t *ctx, int sd, SEAP_msg_t *rep_msg, SEAP_msg_t *req_msg);
63+
64+
int SEAP_senderr(SEAP_CTX_t *ctx, int sd, SEAP_err_t *err);
65+
int SEAP_recverr(SEAP_CTX_t *ctx, int sd, SEAP_err_t **err);
66+
int SEAP_recverr_byid(SEAP_CTX_t *ctx, int sd, SEAP_err_t **err, SEAP_msgid_t id);
67+
68+
int SEAP_replyerr(SEAP_CTX_t *ctx, int sd, SEAP_msg_t *rep_msg, uint32_t e);
3069

3170
int __SEAP_recvmsg_process_cmd (SEAP_CTX_t *ctx, int sd, SEAP_cmd_t *cmd);
3271

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

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

src/OVAL/probes/SEAP/seap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include <ctype.h>
3131
#include <pthread.h>
3232
#include <errno.h>
33-
#include "public/seap.h"
33+
#include "_seap.h"
3434
#include "generic/common.h"
3535
#include "_sexp-types.h"
3636
#include "_seap-types.h"

src/OVAL/probes/independent/environmentvariable58_probe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
#include <sys/types.h>
5252
#include <dirent.h>
5353

54-
#include "seap.h"
54+
#include "_seap.h"
5555
#include "probe-api.h"
5656
#include "probe/entcmp.h"
5757
#include "common/debug_priv.h"

src/OVAL/probes/independent/environmentvariable_probe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
#include <stdio.h>
4646
#include <errno.h>
4747

48-
#include "seap.h"
48+
#include "_seap.h"
4949
#include "probe-api.h"
5050
#include "probe/entcmp.h"
5151
#include "environmentvariable_probe.h"

src/OVAL/probes/independent/family_probe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
#include <config.h>
4949
#endif
5050

51-
#include <seap.h>
51+
#include "_seap.h"
5252
#include <string.h>
5353
#include <probe-api.h>
5454
#include <probe/probe.h>

0 commit comments

Comments
 (0)