1/*
2 * Copyright 2019, Data61
3 * Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4 * ABN 41 687 119 230.
5 *
6 * This software may be distributed and modified according to the terms of
7 * the GNU General Public License version 2. Note that NO WARRANTY is provided.
8 * See "LICENSE_GPLv2.txt" for details.
9 *
10 * @TAG(DATA61_GPL)
11 */
12
13procedure PicoRecv {
14    int read(in int socket_fd, in int len, in int buffer_offset);
15    int recv(in int socket_fd, in int len, in int buffer_offset);
16    /* 
17     * src_addr will be returned in network order, (1.2.3.4 -> 0x04030201), 
18     * remote_port in non-network order (port 9000 -> (uint16_t) 9000)
19     */
20    int recvfrom(in int socket_fd, in int len, in int buffer_offset, out uint32_t src_addr, out uint16_t remote_port);
21};
22