2019-06-18 07:54:42 +00:00
|
|
|
#ifndef PARSEFILE_H_
|
|
|
|
#define PARSEFILE_H_
|
|
|
|
|
2019-08-08 03:57:20 +00:00
|
|
|
#include <net/if.h>
|
|
|
|
|
2019-08-02 07:33:53 +00:00
|
|
|
#include "rpc_common.h"
|
|
|
|
|
2019-08-08 03:57:20 +00:00
|
|
|
#define PROC_NET_DEV "/proc/net/dev"
|
|
|
|
#define ETC_NETWORK_IFS "/etc/network/interfaces"
|
|
|
|
#define ETC_PRODUCT "/etc/product.conf"
|
|
|
|
|
2019-06-28 10:36:24 +00:00
|
|
|
#define IF_BUFF_LEN 128
|
2019-06-18 07:54:42 +00:00
|
|
|
|
2019-08-02 06:59:46 +00:00
|
|
|
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);
|
|
|
|
|
2019-07-03 02:44:56 +00:00
|
|
|
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);
|
2019-06-18 07:54:42 +00:00
|
|
|
|
2019-08-02 06:59:46 +00:00
|
|
|
ret_code del_sub_string(char *str_in,char *str_sub);
|
2019-08-08 03:57:20 +00:00
|
|
|
int if_read_from_file(struct ifreq *ifcfg, int max_port);
|
|
|
|
ret_code if_conf_file_init();
|
2019-08-02 06:59:46 +00:00
|
|
|
|
2019-06-18 07:54:42 +00:00
|
|
|
#endif
|