-
Notifications
You must be signed in to change notification settings - Fork 257
/
Copy pathgnb_unified_forwarding.h
44 lines (29 loc) · 1.42 KB
/
gnb_unified_forwarding.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
Copyright (C) gnbdev
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GNB_UNIFIED_FORWARDING_H
#define GNB_UNIFIED_FORWARDING_H
#include <stdint.h>
typedef struct _gnb_core_t gnb_core_t;
typedef struct _gnb_payload16_t gnb_payload16_t;
typedef struct _gnb_node_t gnb_node_t;
typedef struct _gnb_sockaddress_t gnb_sockaddress_t;
int gnb_unified_forwarding_tun(gnb_core_t *gnb_core, gnb_pf_ctx_t *pf_ctx);
int gnb_unified_forwarding_with_multi_path_tun(gnb_core_t *gnb_core, gnb_pf_ctx_t *pf_ctx);
#define UNIFIED_FORWARDING_DROP -2
#define UNIFIED_FORWARDING_ERROR -1
#define UNIFIED_FORWARDING_TO_TUN 0
#define UNIFIED_FORWARDING_TO_INET 1
int gnb_unified_forwarding_inet(gnb_core_t *gnb_core, gnb_payload16_t *payload);
int gnb_unified_forwarding_multi_path_inet(gnb_core_t *gnb_core, gnb_payload16_t *payload);
#endif