BlinkenArea - GitList
Repositories
Blog
Wiki
flaneth
Code
Commits
Branches
Tags
Search
Tree:
e8658d5
Branches
Tags
master
flaneth
firmware.dartboard
arp.h
initial commit after making CF identify work
Stefan Schuermans
commited
e8658d5
at 2012-04-15 19:57:57
arp.h
Blame
History
Raw
/* flaneth - flash and ethernet - dartboard mod * version 0.1 date 2008-11-09 * Copyright (C) 2007-2008 Stefan Schuermans <stefan@schuermans.info> * Copyleft: GNU public license V2 - http://www.gnu.org/copyleft/gpl.html * 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