BlinkenArea - GitList
Repositories
Blog
Wiki
bluebox
Code
Commits
Branches
Tags
Search
Tree:
fd252ce
Branches
Tags
master
bluebox
BlueDataDistributor
firmware
arp.h
initial commit of files from bluebox project
Stefan Schuermans
commited
fd252ce
at 2015-12-19 20:16:38
arp.h
Blame
History
Raw
/* BlueDataDistributor - data distribution module from ethernet to 32 serial ports * version 0.1.1 date 2006-10-07 * Copyright (C) 2006 Stefan Schuermans <stefan@blinkenarea.org> * a BlinkenArea project - http://www.blinkenarea.org/ */ #ifndef INC_arp #define INC_arp #include "ethernet.h" // header of an ARP packet struct ArpHeader { unsigned short HwType; unsigned short ProtoType; unsigned char HwLen; unsigned char ProtoLen; unsigned short Op; unsigned char SrcMac[6]; unsigned char SrcIp[4]; unsigned char DestMac[6]; unsigned char DestIp[4]; }; // an ARP packet struct ArpPacket { struct EthernetHeader EthHdr; struct ArpHeader ArpHdr; }; // initialize extern void ArpInit( void ); // tick procedure - call every 200ms extern void ArpTick200( void ); // process a received ARP packet extern void ArpRecv( unsigned char * pData, unsigned short Length ); // lookup the MAC for an IP address // returns 0x00 in case of success, 0x01 if the MAC address is unknown extern unsigned char ArpLookup( unsigned char * pIp, unsigned char * pMac ); #endif // #ifdef INC_arp