BlinkenArea - GitList
Repositories
Blog
Wiki
flaneth
Code
Commits
Branches
Tags
Search
Tree:
e8658d5
Branches
Tags
master
flaneth
firmware.dartboard
udp.h
initial commit after making CF identify work
Stefan Schuermans
commited
e8658d5
at 2012-04-15 19:57:57
udp.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_udp #define INC_udp #include "ethernet.h" #include "ip.h" // header of an UDP packet struct UdpHeader { unsigned int SrcPort; unsigned int DestPort; unsigned int Length; unsigned int Chk; }; // an UDP packet struct UdpPacket { struct EthernetHeader EthHdr; struct IpHeader IpHdr; struct UdpHeader UdpHdr; }; // tick procedure - call every 200ms extern void UdpTick200( void ); // process a received UDP packet extern void UdpRecv( unsigned char * pData, unsigned short Length ); // send an UDP packet // pData must point to a struct UdpPacket with UdpHdr.SrcPort, UdpHdr.DestPort and IpHdr.Dest already initialized extern void UdpSend( unsigned char * pData, unsigned short Length ); #endif // #ifdef INC_udp