source: trunk/minix/servers/inet/inet.h@ 20

Last change on this file since 20 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 2.4 KB
Line 
1/*
2inet/inet.h
3
4Created: Dec 30, 1991 by Philip Homburg
5
6Copyright 1995 Philip Homburg
7*/
8
9#ifndef INET__INET_H
10#define INET__INET_H
11
12#define _SYSTEM 1 /* get OK and negative error codes */
13
14#include <sys/types.h>
15#include <errno.h>
16#include <stddef.h>
17#include <stdlib.h>
18#include <string.h>
19
20#ifdef __minix_vmd
21
22#include <minix/ansi.h>
23#include <minix/cfg_public.h>
24#include <minix/type.h>
25
26#else /* Assume at least Minix 3.x */
27
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>
33
34#define _NORETURN /* Should be non empty for GCC */
35
36typedef int ioreq_t;
37
38#endif
39
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>
64
65#include <net/gen/arp_io.h>
66#include <net/ioctl.h>
67
68#include "const.h"
69#include "inet_config.h"
70
71#define PUBLIC
72#define EXTERN extern
73#define PRIVATE static
74#define FORWARD static
75
76#define THIS_FILE static char *this_file= __FILE__;
77
78_PROTOTYPE( void panic0, (char *file, int line) );
79_PROTOTYPE( void inet_panic, (void) ) _NORETURN;
80
81#define ip_panic(print_list) \
82 (panic0(this_file, __LINE__), printf print_list, panic())
83#define panic() inet_panic()
84
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() \
92 )
93#else
94#define ip_warning(print_list) ((void) 0)
95#endif
96
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)
102
103#if _ANSI
104#define ARGS(x) x
105#else /* _ANSI */
106#define ARGS(x) ()
107#endif /* _ANSI */
108
109extern int this_proc;
110extern char version[];
111
112void stacktrace ARGS(( void ));
113
114#endif /* INET__INET_H */
115
116/*
117 * $PchId: inet.h,v 1.16 2005/06/28 14:27:54 philip Exp $
118 */
Note: See TracBrowser for help on using the repository browser.