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

42 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 LOCALPORTAL_H_
#define LOCALPORTAL_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"
/*配置消息 */
typedef struct {
uint32_t ip;
int port;
}localportal_configure_t;
/*全局变量初始化 失败为1 成功为0*/
int localportalInit(localportal_configure_t **localportal);
/*检查IP地址是否有效端口号是否被占用 */
int _valid_ipv4_port(const char *str, int port);
/*判断配置本地Portal服务器的IP地址是否有效端口号是否被占用 */
ret_code portalserver_config_chk(uint source, uint *config_type,
pointer input, int *input_len,
pointer output, int *output_len);
/*系统管理模块将数据内容IP地址、端口号发送给web server */
ret_code portalserver_config_proc(uint source, uint config_type,
pointer input, int input_len,
pointer output, int *output_len);
#endif