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

28 lines
836 B
C

#ifndef PARSEFILE_H_
#define PARSEFILE_H_
#include <net/if.h>
#include "rpc_common.h"
#define PROC_NET_DEV "/proc/net/dev"
#define ETC_NETWORK_IFS "/etc/network/interfaces"
#define ETC_PRODUCT "/etc/product.conf"
#define IF_BUFF_LEN 128
ret_code if_conf_file_add(char *if_name);
ret_code if_conf_file_del(char *if_name);
ret_code if_conf_file_set(char *if_name, char *conf_name, char *conf_buff);
ret_code if_conf_file_get(char *if_name, char *conf_name, char *conf_buff);
void ip_conf_file_set(char *if_name, char *conf_name, char *conf_buff);
void ip_conf_file_del(char *if_name, char *conf_buff);
ret_code del_sub_string(char *str_in,char *str_sub);
int if_read_dev_file(struct ifreq *ifcfg, int max_port);
ret_code if_conf_file_init();
int if_read_conf_file(struct ifreq *ifcfg, int max_port);
#endif