]> The Tcpdump Group git mirrors - tcpdump/blob - tcpdump-stdinc.h
Make "mobility_opt_print()" static, as it's not used outside
[tcpdump] / tcpdump-stdinc.h
1 /*
2 * Copyright (c) 2002
3 * Politecnico di Torino. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that: (1) source code distributions
7 * retain the above copyright notice and this paragraph in its entirety, (2)
8 * distributions including binary code include the above copyright notice and
9 * this paragraph in its entirety in the documentation or other materials
10 * provided with the distribution, and (3) all advertising materials mentioning
11 * features or use of this software display the following acknowledgement:
12 * ``This product includes software developed by the Politecnico
13 * di Torino, and its contributors.'' Neither the name of
14 * the University nor the names of its contributors may be used to endorse
15 * or promote products derived from this software without specific prior
16 * written permission.
17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 */
21
22 #ifdef WIN32
23
24 #include <winsock2.h>
25 #include "bittypes.h"
26 #include <time.h>
27 #include <io.h>
28 #include "IP6_misc.h"
29 #include <fcntl.h>
30
31 #ifdef __MINGW32__
32 int* _errno();
33 #define errno (*_errno())
34
35 #define INET_ADDRSTRLEN 16
36 #define INET6_ADDRSTRLEN 46
37
38 #endif /* __MINGW32__ */
39
40 #ifndef caddr_t
41 typedef char* caddr_t;
42 #endif /* caddr_t */
43
44 #define MAXHOSTNAMELEN 64
45 #define NI_MAXHOST 1025
46 #define IPPROTO_EGP 8 /* Exterior Gateway Protocol */
47 #define snprintf _snprintf
48 #define vsnprintf _vsnprintf
49 #define RETSIGTYPE void
50
51 #ifndef __MINGW32__
52 #define isascii __isascii
53 #define toascii __toascii
54 #define stat _stat
55 #define open _open
56 #define fstat _fstat
57 #define read _read
58 #define O_RDONLY _O_RDONLY
59
60 typedef short ino_t;
61 #endif
62
63 #else
64
65 #include <ctype.h>
66 #include <unistd.h>
67 #include <netdb.h>
68 #include <sys/socket.h>
69 #include <sys/param.h>
70 #include <sys/types.h>
71 #include <sys/time.h>
72 #include <net/if.h>
73 #include <netinet/in.h>
74 #include <sys/file.h>
75 #include <sys/ioctl.h>
76 #include <sys/uio.h>
77
78 #ifdef HAVE_SYS_SOCKIO_H
79 #include <sys/sockio.h>
80 #include <arpa/inet.h>
81 #endif /* HAVE_SYS_SOCKIO_H */
82
83 #endif
84
85 #ifdef INET6
86 #include "ip6.h"
87 #endif