?? net.c
字號:
/*
* File: net.c
* Purpose: Network initialization for dBUG.
*
* Notes:
*
* Modifications:
*/
#include "src/include/dbug.h"
#include "src/uif/net/net.h"
/********************************************************************/
/* Define one network interface */
NIF nif1;
IP_INFO ip_info;
ARP_INFO arp_info;
/********************************************************************/
int
net_init()
{
IP_ADDR client;
IP_ADDR gateway;
IP_ADDR netmask;
board_get_client(client);
board_get_gateway(gateway);
board_get_netmask(netmask);
nbuf_init();
arp_init(&arp_info);
nif_bind_protocol(&nif1,FRAME_ARP,(void *)arp_handler,(void *)&arp_info);
ip_init(&ip_info,client,gateway,netmask);
nif_bind_protocol(&nif1,FRAME_IP,(void *)ip_handler,(void *)&ip_info);
udp_init();
return TRUE;
}
/********************************************************************/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -