File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / iperf / src / net.h
Revision 1.1.1.3 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Wed Sep 27 11:14:54 2023 UTC (10 months ago) by misho
Branches: iperf, MAIN
CVS tags: v3_15, HEAD
Version 3.15

    1: /*
    2:  * iperf, Copyright (c) 2014, 2017, The Regents of the University of
    3:  * California, through Lawrence Berkeley National Laboratory (subject
    4:  * to receipt of any required approvals from the U.S. Dept. of
    5:  * Energy).  All rights reserved.
    6:  *
    7:  * If you have questions about your rights to use or distribute this
    8:  * software, please contact Berkeley Lab's Technology Transfer
    9:  * Department at TTD@lbl.gov.
   10:  *
   11:  * NOTICE.  This software is owned by the U.S. Department of Energy.
   12:  * As such, the U.S. Government has been granted for itself and others
   13:  * acting on its behalf a paid-up, nonexclusive, irrevocable,
   14:  * worldwide license in the Software to reproduce, prepare derivative
   15:  * works, and perform publicly and display publicly.  Beginning five
   16:  * (5) years after the date permission to assert copyright is obtained
   17:  * from the U.S. Department of Energy, and subject to any subsequent
   18:  * five (5) year renewals, the U.S. Government is granted for itself
   19:  * and others acting on its behalf a paid-up, nonexclusive,
   20:  * irrevocable, worldwide license in the Software to reproduce,
   21:  * prepare derivative works, distribute copies to the public, perform
   22:  * publicly and display publicly, and to permit others to do so.
   23:  *
   24:  * This code is distributed under a BSD style license, see the LICENSE
   25:  * file for complete information.
   26:  */
   27: #ifndef __NET_H
   28: #define __NET_H
   29: 
   30: int timeout_connect(int s, const struct sockaddr *name, socklen_t namelen, int timeout);
   31: int create_socket(int domain, int proto, const char *local, const char *bind_dev, int local_port, const char *server, int port, struct addrinfo **server_res_out);
   32: int netdial(int domain, int proto, const char *local, const char *bind_dev, int local_port, const char *server, int port, int timeout);
   33: int netannounce(int domain, int proto, const char *local, const char *bind_dev, int port);
   34: int Nread(int fd, char *buf, size_t count, int prot);
   35: int Nwrite(int fd, const char *buf, size_t count, int prot) /* __attribute__((hot)) */;
   36: int has_sendfile(void);
   37: int Nsendfile(int fromfd, int tofd, const char *buf, size_t count) /* __attribute__((hot)) */;
   38: int setnonblocking(int fd, int nonblocking);
   39: int getsockdomain(int sock);
   40: int parse_qos(const char *tos);
   41: 
   42: #define NET_SOFTERROR -1
   43: #define NET_HARDERROR -2
   44: 
   45: #endif /* __NET_H */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>