Please wait until the page is fully downloaded and then press the "Expand" button or the blue line numbers.

0009001 /*
0009002 inet/inet_config.h
0009003 
0009004 Created:       Nov 11, 1992 by Philip Homburg
0009005 
0009006 Defines values for configurable parameters. The structure definitions for
0009007 configuration information are also here.
0009008 
0009009 Copyright 1995 Philip Homburg
0009010 */
0009011 
0009012 #ifndef INET__INET_CONFIG_H
0009013 #define INET__INET_CONFIG_H
0009014 
0009015 #define ENABLE_ARP       1
0009016 #define ENABLE_IP       1
0009017 #define ENABLE_PSIP       1
0009018 #define ENABLE_TCP       1
0009019 #define ENABLE_UDP       1
0009020 
0009021 /* Inet configuration file. */
0009022 #define PATH_INET_CONF       "/etc/inet.conf"
0009023 
0009024 #define IP_PORT_MAX (1*sizeof(char*))       /* Up to this many network devices */
sizeof() returns the number of bytes of a type or a variable. In this case, IP_PORT_MAX will be 4 since a pointer to a char (or any other type, for that matter) in protected mode will be 4 bytes long (2 bytes long in real mode).

extern is used to declare a variable that is defined in other source file. In other words, space is not reserved for the variable.


0009025 extern int eth_conf_nr;              /* Number of ethernets */
0009026 extern int psip_conf_nr;       /* Number of Pseudo IP networks */
0009027 extern int ip_conf_nr;              /* Number of configured TCP/IP layers */
0009028 
0009029 extern dev_t ip_dev;              /* Device number of /dev/ip */
0009030 
0009031 struct eth_conf
0009032 {
0009033          char *ec_task;              /* Kernel ethernet task name */
0009034          u8_t ec_port;              /* Task port */
0009035          u8_t ec_ifno;              /* Interface number of /dev/eth* */
0009036 };
0009037 
0009038 struct psip_conf
0009039 {
0009040          u8_t pc_ifno;              /* Interface number of /dev/psip* */
0009041 };
0009042 
0009043 struct ip_conf
0009044 {
0009045          u8_t ic_devtype;       /* Underlying device type: Ethernet / PSIP */
0009046          u8_t ic_port;              /* Port of underlying device */
0009047          u8_t ic_ifno;              /* Interface number of /dev/ip*, tcp*, udp* */
0009048 };
0009049 
0009050 /* Types of networks. */
0009051 #define NETTYPE_ETH       1
0009052 #define NETTYPE_PSIP       2
0009053 
0009054 /* To compute the minor device number for a device on an interface. */
0009055 #define if2minor(ifno, dev)       ((ifno) * 16 + (dev))
0009056 
0009057 /* Offsets of the minor device numbers within a group per interface. */
0009058 #define ETH_DEV_OFF       1
0009059 #define PSIP_DEV_OFF       1
0009060 #define IP_DEV_OFF       2
0009061 #define TCP_DEV_OFF       3
0009062 #define UDP_DEV_OFF       4
0009063 
0009064 extern struct eth_conf eth_conf[IP_PORT_MAX];
0009065 extern struct psip_conf psip_conf[IP_PORT_MAX];
0009066 extern struct ip_conf ip_conf[IP_PORT_MAX];
0009067 void read_conf(void);
0009068 extern char *sbrk(int);
0009069 void *alloc(size_t size);
0009070 
0009071 #endif /* INET__INET_CONFIG_H */
0009072 
0009073 /*
0009074  * $PchId: inet_config.h,v 1.6 1998/10/23 20:14:28 philip Exp $
0009075  */