Open SCAP Library
Loading...
Searching...
No Matches
_seap.h
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" <dkopecek@redhat.com>
21 */
22
23#pragma once
24#ifndef _SEAP_H
25#define _SEAP_H
26
27#include "_seap-message.h"
28#include "sch_queue.h"
29#include "../../../common/util.h"
30#include "_seap-types.h"
31
32#ifndef EOPNOTSUPP
33# define EOPNOTSUPP 1001
34#endif
35
36#ifndef ECANCELED
37# define ECANCELED 1002
38#endif
39
40SEAP_CTX_t *SEAP_CTX_new(void);
41void SEAP_CTX_init(SEAP_CTX_t *ctx);
42void SEAP_CTX_free(SEAP_CTX_t *ctx);
43
44int SEAP_connect(SEAP_CTX_t *ctx);
45int SEAP_listen(SEAP_CTX_t *ctx, int sd, uint32_t maxcli);
46int SEAP_accept(SEAP_CTX_t *ctx, int sd);
47
48int SEAP_open(SEAP_CTX_t *ctx, const char *path, uint32_t flags);
49SEXP_t *SEAP_read(SEAP_CTX_t *ctx, int sd);
50int SEAP_write(SEAP_CTX_t *ctx, int sd, SEXP_t *sexp);
51int SEAP_close(SEAP_CTX_t *ctx, int sd);
52
53int SEAP_openfd(SEAP_CTX_t *ctx, int fd, uint32_t flags);
54int SEAP_openfd2(SEAP_CTX_t *ctx, int ifd, int ofd, uint32_t flags);
55int SEAP_add_probe(SEAP_CTX_t *ctx, sch_queuedata_t *data);
56
57int SEAP_recvsexp(SEAP_CTX_t *ctx, int sd, SEXP_t **sexp);
58int SEAP_recvmsg(SEAP_CTX_t *ctx, int sd, SEAP_msg_t **seap_msg);
59
60int SEAP_sendsexp(SEAP_CTX_t *ctx, int sd, SEXP_t *sexp);
61int SEAP_sendmsg(SEAP_CTX_t *ctx, int sd, SEAP_msg_t *seap_msg);
62
63int SEAP_reply(SEAP_CTX_t *ctx, int sd, SEAP_msg_t *rep_msg, SEAP_msg_t *req_msg);
64
65int SEAP_senderr(SEAP_CTX_t *ctx, int sd, SEAP_err_t *err);
66int SEAP_recverr(SEAP_CTX_t *ctx, int sd, SEAP_err_t **err);
67int SEAP_recverr_byid(SEAP_CTX_t *ctx, int sd, SEAP_err_t **err, SEAP_msgid_t id);
68
69int SEAP_replyerr(SEAP_CTX_t *ctx, int sd, SEAP_msg_t *rep_msg, uint32_t e);
70
71int __SEAP_recvmsg_process_cmd (SEAP_CTX_t *ctx, int sd, SEAP_cmd_t *cmd);
72
73
74#endif /* _SEAP_H */
Definition _seap-types.h:51
Definition _seap-command.h:59
Definition _seap-error.h:31
Definition _seap-message.h:44
Definition sexp-types.h:82
Definition sch_queue.h:30