ais/conf.h

25 lines
474 B
C
Raw Normal View History

2020-05-29 11:09:39 +08:00
#ifndef CONF_H
#define CONF_H
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <error.h>
#include <unistd.h>
2020-11-16 11:10:11 +08:00
#include "ais.h"
2020-05-29 11:09:39 +08:00
// 配置文件结构
typedef struct CONF {
2021-04-01 16:23:21 +08:00
int local_port;
char *io_flag;
int encode;
int IP_RESTRICTION;
2020-05-29 11:09:39 +08:00
char *IP_SEGMENT;
} conf;
void read_conf(char *filename, conf * configure);
void free_conf(conf * p);
2020-11-16 11:10:11 +08:00
void split_string(char string[], char delims[], char (*whitelist_ip)[WHITELIST_IP_NUM]);
2020-05-29 11:09:39 +08:00
#endif