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 2 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, write to the Free Software
26 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30 #ifdef HAVE_SYS_SOCKET_H
31 #include <sys/socket.h>
34 #ifdef HAVE_UNIXSOCKET
38 #ifdef HAVE_NETINET_IN_H
39 #include <netinet/in.h>
41 #ifdef HAVE_ARPA_INET_H
42 #include <arpa/inet.h>
49 #ifdef HAVE_NETINET_TCP_H
50 #include <netinet/tcp.h>
54 * The next three defines are needed to access the IPTOS_* options
58 #ifdef HAVE_NETINET_IN_SYSTM_H
59 #include <netinet/in_systm.h>
62 #ifdef HAVE_NETINET_IN_IP_H
63 #include <netinet/in_ip.h>
66 #ifdef HAVE_NETINET_IP_H
67 #include <netinet/ip.h>
78 #ifdef HAVE_SYS_IOCTL_H
79 #include <sys/ioctl.h>
83 #ifndef SOCKET_WRAPPER_NOT_REPLACE
84 #define SOCKET_WRAPPER_REPLACE
86 #include "lib/socket_wrapper/socket_wrapper.h"
89 #ifdef REPLACE_INET_NTOA
90 char *rep_inet_ntoa(struct in_addr ip);
91 #define inet_ntoa rep_inet_ntoa
95 * glibc on linux doesn't seem to have MSG_WAITALL
96 * defined. I think the kernel has it though..
103 * Some older systems seem not to have MAXHOSTNAMELEN
106 #ifndef MAXHOSTNAMELEN
107 #define MAXHOSTNAMELEN 254
110 #ifndef INADDR_LOOPBACK
111 #define INADDR_LOOPBACK 0x7f000001
115 #define INADDR_NONE 0xffffffff