00001 /* 00002 inet/inet_config.h 00003 00004 Created: Nov 11, 1992 by Philip Homburg 00005 00006 Defines values for configurable parameters. The structure definitions for 00007 configuration information are also here. 00008 00009 Copyright 1995 Philip Homburg 00010 */ 00011 00012 #ifndef INET__INET_CONFIG_H 00013 #define INET__INET_CONFIG_H 00014 00015 /* Inet configuration file. */ 00016 #define PATH_INET_CONF "/etc/inet.conf" 00017 00018 #define IP_PORT_MAX 32 /* Up to this many network devices */ 00019 extern int eth_conf_nr; /* Number of ethernets */ 00020 extern int psip_conf_nr; /* Number of Pseudo IP networks */ 00021 extern int ip_conf_nr; /* Number of configured IP layers */ 00022 extern int tcp_conf_nr; /* Number of configured TCP layers */ 00023 extern int udp_conf_nr; /* Number of configured UDP layers */ 00024 00025 extern dev_t ip_dev; /* Device number of /dev/ip */ 00026 00027 struct eth_conf 00028 { 00029 char *ec_task; /* Kernel ethernet task name if nonnull */ 00030 u8_t ec_port; /* Task port (!vlan) or Ethernet port (vlan) */ 00031 u8_t ec_ifno; /* Interface number of /dev/eth* */ 00032 u16_t ec_vlan; /* VLAN number of this net if task == NULL */ 00033 }; 00034 #define eth_is_vlan(ecp) ((ecp)->ec_task == NULL) 00035 00036 struct psip_conf 00037 { 00038 u8_t pc_ifno; /* Interface number of /dev/psip* */ 00039 }; 00040 00041 struct ip_conf 00042 { 00043 u8_t ic_devtype; /* Underlying device type: Ethernet / PSIP */ 00044 u8_t ic_port; /* Port of underlying device */ 00045 u8_t ic_ifno; /* Interface number of /dev/ip*, tcp*, udp* */ 00046 }; 00047 00048 struct tcp_conf 00049 { 00050 u8_t tc_port; /* IP port number */ 00051 }; 00052 00053 struct udp_conf 00054 { 00055 u8_t uc_port; /* IP port number */ 00056 }; 00057 00058 /* Types of networks. */ 00059 #define NETTYPE_ETH 1 00060 #define NETTYPE_PSIP 2 00061 00062 /* To compute the minor device number for a device on an interface. */ 00063 #define if2minor(ifno, dev) ((ifno) * 8 + (dev)) 00064 00065 /* Offsets of the minor device numbers within a group per interface. */ 00066 #define ETH_DEV_OFF 0 00067 #define PSIP_DEV_OFF 0 00068 #define IP_DEV_OFF 1 00069 #define TCP_DEV_OFF 2 00070 #define UDP_DEV_OFF 3 00071 00072 extern struct eth_conf eth_conf[IP_PORT_MAX]; 00073 extern struct psip_conf psip_conf[IP_PORT_MAX]; 00074 extern struct ip_conf ip_conf[IP_PORT_MAX]; 00075 extern struct tcp_conf tcp_conf[IP_PORT_MAX]; 00076 extern struct udp_conf udp_conf[IP_PORT_MAX]; 00077 void read_conf(void); 00078 extern char *sbrk(int); 00079 void *alloc(size_t size); 00080 00081 /* Options */ 00082 extern int ip_forward_directed_bcast; 00083 00084 #endif /* INET__INET_CONFIG_H */ 00085 00086 /* 00087 * $PchId: inet_config.h,v 1.10 2003/08/21 09:24:33 philip Exp $ 00088 */
1.4.6