42 lines
1.1 KiB
C
42 lines
1.1 KiB
C
|
#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 Init(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 */
|
|||
|
int portalserver_config_proc(uint source, uint config_type,
|
|||
|
pointer input, int input_len,
|
|||
|
pointer output, int *output_len);
|
|||
|
|
|||
|
#endif
|