source: trunk/minix/servers/inet/inet_config.h@ 9

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

Minix 3.1.2a

File size: 2.2 KB
Line 
1/*
2inet/inet_config.h
3
4Created: Nov 11, 1992 by Philip Homburg
5
6Defines values for configurable parameters. The structure definitions for
7configuration information are also here.
8
9Copyright 1995 Philip Homburg
10*/
11
12#ifndef INET__INET_CONFIG_H
13#define INET__INET_CONFIG_H
14
15/* Inet configuration file. */
16#define PATH_INET_CONF "/etc/inet.conf"
17
18#define IP_PORT_MAX 32 /* Up to this many network devices */
19extern int eth_conf_nr; /* Number of ethernets */
20extern int psip_conf_nr; /* Number of Pseudo IP networks */
21extern int ip_conf_nr; /* Number of configured IP layers */
22extern int tcp_conf_nr; /* Number of configured TCP layers */
23extern int udp_conf_nr; /* Number of configured UDP layers */
24
25extern dev_t ip_dev; /* Device number of /dev/ip */
26
27struct eth_conf
28{
29 char *ec_task; /* Kernel ethernet task name if nonnull */
30 u8_t ec_port; /* Task port (!vlan) or Ethernet port (vlan) */
31 u8_t ec_ifno; /* Interface number of /dev/eth* */
32 u16_t ec_vlan; /* VLAN number of this net if task == NULL */
33};
34#define eth_is_vlan(ecp) ((ecp)->ec_task == NULL)
35
36struct psip_conf
37{
38 u8_t pc_ifno; /* Interface number of /dev/psip* */
39};
40
41struct ip_conf
42{
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* */
46};
47
48struct tcp_conf
49{
50 u8_t tc_port; /* IP port number */
51};
52
53struct udp_conf
54{
55 u8_t uc_port; /* IP port number */
56};
57
58/* Types of networks. */
59#define NETTYPE_ETH 1
60#define NETTYPE_PSIP 2
61
62/* To compute the minor device number for a device on an interface. */
63#define if2minor(ifno, dev) ((ifno) * 8 + (dev))
64
65/* Offsets of the minor device numbers within a group per interface. */
66#define ETH_DEV_OFF 0
67#define PSIP_DEV_OFF 0
68#define IP_DEV_OFF 1
69#define TCP_DEV_OFF 2
70#define UDP_DEV_OFF 3
71
72extern struct eth_conf eth_conf[IP_PORT_MAX];
73extern struct psip_conf psip_conf[IP_PORT_MAX];
74extern struct ip_conf ip_conf[IP_PORT_MAX];
75extern struct tcp_conf tcp_conf[IP_PORT_MAX];
76extern struct udp_conf udp_conf[IP_PORT_MAX];
77void read_conf(void);
78extern char *sbrk(int);
79void *alloc(size_t size);
80
81/* Options */
82extern int ip_forward_directed_bcast;
83
84#endif /* INET__INET_CONFIG_H */
85
86/*
87 * $PchId: inet_config.h,v 1.10 2003/08/21 09:24:33 philip Exp $
88 */
Note: See TracBrowser for help on using the repository browser.