use the -newos toolchain even if -elf is present.
[newos.git] / include / kernel / net / udp.h
blobff54c034f41d52673a74bd22b04201e801843b9d
1 /*
2 ** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
3 ** Distributed under the terms of the NewOS License.
4 */
5 #ifndef _NEWOS_KERNEL_NET_UDP_H
6 #define _NEWOS_KERNEL_NET_UDP_H
8 #include <kernel/net/if.h>
9 #include <kernel/net/ipv4.h>
10 #include <kernel/net/socket.h>
11 #include <kernel/cbuf.h>
13 int udp_input(cbuf *buf, ifnet *i, ipv4_addr source_address, ipv4_addr target_address);
14 int udp_open(void **prot_data);
15 int udp_bind(void *prot_data, sockaddr *addr);
16 int udp_connect(void *prot_data, sockaddr *addr);
17 int udp_listen(void *prot_data);
18 int udp_accept(void *prot_data, sockaddr *addr, void **new_socket);
19 int udp_close(void *prot_data);
20 ssize_t udp_recvfrom(void *prot_data, void *buf, ssize_t len, sockaddr *saddr, int flags, bigtime_t timeout);
21 ssize_t udp_sendto(void *prot_data, const void *buf, ssize_t len, sockaddr *addr);
22 int udp_init(void);
24 #endif