blob: c278944d643281781de8b008c271c1b70ee827d7 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001#ifndef __VOLTE_PROXY_H__
2#define __VOLTE_PROXY_H__
3#include "softap_api.h"
4
5#define IPSEC_PROTO_BASE 0x00
6#define IPSEC_PROTO_UNKOWN IPSEC_PROTO_BASE
7#define IPSEC_PROTO_UDP 0x01
8#define IPSEC_PROTO_TCP 0x02
9#define IPSEC_PROTO_TCP_UDP 0x03
10#define IPSEC_PROTO_MAX IPSEC_PROTO_TCP_UDP
11#define IPSEC_NETIF_NAME_LEN 20
12#define IPSEC_NV_NAME_LEN 30
13#define IPSEC_IPV4ADDLEN_MAX 16
14#define IPSEC_IPV6ADDLEN_MAX 46
15
16
17typedef struct ipsec_set_msg
18{
19 char dir[8]; /*in or out*/
20 int IsIpv4;
21 unsigned short PortC;
22 unsigned short PortS;
23 char SrcIpv4[32];
24 char DestIpv4[32];
25 char SrcIpv6[64];
26 char DestIpv6[64];
27 char Ikey[64];
28 char Ckey[64];
29 int Spi;
30 char Prot[16];
31 char Mod[16];
32 char Ealg[16];
33 char Alg[16];
34} ipsec_set_msg;
35
36typedef struct ipsec_set_sa_msg
37{
38
39 int IsIpv4; //ipv4=1 ipv6=0
40 char SrcIpv4[32];
41 char DestIpv4[32];
42 char SrcIpv6[64];
43 char DestIpv6[64];
44 char Ikey[64];
45 char Ckey[64];
46 int Spi;
47 char XfrmProt[16];
48 char Mod[16];
49 char Ealg[16];
50 char Alg[16];
51} ipsec_set_sa_msg;
52
53typedef struct ipsec_set_sp_msg
54{
55 char dir[8]; /*in or out*/
56 int IsIpv4; //ipv4=1 ipv6=0
57 unsigned short PortC;
58 unsigned short PortS;
59 char SrcIpv4[32];
60 char DestIpv4[32];
61 char SrcIpv6[64];
62 char DestIpv6[64];
63 int Spi;
64 char XfrmProt[16];
65 int Prot;
66 char Mod[16];
67} ipsec_set_sp_msg;
68
69typedef struct ipsec_del_msg
70{
71 char dir[8]; /*in or out*/
72 int IsIpv4; //ipv4=1 ipv6=0
73 unsigned short PortC;
74 unsigned short PortS;
75 char SrcIpv4[32];
76 char DestIpv4[32];
77 char SrcIpv6[64];
78 char DestIpv6[64];
79 char Ikey[64];
80 char Ckey[64];
81 int Spi;
82 char Prot[16];
83 char Mod[16];
84 char Ealg[16];
85 char Alg[16];
86} ipsec_del_msg;
87
88typedef struct ipsec_del_sa_msg
89{
90 int IsIpv4; //ipv4=1 ipv6=0
91 char SrcIpv4[32];
92 char DestIpv4[32];
93 char SrcIpv6[64];
94 char DestIpv6[64];
95 int Spi;
96 char XfrmProt[16];
97 char Mod[16];
98}ipsec_del_sa_msg;
99
100typedef struct ipsec_del_sp_msg
101{
102 char dir[8]; /*in or out*/
103 int IsIpv4; //ipv4=1 ipv6=0
104 unsigned short PortC;
105 unsigned short PortS;
106 char SrcIpv4[32];
107 char DestIpv4[32];
108 char SrcIpv6[64];
109 char DestIpv6[64];
110 int Prot;
111}ipsec_del_sp_msg;
112
113extern int ipsec_set(int s, void *data, int datalen);
114extern int ipsec_del(int s, void *data, int datalen);
115extern int ipsec_set_sa(int s, void *data, int datalen);
116extern int ipsec_set_sp(int s, void *data, int datalen);
117extern int ipsec_del_sa(int s, void *data, int datalen);
118extern int ipsec_del_sp(int s, void *data, int datalen);
119#endif