你知道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中使用stream读取文件内容的实例代码

下一篇:使用 FastCGI 模式运行 PHP7 教程


asp.net
Copyright © 2002-2019 k262电脑网 www.k262.cn 皖ICP备2020016292号
温馨提示:部分文章图片数据来源与网络,仅供参考!版权归原作者所有,如有侵权请联系删除!QQ:251442993 热门搜索 网站地图