📄 .#netprocess.c.1.4
字号:
/* * Function to process network packets and timeouts intermittently. * * (C) 2001 Compendium Technologies, Inc. * (C) 2001 Softools, Inc. * All rights reserved. * * This software is the proprietary information of Compendium Technologies, Inc. * and Softools, Inc. Use is subject to license terms. */#include "net2000.h"#include "lwip/netif.h"#include "RTK8019AS.h"unsigned char netProcessBusy = 0;/* * Process (periodically) network traffic. This function can be run right from * an interrupt timer. */near void netProcess(void){ unsigned int gotPackets; // Need replacement here // TODO: First need to protect with variables // TODO: Socket replacement ipset3(); if (netProcessBusy) { ipres(); return; } else { netProcessBusy = 1; ipres(); } do { // Keep looping round robin through all the interface while packets // are being read struct netif * interface = netif_list; gotPackets = 0; while(interface != NULL) {#ifdef DEBUG //printf("processing an interface\n");#endif // Try to read and route packets from each interface here // TODO: Different types of interfaces if (RTK8019AS_if_input(interface)) { gotPackets = 1; } interface = interface->next; } } while(gotPackets); ipset3(); netProcessBusy = 0; ipres();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -