Mod aaa-12 add ike config

RCA:
SOL:
修改人:zhangtao
检视人:
This commit is contained in:
zhangtaohz 2019-10-15 16:45:30 +08:00
parent cc84e0d9cc
commit 6984f00faf
5 changed files with 67 additions and 3 deletions

View File

@ -23,6 +23,7 @@ typedef enum{
NAT_CONFIG_MODULE = 0x00000008, ///< nat config
STATIC_ROUTING_CONFIG_MODULE = 0x00000009, ///< static routing
OBJECT_MANAGER_CONFIG_MODULE = 0x0000000A, ///< Object manager config id
IPSEC_CONFIG_MODULE = 0x0000000B, ///< ipsec config
CONFIG_ID_MAX,
} CONFIG_ID_TYPE;
@ -100,6 +101,12 @@ typedef enum{
#define OBJECT_CONFIG (uint64)((uint64)OBJECT_MANAGER_CONFIG_MODULE<<32|1)
#define OBJECT_GETALL_CONFIG (uint64)((uint64)OBJECT_MANAGER_CONFIG_MODULE<<32|2)
#define IPSEC_IKE_CONFIG (uint64)((uint64)IPSEC_CONFIG_MODULE<<32|1)
#define IPSEC_FORWARD_CONFIG (uint64)((uint64)IPSEC_CONFIG_MODULE<<32|2)
/************************ config id定义 end**********************/
#endif

View File

@ -75,7 +75,8 @@ COMMON_SRCS = configserver.c \
LTE_config/LTE_config.c \
object_manager.c \
log.c \
hexdump.c
hexdump.c \
ipsec_config/ike_config.c
@ -89,7 +90,7 @@ COMMOM_CFLAGS = -I../user/configm/config-server/include \
-I../common/configm -I../common/rpc -I../common/rpc/hashtable \
-I../common/ulog -I../user/configm/config-server/netconfig/ \
-I../user/configm/config-server/netconfig/bridge/include \
-I../common -I../../Producd/common
-I../common -I../../Producd/common -I/usr/include/nspr
# gcc CFLAGS
PLAT_ARM64_CFLAGS := $(COMMOM_CFLAGS)
@ -98,7 +99,7 @@ PLAT_LINUX_CFLAGS := $(COMMOM_CFLAGS)
PLAT_ARM64_LDFLAGS :=
PLAT_LINUX_LDFLAGS :=
COMMON_STD_LIB := -lpthread -lm -lcjson -levent -ljson-c -lhiredis -lodbc -lev -ldl
COMMON_STD_LIB := -lpthread -lm -lcjson -levent -ljson-c -lhiredis -lodbc -lev -ldl -lipsecconf -lwhack -lswan -llswtool -lswan -lunbound
#gcc libs
PLAT_ARM64_LIBS := -lopenrpc-$(ARM64_OBJ_TARGET) -lnetlinku-$(ARM64_OBJ_TARGET) -lredismq-$(ARM64_OBJ_TARGET)
PLAT_ARM64_LIBS += -lulogapi-$(ARM64_OBJ_TARGET) -ldatabase-$(ARM64_OBJ_TARGET) $(COMMON_STD_LIB)

View File

@ -18,6 +18,7 @@
#include "static_routing.h"
#include "LTE_config.h"
#include "../object_manager/object_manager.h"
#include "ike_config.h"
#define RET_CODE_LEN 16
#define RET_MSG_LEN 128
@ -328,6 +329,15 @@
NULL, \
object_config_get, \
object_config_get_all, \
}, \
{ \
IPSEC_IKE_CONFIG, \
CONFIG_FROM_WEB, \
FALSE, \
ike_config_chk, \
ike_config_proc, \
NULL, \
NULL, \
} \
}

View File

@ -0,0 +1,16 @@
#ifndef _IKE_CONFIG_H
#define _IKE_CONFIG_H
#include <stdio.h>
#include "rpc_types.h"
#include "rpc_common.h"
ret_code ike_config_chk(uint source, uint *config_type,
pointer input, int *input_len,
pointer output, int *output_len);
ret_code ike_config_proc(uint source, uint config_type,
pointer input, int input_len,
pointer output, int *output_len);
#endif

View File

@ -0,0 +1,30 @@
#include "ike_config.h"
#include "lswalloc.h"
#include <ipsecconf/confread.h>
#include <deltatime.h>
ret_code ike_config_chk(uint source, uint *config_type,
pointer input, int *input_len,
pointer output, int *output_len)
{
return RET_OK;
}
ret_code ike_config_proc(uint source, uint config_type,
pointer input, int input_len,
pointer output, int *output_len)
{
ipsecconf_default_values(NULL);
/*
resolve_defaultroute(conn);
starter_whack_add_conn(cfg, conn);
starter_whack_listen(cfg);
starter_whack_route_conn(cfg, conn);
*/
return RET_OK;
}