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

📄 networkstack.h

📁 WWVB receiver using AVR.
💻 H
字号:
/* $Id: networkstack.h,v 1.13 2005/04/25 10:19:03 simimeie Exp $ * Basic Network Stack. Handles ARP / IP. */  #ifndef _NETWORKSTACK_H_#define _NETWORKSTACK_H_#ifdef ISANETWORK/* Network Configuration. This gets read from EEPROM, set it in eepromdata.h */extern uint8_t net_ip[4];extern uint8_t net_mask[4];extern uint8_t net_gate[4];extern uint8_t net_mac[6];extern uint8_t net_rconpass[9]; /* Password for commands over ethernet */extern uint8_t net_packet[1518];extern uint16_t net_recvdbytes; /* how many bytes the last packet had */#ifdef NETWORKSTATSextern uint32_t net_rxbytes; /* Received Bytes */extern uint32_t net_txbytes; /* Transmitted Bytes */extern uint32_t net_pings; /* ICMP Pings */extern uint32_t net_ntpqs; /* NTP Queries */extern uint32_t net_rcons; /* Remote Control Commands */#endif#define NET_MCASTBIT	0x01void net_init(void);void net_sendpacket(uint8_t * packet, uint16_t len);/* Checks whether a packet is available. * If not, it returns 0. * If a packet is available, it is put into the net_packet * buffer, and the length of the packet is returned */uint16_t net_receivepacket(void);void net_handlereceivedpacket(void);void net_handlearp(void);void net_handleip(void);uint16_t net_calcipchecksum(uint8_t * packet, uint8_t end);#else /* ndef ISANETWORK */#define net_init() if (0) { }#define net_sendpacket(a, b) if (0) { }#define net_receivepacket() 0#define net_handlereceivedpacket() if (0) { }#define net_handlearp() if (0) { }#define net_handleip() if (0) { }#define net_calcipchecksum(a, b) 0#endif /* ndef ISANETWORK */#endif

⌨️ 快捷键说明

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