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 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 #ifdef HAVE_SYS_SOCKET_H
26 #include <sys/socket.h>
29 #ifdef HAVE_UNIXSOCKET
33 #ifdef HAVE_NETINET_IN_H
34 #include <netinet/in.h>
36 #ifdef HAVE_ARPA_INET_H
37 #include <arpa/inet.h>
44 #ifdef HAVE_NETINET_TCP_H
45 #include <netinet/tcp.h>
49 * The next three defines are needed to access the IPTOS_* options
53 #ifdef HAVE_NETINET_IN_SYSTM_H
54 #include <netinet/in_systm.h>
57 #ifdef HAVE_NETINET_IN_IP_H
58 #include <netinet/in_ip.h>
61 #ifdef HAVE_NETINET_IP_H
62 #include <netinet/ip.h>
69 #ifdef HAVE_SYS_IOCTL_H
70 #include <sys/ioctl.h>
74 #ifndef SOCKET_WRAPPER_NOT_REPLACE
75 #define SOCKET_WRAPPER_REPLACE
77 #include "lib/socket_wrapper/socket_wrapper.h"
80 #ifdef REPLACE_INET_NTOA
81 char *rep_inet_ntoa(struct in_addr ip);
82 #define inet_ntoa rep_inet_ntoa
86 * glibc on linux doesn't seem to have MSG_WAITALL
87 * defined. I think the kernel has it though..
94 * Some older systems seem not to have MAXHOSTNAMELEN
97 #ifndef MAXHOSTNAMELEN
98 #define MAXHOSTNAMELEN 254
101 #ifndef INADDR_LOOPBACK
102 #define INADDR_LOOPBACK 0x7f000001
106 #define INADDR_NONE 0xffffffff