. service tells you which device it couldn't stat
[minix3.git] / servers / inet / inet.h
blob61a8f6c39a143fdc1d7533989307428a25df2486
1 /*
2 inet/inet.h
4 Created: Dec 30, 1991 by Philip Homburg
6 Copyright 1995 Philip Homburg
7 */
9 #ifndef INET__INET_H
10 #define INET__INET_H
12 #define _SYSTEM 1 /* get OK and negative error codes */
14 #include <sys/types.h>
15 #include <errno.h>
16 #include <stddef.h>
17 #include <stdlib.h>
18 #include <string.h>
20 #ifdef __minix_vmd
22 #include <minix/ansi.h>
23 #include <minix/cfg_public.h>
24 #include <minix/type.h>
26 #else /* Assume at least Minix 3.x */
28 #include <unistd.h>
29 #include <sys/ioc_file.h>
30 #include <sys/time.h>
31 #include <minix/config.h>
32 #include <minix/type.h>
34 #define _NORETURN /* Should be non empty for GCC */
36 typedef int ioreq_t;
38 #endif
40 #include <minix/const.h>
41 #include <minix/com.h>
42 #include <minix/syslib.h>
43 #include <minix/sysutil.h>
44 #include <net/hton.h>
45 #include <net/gen/ether.h>
46 #include <net/gen/eth_hdr.h>
47 #include <net/gen/eth_io.h>
48 #include <net/gen/in.h>
49 #include <net/gen/ip_hdr.h>
50 #include <net/gen/ip_io.h>
51 #include <net/gen/icmp.h>
52 #include <net/gen/icmp_hdr.h>
53 #include <net/gen/oneCsum.h>
54 #include <net/gen/psip_hdr.h>
55 #include <net/gen/psip_io.h>
56 #include <net/gen/route.h>
57 #include <net/gen/tcp.h>
58 #include <net/gen/tcp.h>
59 #include <net/gen/tcp_hdr.h>
60 #include <net/gen/tcp_io.h>
61 #include <net/gen/udp.h>
62 #include <net/gen/udp_hdr.h>
63 #include <net/gen/udp_io.h>
65 #include <net/gen/arp_io.h>
66 #include <net/ioctl.h>
68 #include "const.h"
69 #include "inet_config.h"
71 #define PUBLIC
72 #define EXTERN extern
73 #define PRIVATE static
74 #define FORWARD static
76 #define THIS_FILE static char *this_file= __FILE__;
78 _PROTOTYPE( void panic0, (char *file, int line) );
79 _PROTOTYPE( void inet_panic, (void) ) _NORETURN;
81 #define ip_panic(print_list) \
82 (panic0(this_file, __LINE__), printf print_list, panic())
83 #define panic() inet_panic()
85 #if DEBUG
86 #define ip_warning(print_list) \
87 ( \
88 printf("warning at %s, %d: ", this_file, __LINE__), \
89 printf print_list, \
90 printf("\ninet stacktrace: "), \
91 stacktrace() \
93 #else
94 #define ip_warning(print_list) ((void) 0)
95 #endif
97 #define DBLOCK(level, code) \
98 do { if ((level) & DEBUG) { where(); code; } } while(0)
99 #define DIFBLOCK(level, condition, code) \
100 do { if (((level) & DEBUG) && (condition)) \
101 { where(); code; } } while(0)
103 #if _ANSI
104 #define ARGS(x) x
105 #else /* _ANSI */
106 #define ARGS(x) ()
107 #endif /* _ANSI */
109 extern int this_proc;
110 extern char version[];
112 void stacktrace ARGS(( void ));
114 #endif /* INET__INET_H */
117 * $PchId: inet.h,v 1.16 2005/06/28 14:27:54 philip Exp $