BSL v0.0.0
AMMOS Bundle Protocol Security Library (BSL)
Loading...
Searching...
No Matches
UtilDefs_SeqReadWrite.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2025 The Johns Hopkins University Applied Physics
3 * Laboratory LLC.
4 *
5 * This file is part of the Bundle Protocol Security Library (BSL).
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 * This work was performed for the Jet Propulsion Laboratory, California
18 * Institute of Technology, sponsored by the United States Government under
19 * the prime contract 80NM0018D0004 between the Caltech and NASA under
20 * subcontract 1700763.
21 */
26#ifndef BSL_SEQ_DATA_FLAT_H_
27#define BSL_SEQ_DATA_FLAT_H_
28
29#include <stddef.h>
30#include <stdint.h>
31#include <stdio.h>
32
33#include <BPSecLib_Private.h>
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
42{
44 const uint8_t *cursor;
46 size_t remain;
47};
48
56int BSL_SeqReader_InitFlat(BSL_SeqReader_t *obj, const uint8_t *buf, size_t bufsize);
57
61{
63 FILE *fd;
64};
65
74int BSL_SeqWriter_InitFlat(BSL_SeqWriter_t *obj, uint8_t **buf, size_t *bufsize);
75
76#ifdef __cplusplus
77} // extern C
78#endif
79
80#endif // BSL_SEQ_DATA_FLAT_H_
Single entry-point include file for all of the BPSec Lib (BSL) frontend API.
int BSL_SeqWriter_InitFlat(BSL_SeqWriter_t *obj, uint8_t **buf, size_t *bufsize)
Initialize resources for a sequential writer.
int BSL_SeqReader_InitFlat(BSL_SeqReader_t *obj, const uint8_t *buf, size_t bufsize)
Initialize resources for a sequential reader.
Definition of a simple flat buffer iterator.
const uint8_t * cursor
Current cursor into available data.
size_t remain
Remaining available buffer.
Definition of a simple flat buffer iterator.
FILE * fd
Memory mapped file.