secgateway/Platform/user/configm/config-server/include/userlock.h

45 lines
1.2 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef USERLOCK_H_
#define USERLOCK_H_
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include "../../../../common/rpc/rpc_common.h"
#define FAIL_MIN_NUM 0 /*失败次数的最小值*/
#define LOCK_MIN_TIME 0 /*锁定的最小时间 */
#define HORIZON_MIN_VALUE 0 /*认证时间范围的最小值 */
/*配置消息 */
typedef struct {
time_t logintime;
int timehorizon;
int failcount;
int locktime;
}userlock_configure_t;
/*全局变量初始化 失败为1 成功为0*/
int Init(userlock_configure_t *userlock);
/*判断锁定配置信息是否有效时间范围大于0失败的次数大于0锁定时间大于0 */
ret_code userlock_config_chk(uint source, uint *config_type,
pointer input, int *input_len,
pointer output, int *output_len);
/*系统管理模块将数据内容IP地址、端口号发送给web server */
ret_code userlock_config_proc(uint source, uint config_type,
pointer input, int input_len,
pointer output, int *output_len);
#endif