1 #ifndef _system_network_h
2 #define _system_network_h
4 Unix SMB/CIFS implementation.
6 networking system include wrappers
8 Copyright (C) Andrew Tridgell 2004
10 ** NOTE! The following LGPL license applies to the replace
11 ** library. This does NOT imply that all of Samba is released
14 This library is free software; you can redistribute it and/or
15 modify it under the terms of the GNU Lesser General Public
16 License as published by the Free Software Foundation; either
17 version 3 of the License, or (at your option) any later version.
19 This library is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 Lesser General Public License for more details.
24 You should have received a copy of the GNU Lesser General Public
25 License along with this library; if not, see <http://www.gnu.org/licenses/>.
29 #ifdef HAVE_SYS_SOCKET_H
30 #include <sys/socket.h>
33 #ifdef HAVE_UNIXSOCKET
37 #ifdef HAVE_NETINET_IN_H
38 #include <netinet/in.h>
40 #ifdef HAVE_ARPA_INET_H
41 #include <arpa/inet.h>
48 #ifdef HAVE_NETINET_TCP_H
49 #include <netinet/tcp.h>
53 * The next three defines are needed to access the IPTOS_* options
57 #ifdef HAVE_NETINET_IN_SYSTM_H
58 #include <netinet/in_systm.h>
61 #ifdef HAVE_NETINET_IN_IP_H
62 #include <netinet/in_ip.h>
65 #ifdef HAVE_NETINET_IP_H
66 #include <netinet/ip.h>
77 #ifdef HAVE_SYS_IOCTL_H
78 #include <sys/ioctl.h>
82 #ifndef SOCKET_WRAPPER_NOT_REPLACE
83 #define SOCKET_WRAPPER_REPLACE
85 #include "lib/socket_wrapper/socket_wrapper.h"
88 #ifdef REPLACE_INET_NTOA
89 char *rep_inet_ntoa(struct in_addr ip);
90 #define inet_ntoa rep_inet_ntoa
94 * glibc on linux doesn't seem to have MSG_WAITALL
95 * defined. I think the kernel has it though..
102 * Some older systems seem not to have MAXHOSTNAMELEN
105 #ifndef MAXHOSTNAMELEN
106 #define MAXHOSTNAMELEN 254
109 #ifndef INADDR_LOOPBACK
110 #define INADDR_LOOPBACK 0x7f000001
114 #define INADDR_NONE 0xffffffff