blob: 0ce4635b3bffa16d037e3df3dbe57fea12a613d9 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001#include <stdio.h>
2#include <stdlib.h>
3#include <string.h>
4#include <ctype.h>
5#include <unistd.h>
6#include <errno.h>
7#include <netdb.h>
8#include <fcntl.h>
9#include <dirent.h>
10#include <time.h>
11#include <linux/capability.h>
12#include <linux/ipsec.h>
13#include <sys/capability.h>
14#include <cutils/properties.h>
15#include "utils_xfrm.h"
16
17struct typeent {
18 const char *t_name;
19 int t_type;
20};
21
22
23
24extern int xfrm_xfrmproto_getbyname(char *name);
25extern int xfrm_id_parse(xfrm_address_t *saddr_xfrm, struct xfrm_id *id, __u16 *family,
26 char * src,char * dst,char * ipsec_type);
27extern int xfrm_algo_parse(struct xfrm_algo *alg, char *name, char *key, char *buf, int max);
28extern __u8 xfrm_dir_parse(char * dir_str);
29extern int xfrm_mode_parse(__u8 *mode, char * mode_str);
30extern void xfrm_selector_parse(struct xfrm_selector *sel, char * src,char * dst,enum PROTOCOL_TYPE protocol,char * src_port,char * dst_port);
31extern void xfrm_encry_algo_parse(char * encry_src, char *name);
32extern void xfrm_interg_algo_parse(char * interg_src, char *name);