Files
mips/src/common/network/udp.h
T
jens 794bd38593 - refactored network
git-svn-id: http://moon:8086/svn/mips@204 a8ebac50-d88d-4704-bea3-6648445a41b3
2021-11-23 19:29:51 +00:00

37 lines
1015 B
C

// -------------------------------------------------------------------------
// 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