rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | #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 | |
| 17 | struct typeent { |
| 18 | const char *t_name; |
| 19 | int t_type; |
| 20 | }; |
| 21 | |
| 22 | |
| 23 | |
| 24 | extern int xfrm_xfrmproto_getbyname(char *name); |
| 25 | extern int xfrm_id_parse(xfrm_address_t *saddr_xfrm, struct xfrm_id *id, __u16 *family, |
| 26 | char * src,char * dst,char * ipsec_type); |
| 27 | extern int xfrm_algo_parse(struct xfrm_algo *alg, char *name, char *key, char *buf, int max); |
| 28 | extern __u8 xfrm_dir_parse(char * dir_str); |
| 29 | extern int xfrm_mode_parse(__u8 *mode, char * mode_str); |
| 30 | extern void xfrm_selector_parse(struct xfrm_selector *sel, char * src,char * dst,enum PROTOCOL_TYPE protocol,char * src_port,char * dst_port); |
| 31 | extern void xfrm_encry_algo_parse(char * encry_src, char *name); |
| 32 | extern void xfrm_interg_algo_parse(char * interg_src, char *name); |