API Reference Manual 1.51.0
Loading...
Searching...
No Matches
ipsec_api/odp_ipsec_stream.h
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright (c) 2014-2018 Linaro Limited
3 */
4
7#ifndef ODP_IPSEC_STREAM_H_
8#define ODP_IPSEC_STREAM_H_
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14#include <openssl/evp.h>
15
16#include <odp_api.h>
17#include <odp_ipsec_misc.h>
18#include <odp_ipsec_cache.h>
19
23typedef struct stream_db_entry_s {
24 struct stream_db_entry_s *next;
25 int id;
26 uint32_t src_ip;
27 uint32_t dst_ip;
28 int count;
29 uint32_t length;
30 uint32_t created;
31 uint32_t verified;
32 const EVP_MD *evp_md;
33 struct {
34 char *intf;
35 odp_pktio_t pktio;
36 uint32_t ah_seq;
37 uint32_t esp_seq;
38 ipsec_cache_entry_t *entry;
39 } input;
40 struct {
41 char *intf;
42 odp_pktio_t pktio;
43 ipsec_cache_entry_t *entry;
44 } output;
45} stream_db_entry_t;
46
50typedef struct stream_db_s {
51 uint32_t index;
52 stream_db_entry_t *list;
53 stream_db_entry_t array[MAX_DB];
54} stream_db_t;
55
56extern stream_db_t *stream_db;
57
59void init_stream_db(void);
60
62void deinit_stream_db(void);
63
73int create_stream_db_entry(char *input);
74
82void resolve_stream_db(void);
83
98odp_packet_t create_ipv4_packet(stream_db_entry_t *stream,
99 uint8_t *dmac,
100 odp_pool_t pkt_pool,
101 uint32_t max_len);
102
111odp_bool_t verify_ipv4_packet(stream_db_entry_t *stream,
112 odp_packet_t pkt);
113
125int create_stream_db_inputs(void);
126
135odp_bool_t verify_stream_db_outputs(void);
136
137#ifdef __cplusplus
138}
139#endif
140
141#endif
bool odp_bool_t
Boolean type.
The OpenDataPlane API.