parent
f93af5d8a1
commit
944512546a
|
@ -27,7 +27,7 @@ VPATH = ../user/configm/config-server
|
|||
|
||||
# set the source file, don't used .o because of ...
|
||||
|
||||
COMMON_SRCS = configserver.c ipconfig/ipconfig.c ipconfig/parsefile.c
|
||||
COMMON_SRCS = configserver.c ipconfig/ipconfig.c ipconfig/parsefile.c authfree_config/authfree.c localportal_config/localportal.c userlock_config/userlock.c
|
||||
|
||||
# MRS Board Source Files
|
||||
PLAT_LINUX_SRCS = $(COMMON_SRCS)
|
||||
|
@ -42,17 +42,17 @@ PLAT_ARM64_LDFLAGS :=
|
|||
PLAT_LINUX_LDFLAGS :=
|
||||
|
||||
#gcc libs
|
||||
ARM64_LIBS := ../thirdparty/arm64/libev-arm64.so ./libopenrpc-arm64.so -lpthread -lm
|
||||
LINUX_LIBS := ../thirdparty/x86_64/libev-linux.so ./libopenrpc-linux.so -lpthread -lm
|
||||
ARM64_LIBS := ../thirdparty/arm64/libev-arm64.so ./libopenrpc-arm64.so ./libnetlinku-arm64.so -lpthread -lm
|
||||
LINUX_LIBS := ../thirdparty/x86_64/libev-linux.so ./libopenrpc-linux.so ./libnetlinku-linux.so -lpthread -lm
|
||||
|
||||
ifeq ($(PLAT_ARM64), TRUE)
|
||||
DEPEND_LIB += ../thirdparty/arm64/libev-arm64.so ./debug/libopenrpc-arm64.so
|
||||
USER_CLEAN_ITEMS += ./libopenrpc-arm64.so
|
||||
DEPEND_LIB += ../thirdparty/arm64/libev-arm64.so ./debug/libopenrpc-arm64.so ./debug/libnetlinku-arm64.so
|
||||
USER_CLEAN_ITEMS += ./libopenrpc-arm64.so ./libnetlinku-arm64.so
|
||||
endif
|
||||
|
||||
ifeq ($(PLAT_LINUX), TRUE)
|
||||
DEPEND_LIB += ../thirdparty/x86_64/libev-linux.so ./debug/libopenrpc-linux.so
|
||||
USER_CLEAN_ITEMS += ./libopenrpc-linux.so
|
||||
DEPEND_LIB += ../thirdparty/x86_64/libev-linux.so ./debug/libopenrpc-linux.so ./libnetlinku-linux.so
|
||||
USER_CLEAN_ITEMS += ./libopenrpc-linux.so ./libnetlinku-linux.so
|
||||
endif
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "../../../../common/rpc/rpc.h"
|
||||
#include "../include/authfree.h"
|
||||
#include <cjson/cJSON.h>
|
||||
#include "s2j/s2j.h"
|
||||
#include "../../../../../Common/s2j/s2j.h"
|
||||
#include "../../../../../Common/commuapinl.h"
|
||||
|
||||
#ifdef FREEAUTH_ACK_COOKIES
|
||||
|
@ -15,7 +15,7 @@
|
|||
freeauth_configure_t *localuser;
|
||||
|
||||
/*全局变量初始化 失败为1 成功为0*/
|
||||
int Init(freeauth_configure_t *localuser)
|
||||
int authfreeInit(freeauth_configure_t *localuser)
|
||||
{
|
||||
localuser = (freeauth_configure_t *)malloc(sizeof * localuser);
|
||||
if (NULL == localuser)
|
||||
|
@ -177,7 +177,7 @@ ret_code freeauth_config_chk(uint source, uint config_type,
|
|||
|
||||
|
||||
/*免认证规则有效,将免认证规则通过netlink下发到内核态 */
|
||||
int freeauth_config_proc(uint source, uint config_type,
|
||||
ret_code freeauth_config_proc(uint source, uint config_type,
|
||||
pointer input, int input_len,
|
||||
pointer output, int *output_len)
|
||||
{
|
||||
|
@ -205,7 +205,7 @@ int freeauth_config_proc(uint source, uint config_type,
|
|||
if(ret1 < 0)
|
||||
{
|
||||
printf(" pdlivnl_open fail, exit.\r\n");
|
||||
return -1;
|
||||
return RET_ERR;
|
||||
}
|
||||
|
||||
/*下发配置到内核态 */
|
||||
|
@ -213,7 +213,7 @@ int freeauth_config_proc(uint source, uint config_type,
|
|||
if(ret1 < 0)
|
||||
{
|
||||
printf("set_cfg_debug_waitack failed.\r\n");
|
||||
return -1;
|
||||
return RET_ERR;
|
||||
}
|
||||
|
||||
/*关闭netlink通道 */
|
||||
|
@ -223,12 +223,7 @@ int freeauth_config_proc(uint source, uint config_type,
|
|||
|
||||
/*把免认证规则的配置信息存入全局变量 */
|
||||
localuser = struct_freeauth;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
return 0;
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ typedef struct {
|
|||
|
||||
|
||||
/*全局变量初始化 失败为1 成功为0*/
|
||||
int Init(freeauth_configure_t *localuser);
|
||||
int authfreeInit(freeauth_configure_t *localuser);
|
||||
|
||||
|
||||
/* 判断IPv4格式是否正确*/
|
||||
|
@ -43,7 +43,7 @@ ret_code freeauth_config_chk(uint source, uint config_type,
|
|||
|
||||
|
||||
/*免认证规则有效,将免认证规则通过netlink下发到内核态 */
|
||||
int freeauth_config_proc(uint source, uint config_type,
|
||||
ret_code freeauth_config_proc(uint source, uint config_type,
|
||||
pointer input, int input_len,
|
||||
pointer output, int *output_len);
|
||||
|
||||
|
|
|
@ -5,6 +5,11 @@
|
|||
#include "ipconfig.h"
|
||||
#include "../../../../../Common/commuapinl.h"
|
||||
#include "user_group_config.h"
|
||||
#include "authfree.h"
|
||||
#include "localportal.h"
|
||||
#include "jumppage.h"
|
||||
#include "userlock.h"
|
||||
|
||||
/* 类型定义 */
|
||||
|
||||
/* IP CONFIG */
|
||||
|
@ -17,9 +22,6 @@
|
|||
#define LOCALAUTH_CONFIG_MODULE 0x00000003
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* config id define*/
|
||||
#define IPCONFIG_V4 (uint64)((uint64)IPCONFIG_MODULE<<32|1)
|
||||
|
||||
|
@ -72,18 +74,18 @@
|
|||
FALSE, \
|
||||
portalserver_config_chk, \
|
||||
portalserver_config_proc, \
|
||||
portalserver_config_get, \
|
||||
portalserver_get_all \
|
||||
},\
|
||||
{\
|
||||
NULL, \
|
||||
NULL \
|
||||
}, \
|
||||
{ \
|
||||
AUTHFREE_CONFIG, \
|
||||
CONFIG_FROM_WEB|CONFIG_FROM_NETOPEER, \
|
||||
FALSE, \
|
||||
FALSE, \
|
||||
freeauth_config_chk, \
|
||||
freeauth_config_proc, \
|
||||
freeauth_config_get, \
|
||||
freeauth_config_get_all \
|
||||
NULL, \
|
||||
NULL \
|
||||
},\
|
||||
{\
|
||||
USERLOCK_CONFIG, \
|
||||
|
@ -92,19 +94,19 @@
|
|||
FALSE, \
|
||||
userlock_config_chk, \
|
||||
userlock_config_proc, \
|
||||
userlock_config_get, \
|
||||
userlock_config_get_all \
|
||||
NULL, \
|
||||
NULL \
|
||||
},\
|
||||
{\
|
||||
JUMPPAGE_CONFIG, \
|
||||
CONFIG_FROM_WEB|CONFIG_FROM_NETOPEER, \
|
||||
FALSE, \
|
||||
FALSE, \
|
||||
jumppage_config_chk, \
|
||||
NULL, \
|
||||
jumppage_config_proc, \
|
||||
jumppage_config_get, \
|
||||
jumppage_config_get_all \
|
||||
},\
|
||||
NULL, \
|
||||
NULL \
|
||||
} \
|
||||
\
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ typedef struct {
|
|||
}localportal_configure_t;
|
||||
|
||||
/*全局变量初始化 失败为1 成功为0*/
|
||||
int Init(localportal_configure_t *localportal);
|
||||
int localportalInit(localportal_configure_t *localportal);
|
||||
|
||||
|
||||
/*检查IP地址是否有效,端口号是否被占用 */
|
||||
|
@ -35,7 +35,7 @@ ret_code portalserver_config_chk(uint source, uint config_type,
|
|||
|
||||
|
||||
/*系统管理模块将数据内容(IP地址、端口号)发送给web server */
|
||||
int portalserver_config_proc(uint source, uint config_type,
|
||||
ret_code portalserver_config_proc(uint source, uint config_type,
|
||||
pointer input, int input_len,
|
||||
pointer output, int *output_len);
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ ret_code userlock_config_chk(uint source, uint config_type,
|
|||
|
||||
|
||||
/*系统管理模块将数据内容(IP地址、端口号)发送给web server */
|
||||
int userlock_config_proc(uint source, uint config_type,
|
||||
ret_code userlock_config_proc(uint source, uint config_type,
|
||||
pointer input, int input_len,
|
||||
pointer output, int *output_len);
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
localportal_configure_t *localportal;
|
||||
|
||||
/*全局变量初始化 失败为1 成功为0*/
|
||||
int Init(localportal_configure_t *localportal)
|
||||
int localportalInit(localportal_configure_t *localportal)
|
||||
{
|
||||
localportal = (localportal_configure_t *)malloc(sizeof * localportal);
|
||||
if (NULL == localportal)
|
||||
|
@ -107,7 +107,7 @@ ret_code portalserver_config_chk(uint source, uint config_type,
|
|||
|
||||
|
||||
/*系统管理模块将数据内容(IP地址、端口号)发送给web server */
|
||||
int portalserver_config_proc(uint source, uint config_type,
|
||||
ret_code portalserver_config_proc(uint source, uint config_type,
|
||||
pointer input, int input_len,
|
||||
pointer output, int *output_len)
|
||||
{
|
||||
|
@ -127,7 +127,8 @@ int portalserver_config_proc(uint source, uint config_type,
|
|||
/*把本地Portal server的配置信息存入全局变量 */
|
||||
localportal = struct_portal;
|
||||
|
||||
return 0;
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ ret_code userlock_config_chk(uint source, uint config_type,
|
|||
|
||||
|
||||
/*系统管理模块将数据内容(IP地址、端口号)发送给web server */
|
||||
int userlock_config_proc(uint source, uint config_type,
|
||||
ret_code userlock_config_proc(uint source, uint config_type,
|
||||
pointer input, int input_len,
|
||||
pointer output, int *output_len)
|
||||
{
|
||||
|
@ -85,7 +85,7 @@ int userlock_config_proc(uint source, uint config_type,
|
|||
/*把本地Portal server的配置信息存入全局变量 */
|
||||
userlock = struct_userlock;
|
||||
|
||||
return 0;
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue