1 /* 2 * Copyright (c) 2009-2014, The Regents of the University of California, 3 * through Lawrence Berkeley National Laboratory (subject to receipt of any 4 * required approvals from the U.S. Dept. of Energy). All rights reserved. 5 * 6 * This code is distributed under a BSD style license, see the LICENSE file 7 * for complete information. 8 */ 9 10 #ifndef __NET_H 11 #define __NET_H 12 13 int netdial(int domain, int proto, char *local, char *server, int port); 14 int netannounce(int domain, int proto, char *local, int port); 15 int Nread(int fd, char *buf, size_t count, int prot); 16 int Nwrite(int fd, const char *buf, size_t count, int prot) /* __attribute__((hot)) */; 17 int has_sendfile(void); 18 int Nsendfile(int fromfd, int tofd, const char *buf, size_t count) /* __attribute__((hot)) */; 19 int getsock_tcp_mss(int inSock); 20 int set_tcp_options(int sock, int no_delay, int mss); 21 int setnonblocking(int fd, int nonblocking); 22 int getsockdomain(int sock); 23 24 #define NET_SOFTERROR -1 25 #define NET_HARDERROR -2 26 27 #endif /* __NET_H */ 28