⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configgen.h

📁 lwip tcp/ip 协议栈 adsp BF533 DSP 移植 用 visual dsp++ 编译
💻 H
字号:

#ifndef _CONFIG_GEN_H_
#define _CONFIG_GEN_H_



// Keeps track of Lwip Header options
//
typedef struct ConfigHeaderStruct
{
	// Protocols
	bool proto_all;
	bool proto_tcp;
	bool proto_udp;
	bool proto_icmp;
	bool proto_dhcp;

	// Statistics collection
	bool stats_all;
	bool stats_tcp;
	bool stats_udp;
	bool stats_ip;
	bool stats_icmp;
	bool stats_link;

	// Ip options
	bool ip_forward;
	bool ip_options;
	bool ip_fragmentation;
	bool ip_reassembly;

	bool multiple_networks;
	int  num_networks;

	// Debug options
	bool debug_all;
	bool debug_tcp;
	bool debug_udp;
	bool debug_ip;
	bool debug_apilib;
	bool debug_sockets;
	bool debug_mem;
	bool debug_memp;

	// Packet tracing options
	bool trace_enable;
	bool tcp_pkt_dump;
	bool udp_pkt_dump;
	bool ip_pkt_dump;
	bool icmp_pkt_dump;
	bool arp_pkt_dump;

	// Tcp options
	
	int no_udp_conn;
	int no_tcp_conn;
	int no_sockets;
	int no_listen_conn;
	int tcp_mss;
	int tcp_wndsz;
	int arp_tbsz;

	// Memory
	//int ram_start_addr;
	int ram_size;
	int pool_start_addr;
	int pool_size;
	int mem_alignment;

}ConfigHeaderStruct;


typedef struct network_ifce
{
	int rx_bufs;
	int rx_buf_sz;
	int tx_bufs;
	int tx_buf_sz;
	char mac_addr[6];
	int ip_addr;
	int subnet_mask;
	int default_gateway;
	bool use_dhcp;
}network_ifce;

// Keeps the source defintions.
//
typedef struct ConfigSourceStruct
{
	struct network_ifce nw_ifces[2];	

}ConfigSourceStruct;


bool StoreConfigHeaderData(char *cfg_filename,ConfigHeaderStruct *cfg_header_struct);
bool StoreConfigSourceData(char *cfg_filename,ConfigSourceStruct *cfg_source_struct);

bool LoadConfigSourceData(char *cfg_filename,ConfigSourceStruct *cfg_source_struct);
bool LoadConfigHeaderData(char *cfg_filename,ConfigHeaderStruct *cfg_header_struct);


#endif 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -