www.pudn.com > 8051_pppsrc.zip > UDP.H, change:2001-03-08,size:977b
/*/////////////////////////////////////////////////////////////////////////////
File Name : UDP.h
Author : Rene Trenado
Location : Motorola Applications Lab, Baja California
Date Created : December 2001
Current Revision : 0.0
Notes : This file contains definitions needed by the UDP module.
//////////////////////////////////////////////////////////////////////////////*/
#ifndef __UDP_H
#define __UDP_H
#include "Notation.h"
typedef struct {
BYTE SourceIP [4];
BYTE DestinationIP [4];
WORD SourcePort;
WORD DestPort;
BYTE LengthUpper;
BYTE Length;
WORD Checksum;
BYTE Payload[54];
} UDPDatagram;
extern UDPDatagram *udp_out;
typedef void (* UDPCALLBACK)(BYTE *data, BYTE size, DWORD RemoteIP, WORD Port);
void UDPSetCALLBACK (UDPCALLBACK Proc);
void UDP_Handler (UDPDatagram *udp);
WORD UDP_Checksum (BYTE* udp);
void UDPBind (WORD Port);
void UDPSendData (BYTE Ip[], WORD Port, BYTE* Payload, BYTE size);
#endif