|
ginnOS
The reference: libc, the libraries and the kernel
|
#include "udp.h"#include "byteorder.h"#include "checksum.h"#include "common/memory.h"#include "icmp.h"#include "inet_socket.h"Functions | |
| void | udp_receive (netif_t *netif, const ipv4_header_t *ip, const uint8_t *d, uint32_t length) |
| a received UDP datagram (net_lock held): checks it and gives it to the socket for its port, or answers "port unreachable". | |
| bool | udp_send (uint32_t source, uint16_t source_port, uint32_t dst, uint16_t dst_port, uint8_t *d, uint32_t length) |
| send a datagram (net_lock held). | |
UDP (see udp.h).
a received UDP datagram (net_lock held): checks it and gives it to the socket for its port, or answers "port unreachable".
| bool udp_send | ( | uint32_t | source, |
| uint16_t | source_port, | ||
| uint32_t | dst, | ||
| uint16_t | dst_port, | ||
| uint8_t * | datagram, | ||
| uint32_t | length ) |
send a datagram (net_lock held).
the first UDP_HEADER_SIZE bytes of datagram are the room for the header, which this fills in.
| source | the source address, or 0 for the address of the interface the datagram goes out on. |
| length | the length with the header. |