- simplified DHCP
-added UdpAppend() git-svn-id: http://moon:8086/svn/mips@219 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Testing
|
||||
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)
|
||||
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, void const *pUDP_payload, uint16_t len)
|
||||
{
|
||||
uint16_t sum;
|
||||
UDP *pUDP;
|
||||
@@ -48,3 +48,13 @@ uint8_t *UDP_create(packet_t *pPacket, uint8_t *inet_addr_src, uint16_t port_src
|
||||
return pData;
|
||||
|
||||
}
|
||||
|
||||
void UDP_append(packet_t *pPacket, void const *pData, uint16_t len)
|
||||
{
|
||||
// Commit data
|
||||
if (pData)
|
||||
{
|
||||
memcpy(pPacket->pData, pData, len);
|
||||
Eth_pkt_append(pPacket, len);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user