你知道Uboot中的net是怎样的?
//net读
//api/api
static cfp_t calls_table[API_MAXCALL]=;
void api_init(void)
staTIc int API_dev_read(va_list ap)
...
}
//api/api_net
int dev_read_net(void*cookie,void*buf,int len)
//net/eth
int eth_receive(volaTIle void*packet,int length)
//drivers\net\higmacv300\Higmac
int eth_rx(void)
//net/netweixiu3721
void NetReceive(volatile uchar*inpkt,int len)
case PROT_RARP:
...
case PROT_IP:
...
if(ip>ip_p==IPPROTO_ICMP)
}
}
}
}
static rxhand_f*packetHandler;/*Current RX packet handler*/
void NetSetHandler(rxhand_f*f)
//net/net.h
typedef void rxhand_f(uchar*,unsigned,unsigned,unsigned);
举例tftp通讯
//net/tftp
void TftpStart(void)
static void TftpHandler(uchar*pkt,unsigned dest,unsigned src,unsigned len)
}
asp.net