1 | /*
|
---|
2 | inet/inet_config.h
|
---|
3 |
|
---|
4 | Created: Nov 11, 1992 by Philip Homburg
|
---|
5 |
|
---|
6 | Defines values for configurable parameters. The structure definitions for
|
---|
7 | configuration information are also here.
|
---|
8 |
|
---|
9 | Copyright 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 */
|
---|
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 */
|
---|
24 |
|
---|
25 | extern dev_t ip_dev; /* Device number of /dev/ip */
|
---|
26 |
|
---|
27 | struct 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 |
|
---|
36 | struct psip_conf
|
---|
37 | {
|
---|
38 | u8_t pc_ifno; /* Interface number of /dev/psip* */
|
---|
39 | };
|
---|
40 |
|
---|
41 | struct 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 |
|
---|
48 | struct tcp_conf
|
---|
49 | {
|
---|
50 | u8_t tc_port; /* IP port number */
|
---|
51 | };
|
---|
52 |
|
---|
53 | struct 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 |
|
---|
72 | extern struct eth_conf eth_conf[IP_PORT_MAX];
|
---|
73 | extern struct psip_conf psip_conf[IP_PORT_MAX];
|
---|
74 | extern struct ip_conf ip_conf[IP_PORT_MAX];
|
---|
75 | extern struct tcp_conf tcp_conf[IP_PORT_MAX];
|
---|
76 | extern struct udp_conf udp_conf[IP_PORT_MAX];
|
---|
77 | void read_conf(void);
|
---|
78 | extern char *sbrk(int);
|
---|
79 | void *alloc(size_t size);
|
---|
80 |
|
---|
81 | /* Options */
|
---|
82 | extern 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 | */
|
---|