udp.h
来自「mc51单片机对rtl8019编程,实现ethernet的收发控制.」· C头文件 代码 · 共 36 行
H
36 行
/*********************************************************
** FILE:
** udp.h
** DESCRIPTION:
** Define function for udp.
** NOTES:
** Copyright(c) 2002 Luo Cheng , All rights reserved.
** HISTORY:
** Version Date Author
** 1.0 2004/5/7 Luo Cheng
**
*********************************************************/
#ifndef UDP_H
#define UDP_H
#include "ctype.h"
typedef struct{
Uint16 source;
Uint16 dest;
Uint16 len;
Uint16 check;
}Udphdr_struc ;
#define MAX_DUP_BUFFER_LENGTH 500
#define MAX_DUP_BUFFER_COUNT 4
void udp_process(Uint8 *pbuf);
Bool udp_open(Uint8 *pip,Uint16 port_local,Uint16 port_remote);
void udp_close();
Bool udp_sendto(Uint8 *pip,Uint16 remote_port,Uint8 *pbuf,Uint16 length);
Bool udp_send(Uint8 *pbuf,Uint16 length);
Uint16 udp_recv(Uint8 *pbuf,Uint16 length);
void tick();
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?