conf.h

Go to the documentation of this file.
00001 /*
00002 ** conf.h for lseos in /home/anoman/work/lse/lseos/lseos-srv/net/inet
00003 ** 
00004 ** Copyright 2004(c) Arthur Kopatsy
00005 ** Login   <kopats_a@epita.fr>
00006 ** 
00007 ** Started on  Fri Dec 17 11:17:09 2004 Arthur Kopatsy
00008 ** Last update Mon Dec 20 10:44:36 2004 Arthur Kopatsy
00009 */
00010 
00011 #ifndef CONF_H_
00012 #define CONF_H_
00013 
00014 struct s_iface_conf
00015 {
00016   int                   if_type;
00017   struct mac_addr       if_mac_addr;
00018   struct s_subnet       if_ip_addr;
00019   int                   if_mtu;
00020 };
00021 
00022 struct s_route_conf
00023 {
00024   struct s_subnet       rt_subnet;
00025   struct in_addr        rt_gw;
00026 };
00027 
00028 enum e_conf_type { IFACE, ROUTE };
00029 
00030 #define NAME_LEN        32
00031 
00032 struct s_conf_entry
00033 {
00034   LIST_ENTRY(s_conf_entry)      next;
00035   enum e_conf_type              type;
00036   char                          name[NAME_LEN];
00037   union u_conf_entry
00038   {
00039     struct s_iface_conf         iface;
00040     struct s_route_conf         route;
00041   } conf;
00042 };
00043 
00044 LIST_HEAD(s_conf_head, s_conf_entry);
00045 
00046 extern struct s_conf_head conf_head;
00047 
00048 /* PROTO conf.c */
00049 #ifdef __INET__
00050 /* conf.c */
00051 int inet_parse_conf(const char *filename);
00052 int load_iface_conf(struct s_iface *iface);
00053 int load_route_conf(void);
00054 #endif /* __INET__ */
00055 #endif

Generated on Wed May 24 23:05:52 2006 for LSE/OS by  doxygen 1.4.6