BlinkenArea - GitList
Repositories
Blog
Wiki
flaneth
Code
Commits
Branches
Tags
Search
Tree:
d48e86e
Branches
Tags
master
flaneth
firmware
udp.h
header fix
Stefan Schuermans
commited
d48e86e
at 2012-05-02 18:39:39
udp.h
Blame
History
Raw
/* flaneth - flash and ethernet Copyright (C) 2007-2012 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