| 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_PACKET_H |
| 25 | #define _SEAP_PACKET_Hcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:25:9`! |
| 26 | |
| 27 | #include <stdint.h> |
| 28 | #include "_seap-message.h"cxx . . $ `<file>/src/OVAL/probes/SEAP/_seap-message.h`/ |
| 29 | #include "_seap-command.h"cxx . . $ `<file>/src/OVAL/probes/SEAP/_seap-command.h`/ |
| 30 | #include "_seap-error.h"cxx . . $ `<file>/src/OVAL/probes/SEAP/_seap-error.h`/ |
| 31 | #include "../../../common/util.h"cxx . . $ `<file>/src/common/util.h`/ |
| 32 | |
| 33 | |
| 34 | #define SEAP_SYM_PREFIXcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:34:9`! "seap." |
| 35 | #define SEAP_SYM_MSGcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:35:9`! SEAP_SYM_PREFIXcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:34:9`!"msg" |
| 36 | #define SEAP_SYM_CMDcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:36:9`! SEAP_SYM_PREFIXcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:34:9`!"cmd" |
| 37 | #define SEAP_SYM_ERRcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:37:9`! SEAP_SYM_PREFIXcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:34:9`!"err" |
| 38 | |
| 39 | #define SEAP_PACKET_INVcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:39:9`! 0x00 /* Invalid packet */ |
| 40 | #define SEAP_PACKET_MSGcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:40:9`! 0x01 /* Message packet */ |
| 41 | #define SEAP_PACKET_ERRcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:41:9`! 0x02 /* Error packet */ |
| 42 | #define SEAP_PACKET_CMDcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:42:9`! 0x03 /* Command packet */ |
| 43 | #define SEAP_PACKET_RAWcxx . . $ `src/OVAL/probes/SEAP/_seap-packet.h:43:9`! 0x04 /* Raw packet */ |
| 44 | |
| 45 | struct SEAP_packetcxx . . $ SEAP_packet# { |
| 46 | uint8_tcxx . . $ uint8_t# typecxx . . $ SEAP_packet#type.; |
| 47 | unioncxx . . $ SEAP_packet#$anonymous_type_0# { |
| 48 | SEAP_msg_tcxx . . $ SEAP_msg_t# msgcxx . . $ SEAP_packet#$anonymous_type_0#msg.; |
| 49 | SEAP_err_tcxx . . $ SEAP_err_t# errcxx . . $ SEAP_packet#$anonymous_type_0#err.; |
| 50 | SEAP_cmd_tcxx . . $ SEAP_cmd_t# cmdcxx . . $ SEAP_packet#$anonymous_type_0#cmd.; |
| 51 | } datacxx . . $ SEAP_packet#data.; |
| 52 | }; |
| 53 | typedef struct SEAP_packetcxx . . $ SEAP_packet# SEAP_packet_tcxx . . $ SEAP_packet_t#; |
| 54 | |
| 55 | SEAP_packet_tcxx . . $ SEAP_packet_t# *SEAP_packet_newcxx . . $ SEAP_packet_new(384bfbf0d7214bc9).(void); |
| 56 | void SEAP_packet_freecxx . . $ SEAP_packet_free(2cb4ed29150e9a0f).(SEAP_packet_tcxx . . $ SEAP_packet_t# *packet); |
| 57 | |
| 58 | void *SEAP_packet_settypecxx . . $ SEAP_packet_settype(332ceac18a0c9d9b).(SEAP_packet_tcxx . . $ SEAP_packet_t# *packet, uint8_tcxx . . $ uint8_t# type); |
| 59 | uint8_tcxx . . $ uint8_t# SEAP_packet_gettypecxx . . $ SEAP_packet_gettype(22e705be93eb9565).(SEAP_packet_tcxx . . $ SEAP_packet_t# *packet); |
| 60 | |
| 61 | SEAP_msg_tcxx . . $ SEAP_msg_t# *SEAP_packet_msgcxx . . $ SEAP_packet_msg(3b2c095c5026749b).(SEAP_packet_tcxx . . $ SEAP_packet_t# *packet); |
| 62 | SEAP_cmd_tcxx . . $ SEAP_cmd_t# *SEAP_packet_cmdcxx . . $ SEAP_packet_cmd(9f46e6fb5acf697d).(SEAP_packet_tcxx . . $ SEAP_packet_t# *packet); |
| 63 | SEAP_err_tcxx . . $ SEAP_err_t# *SEAP_packet_errcxx . . $ SEAP_packet_err(3bc7b797eb278dfe).(SEAP_packet_tcxx . . $ SEAP_packet_t# *packet); |
| 64 | |
| 65 | int SEAP_packet_recvcxx . . $ SEAP_packet_recv(a0f51301b886eec1).(SEAP_CTX_tcxx . . $ SEAP_CTX_t# *ctx, int sd, SEAP_packet_tcxx . . $ SEAP_packet_t# **packet); |
| 66 | int SEAP_packet_recv_bytypecxx . . $ SEAP_packet_recv_bytype(f8c15b059e9b795d).(SEAP_CTX_tcxx . . $ SEAP_CTX_t# *ctx, int sd, SEAP_packet_tcxx . . $ SEAP_packet_t# **packet, uint8_tcxx . . $ uint8_t# type); |
| 67 | int SEAP_packet_sendcxx . . $ SEAP_packet_send(ef224cc9abb3a138).(SEAP_CTX_tcxx . . $ SEAP_CTX_t# *ctx, int sd, SEAP_packet_tcxx . . $ SEAP_packet_t# *packet); |
| 68 | int SEAP_packet_enqueuecxx . . $ SEAP_packet_enqueue(ef224cc9abb3a138).(SEAP_CTX_tcxx . . $ SEAP_CTX_t# *ctx, int sd, SEAP_packet_tcxx . . $ SEAP_packet_t# *packet); |
| 69 | |
| 70 | #endif /* _SEAP_PACKET_H */ |