• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src/router/samba-3.0.25b/source/lib/replace/system/
1#ifndef _system_network_h
2#define _system_network_h
3/*
4   Unix SMB/CIFS implementation.
5
6   networking system include wrappers
7
8   Copyright (C) Andrew Tridgell 2004
9
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.
14
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.
19
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.
23*/
24
25#ifdef HAVE_SYS_SOCKET_H
26#include <sys/socket.h>
27#endif
28
29#ifdef HAVE_UNIXSOCKET
30#include <sys/un.h>
31#endif
32
33#ifdef HAVE_NETINET_IN_H
34#include <netinet/in.h>
35#endif
36#ifdef HAVE_ARPA_INET_H
37#include <arpa/inet.h>
38#endif
39
40#ifdef HAVE_NETDB_H
41#include <netdb.h>
42#endif
43
44#ifdef HAVE_NETINET_TCP_H
45#include <netinet/tcp.h>
46#endif
47
48/*
49 * The next three defines are needed to access the IPTOS_* options
50 * on some systems.
51 */
52
53#ifdef HAVE_NETINET_IN_SYSTM_H
54#include <netinet/in_systm.h>
55#endif
56
57#ifdef HAVE_NETINET_IN_IP_H
58#include <netinet/in_ip.h>
59#endif
60
61#ifdef HAVE_NETINET_IP_H
62#include <netinet/ip.h>
63#endif
64
65#ifdef HAVE_NET_IF_H
66#include <net/if.h>
67#endif
68
69#ifdef HAVE_UNISTD_H
70#include <unistd.h>
71#endif
72
73#ifdef HAVE_SYS_IOCTL_H
74#include <sys/ioctl.h>
75#endif
76
77#ifdef SOCKET_WRAPPER
78#ifndef SOCKET_WRAPPER_NOT_REPLACE
79#define SOCKET_WRAPPER_REPLACE
80#endif
81#include "lib/socket_wrapper/socket_wrapper.h"
82#endif
83
84#ifdef REPLACE_INET_NTOA
85char *rep_inet_ntoa(struct in_addr ip);
86#define inet_ntoa rep_inet_ntoa
87#endif
88
89/*
90 * glibc on linux doesn't seem to have MSG_WAITALL
91 * defined. I think the kernel has it though..
92 */
93#ifndef MSG_WAITALL
94#define MSG_WAITALL 0
95#endif
96
97/*
98 * Some older systems seem not to have MAXHOSTNAMELEN
99 * defined.
100 */
101#ifndef MAXHOSTNAMELEN
102#define MAXHOSTNAMELEN 254
103#endif
104
105#ifndef INADDR_LOOPBACK
106#define INADDR_LOOPBACK 0x7f000001
107#endif
108
109#ifndef INADDR_NONE
110#define INADDR_NONE 0xffffffff
111#endif
112
113#endif
114