- refactored network

git-svn-id: http://moon:8086/svn/mips@204 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
2021-11-23 19:29:51 +00:00
parent 2b04dc86da
commit 794bd38593
20 changed files with 1 additions and 1 deletions
+36
View File
@@ -0,0 +1,36 @@
// -------------------------------------------------------------------------
// udp.h
//
// 29.12.2003, J. Ahrensfeld
//
// -------------------------------------------------------------------------
#ifndef UDP_H
#define UDP_H
#include "libsys.h"
#include "ethernet.h"
// -------------------------------------------------------------------------
typedef struct _sUDP
{
uint16_t src_port;
uint16_t dst_port;
uint16_t len;
uint16_t chksum;
} __attribute__ ((__packed__)) UDP;
typedef struct _sUDPPP
{
uint8_t inet_addr_src[4];
uint8_t inet_addr_dst[4];
uint8_t zero;
uint8_t proto;
uint16_t len;
} __attribute__ ((__packed__)) UDPPP;
// -------------------------------------------------------------------------
uint8_t *UDP_create(packet_t *pPacket, uint8_t *inet_addr_src, uint16_t port_src, uint8_t *inet_addr_dst, uint16_t port_dst, uint8_t *pUDP_payload, uint16_t len);
// -------------------------------------------------------------------------
#endif // UDP_H