PXELINUX: Use sendto() instead of connect()/send()/disconnect()
[syslinux.git] / core / include / net.h
blobf970ab0f3aa68211a5ac9c28097821e9dfa46edd
1 #ifndef _NET_H
2 #define _NET_H
4 #include <stdint.h>
5 #include <stddef.h>
7 /* Protocol family */
8 enum net_core_proto {
9 NET_CORE_TCP,
10 NET_CORE_UDP,
13 void net_core_init(void);
15 struct pxe_pvt_inode;
17 int net_core_open(struct pxe_pvt_inode *socket, enum net_core_proto proto);
18 void net_core_close(struct pxe_pvt_inode *socket);
20 void net_core_connect(struct pxe_pvt_inode *socket,
21 uint32_t ip, uint16_t port);
22 void net_core_disconnect(struct pxe_pvt_inode *socket);
24 int net_core_recv(struct pxe_pvt_inode *socket, void *buf, uint16_t *buf_len,
25 uint32_t *src_ip, uint16_t *src_port);
27 void net_core_send(struct pxe_pvt_inode *socket,
28 const void *data, size_t len);
30 void net_core_sendto(struct pxe_pvt_inode *socket, const void *data, size_t len,
31 uint32_t ip, uint16_t port);
33 void probe_undi(void);
34 void pxe_init_isr(void);
36 #endif /* _NET_H */