--- upstream/dynamips-0.2.5/dev_c3600.h 2007/10/06 16:01:44 1 +++ upstream/dynamips-0.2.6-RC2/dev_c3600.h 2007/10/06 16:05:34 3 @@ -69,30 +69,26 @@ /* C3600 router */ typedef struct c3600_router c3600_t; -/* C3600 EEPROM */ -struct c3600_eeprom { - char *name; - m_uint16_t *data; - u_int len; -}; - /* Prototype of chassis driver initialization function */ typedef int (*c3600_chassis_init_fn)(c3600_t *router); /* Prototype of NM driver initialization function */ typedef int (*c3600_nm_init_fn)(c3600_t *router,char *name,u_int nm_bay); -/* Prototype of PA driver shutdown function */ +/* Prototype of NM driver shutdown function */ typedef int (*c3600_nm_shutdown_fn)(c3600_t *router,u_int nm_bay); -/* Prototype of PA NIO set function */ +/* Prototype of NM NIO set function */ typedef int (*c3600_nm_set_nio_fn)(c3600_t *router,u_int nm_bay,u_int port_id, netio_desc_t *nio); -/* Prototype of PA NIO unset function */ +/* Prototype of NM NIO unset function */ typedef int (*c3600_nm_unset_nio_fn)(c3600_t *router,u_int nm_bay, u_int port_id); +/* Prototype of NM NIO show info function */ +typedef int (*c3600_nm_show_info_fn)(c3600_t *router,u_int nm_bay); + /* C3600 Network Module Driver */ struct c3600_nm_driver { char *dev_type; @@ -102,7 +98,8 @@ c3600_nm_shutdown_fn nm_shutdown; c3600_nm_set_nio_fn nm_set_nio; c3600_nm_unset_nio_fn nm_unset_nio; - + c3600_nm_show_info_fn nm_show_info; + /* TODO: WAN Interface Cards (WIC) */ }; @@ -117,9 +114,8 @@ struct c3600_nm_bay { char *dev_name; /* Device name */ char *dev_type; /* Device Type */ + struct cisco_eeprom eeprom; /* NM EEPROM */ struct pci_bus *pci_map; /* PCI bus */ - m_uint16_t *eeprom_data; /* NM EEPROM data */ - u_int eeprom_data_len; /* NM EEPROM data length */ struct c3600_nm_driver *nm_driver; /* NM Driver */ void *drv_info; /* Private driver info */ struct c3600_nio_binding *nio_list; /* NIO bindings to ports */ @@ -131,8 +127,7 @@ int chassis_id; int supported; c3600_chassis_init_fn chassis_init; - m_uint16_t *mb_eeprom; - u_int mb_eeprom_len; + struct cisco_eeprom *eeprom; }; /* C3600 router */ @@ -155,16 +150,13 @@ * Mainboard EEPROM. * It can be modified to change the chassis MAC address. */ - m_uint16_t mb_eeprom_data[64]; - struct nmc93c46_eeprom_def mb_eeprom; + struct cisco_eeprom mb_eeprom; struct nmc93c46_group mb_eeprom_group; /* Network Module EEPROMs (3620/3640) */ - struct nmc93c46_eeprom_def nm_eeprom; struct nmc93c46_group nm_eeprom_group; /* Cisco 3660 NM EEPROMs */ - struct nmc93c46_eeprom_def c3660_nm_eeprom_def[C3600_MAX_NM_BAYS]; struct nmc93c46_group c3660_nm_eeprom_group[C3600_MAX_NM_BAYS]; }; @@ -185,7 +177,7 @@ /* Set NM EEPROM definition */ int c3600_nm_set_eeprom(c3600_t *router,u_int nm_bay, - const struct c3600_eeprom *eeprom); + const struct cisco_eeprom *eeprom); /* Unset NM EEPROM definition (empty bay) */ int c3600_nm_unset_eeprom(c3600_t *router,u_int nm_bay); @@ -246,6 +238,9 @@ /* Shutdown all NM of a router */ int c3600_nm_shutdown_all(c3600_t *router); +/* Show info about all NMs */ +int c3600_nm_show_all_info(c3600_t *router); + /* Create a Network Module (command line) */ int c3600_cmd_nm_create(c3600_t *router,char *str); @@ -294,5 +289,6 @@ extern struct c3600_nm_driver dev_c3600_nm_1fe_tx_driver; extern struct c3600_nm_driver dev_c3600_nm_4t_driver; extern struct c3600_nm_driver dev_c3600_leopard_2fe_driver; +extern struct c3600_nm_driver dev_c3600_nm_16esw_driver; #endif