BlinkenArea - GitList
Repositories
Blog
Wiki
flaneth
Code
Commits
Branches
Tags
Search
Tree:
2342395
Branches
Tags
master
flaneth
firmware
udp.h
change email address in header to blinkenarea address
Stefan Schuermans
commited
2342395
at 2012-05-22 19:18:57
udp.h
Blame
History
Raw
/* flaneth - flash and ethernet Copyright (C) 2007-2012 Stefan Schuermans <stefan@blinkenarea.org> 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