API Reference Manual 1.51.0
Loading...
Searching...
No Matches
ipsec_crypto/odp_ipsec_fwd_db.h
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright (c) 2014-2018 Linaro Limited
3 */
4
7#ifndef ODP_IPSEC_FWD_DB_H_
8#define ODP_IPSEC_FWD_DB_H_
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14#include <odp_api.h>
15#include <odp_ipsec_misc.h>
16
17#define OIF_LEN 32
18
22typedef struct fwd_db_entry_s {
23 struct fwd_db_entry_s *next;
24 char oif[OIF_LEN];
25 odp_pktio_t pktio;
26 odp_pktout_queue_t pktout;
27 uint8_t src_mac[ODPH_ETHADDR_LEN];
28 uint8_t dst_mac[ODPH_ETHADDR_LEN];
29 ip_addr_range_t subnet;
30} fwd_db_entry_t;
31
35typedef struct fwd_db_s {
36 uint32_t index;
37 fwd_db_entry_t *list;
38 fwd_db_entry_t array[MAX_DB];
39} fwd_db_t;
40
42extern fwd_db_t *fwd_db;
43
45void init_fwd_db(void);
46
60int create_fwd_db_entry(char *input, char **if_names, int if_count);
61
70void resolve_fwd_db(char *intf, odp_pktio_t pktio, odp_pktout_queue_t pktout,
71 uint8_t *mac);
72
78void dump_fwd_db_entry(fwd_db_entry_t *entry);
79
83void dump_fwd_db(void);
84
92fwd_db_entry_t *find_fwd_db_entry(uint32_t dst_ip);
93
94#ifdef __cplusplus
95}
96#endif
97
98#endif
The OpenDataPlane API.