test41: relax maximum timer tick rate
[minix.git] / servers / inet / inet_config.h
blob25326e36944b0494b8c4574a80bf35edcee2dbca
1 /*
2 inet/inet_config.h
4 Created: Nov 11, 1992 by Philip Homburg
6 Defines values for configurable parameters. The structure definitions for
7 configuration information are also here.
9 Copyright 1995 Philip Homburg
12 #ifndef INET__INET_CONFIG_H
13 #define INET__INET_CONFIG_H
15 /* Inet configuration file. */
16 #define PATH_INET_CONF "/etc/inet.conf"
18 #define IP_PORT_MAX 32 /* Up to this many network devices */
19 extern int eth_conf_nr; /* Number of ethernets */
20 extern int psip_conf_nr; /* Number of Pseudo IP networks */
21 extern int ip_conf_nr; /* Number of configured IP layers */
22 extern int tcp_conf_nr; /* Number of configured TCP layers */
23 extern int udp_conf_nr; /* Number of configured UDP layers */
25 extern dev_t ip_dev; /* Device number of /dev/ip */
27 struct eth_conf
29 char *ec_label; /* Process label name if nonnull */
30 u8_t ec_port; /* Ethernet port for VLAN if label == NULL */
31 u8_t ec_ifno; /* Interface number of /dev/eth* */
32 u16_t ec_vlan; /* VLAN number of this net if label == NULL */
34 #define eth_is_vlan(ecp) ((ecp)->ec_label == NULL)
36 struct psip_conf
38 u8_t pc_ifno; /* Interface number of /dev/psip* */
41 struct ip_conf
43 u8_t ic_devtype; /* Underlying device type: Ethernet / PSIP */
44 u8_t ic_port; /* Port of underlying device */
45 u8_t ic_ifno; /* Interface number of /dev/ip*, tcp*, udp* */
48 struct tcp_conf
50 u8_t tc_port; /* IP port number */
53 struct udp_conf
55 u8_t uc_port; /* IP port number */
58 /* Types of networks. */
59 #define NETTYPE_ETH 1
60 #define NETTYPE_PSIP 2
62 /* To compute the minor device number for a device on an interface. */
63 #define if2minor(ifno, dev) (1 + (ifno) * 8 + (dev))
65 #define IPSTAT_DEV "/dev/ipstat"
66 #define IPSTAT_MODE 0666 /* Is this right? What about just setuid apps */
67 #define IPSTAT_MINOR 0 /* Minor number of /dev/ipstat */
69 /* Offsets of the minor device numbers within a group per interface. */
70 #define ETH_DEV_OFF 0
71 #define PSIP_DEV_OFF 0
72 #define IP_DEV_OFF 1
73 #define TCP_DEV_OFF 2
74 #define UDP_DEV_OFF 3
76 extern struct eth_conf eth_conf[IP_PORT_MAX];
77 extern struct psip_conf psip_conf[IP_PORT_MAX];
78 extern struct ip_conf ip_conf[IP_PORT_MAX];
79 extern struct tcp_conf tcp_conf[IP_PORT_MAX];
80 extern struct udp_conf udp_conf[IP_PORT_MAX];
81 void read_conf(void);
82 #ifdef __NBSD_LIBC
83 extern void *sbrk(int);
84 #else
85 extern char *sbrk(int);
86 #endif
87 void *alloc(size_t size);
89 /* Options */
90 extern int ip_forward_directed_bcast;
92 #ifdef __NBSD_LIBC
93 #undef HTONL
94 #undef HTONS
95 #define HTONL htonl
96 #define HTONS htons
97 #endif
99 #endif /* INET__INET_CONFIG_H */
102 * $PchId: inet_config.h,v 1.10 2003/08/21 09:24:33 philip Exp $