--- upstream/dynamips-0.2.5/dev_c7200.h 2007/10/06 16:01:44 1 +++ upstream/dynamips-0.2.6-RC3/dev_c7200.h 2007/10/06 16:06:49 4 @@ -91,13 +91,6 @@ /* C7200 router */ typedef struct c7200_router c7200_t; -/* C7200 EEPROM */ -struct c7200_eeprom { - char *name; - m_uint16_t *data; - u_int len; -}; - /* Prototype of NPE driver initialization function */ typedef int (*c7200_npe_init_fn)(c7200_t *router); @@ -115,6 +108,9 @@ typedef int (*c7200_pa_unset_nio_fn)(c7200_t *router,u_int pa_bay, u_int port_id); +/* Prototype of NM NIO show info function */ +typedef int (*c7200_pa_show_info_fn)(c7200_t *router,u_int pa_bay); + /* C7200 Port Adapter Driver */ struct c7200_pa_driver { char *dev_type; @@ -123,6 +119,7 @@ c7200_pa_shutdown_fn pa_shutdown; c7200_pa_set_nio_fn pa_set_nio; c7200_pa_unset_nio_fn pa_unset_nio; + c7200_pa_show_info_fn pa_show_info; }; /* C7200 NIO binding to a slot/port */ @@ -136,8 +133,8 @@ struct c7200_pa_bay { char *dev_name; /* Device Name */ char *dev_type; /* Device Type */ + struct cisco_eeprom eeprom; /* PA EEPROM */ struct pci_bus *pci_map; /* PCI bus */ - struct nmc93c46_eeprom_def eeprom; /* PA EEPROM */ struct c7200_pa_driver *pa_driver; /* PA driver */ void *drv_info; /* Private driver info */ struct c7200_nio_binding *nio_list; /* NIO bindings to ports */ @@ -176,11 +173,7 @@ struct pci_bus *pcmcia_bus; /* Midplane EEPROM can be modified to change the chassis MAC address... */ - m_uint16_t mp_eeprom_data[64]; - - struct nmc93c46_eeprom_def cpu_eeprom; /* CPU EEPROM */ - struct nmc93c46_eeprom_def mp_eeprom; /* Midplane EEPROM */ - struct nmc93c46_eeprom_def pem_eeprom; /* Power Entry Module EEPROM */ + struct cisco_eeprom cpu_eeprom,mp_eeprom,pem_eeprom; struct nmc93c46_group sys_eeprom_g1; /* EEPROMs for CPU and Midplane */ struct nmc93c46_group sys_eeprom_g2; /* EEPROM for PEM */ @@ -191,18 +184,6 @@ /* Initialize EEPROM groups */ void c7200_init_eeprom_groups(c7200_t *router); -/* Find an EEPROM in the specified array */ -struct c7200_eeprom *c7200_get_eeprom(struct c7200_eeprom *eeproms,char *name); - -/* Get an EEPROM for a given NPE model */ -struct c7200_eeprom *c7200_get_cpu_eeprom(char *npe_name); - -/* Get an EEPROM for a given midplane model */ -struct c7200_eeprom *c7200_get_midplane_eeprom(char *midplane_name); - -/* Get a PEM EEPROM for a given NPE model */ -struct c7200_eeprom *c7200_get_pem_eeprom(char *npe_name); - /* Create a new router instance */ c7200_t *c7200_create_instance(char *name,int instance_id); @@ -220,7 +201,7 @@ /* Set PA EEPROM definition */ int c7200_pa_set_eeprom(c7200_t *router,u_int pa_bay, - const struct c7200_eeprom *eeprom); + const struct cisco_eeprom *eeprom); /* Unset PA EEPROM definition (empty bay) */ int c7200_pa_unset_eeprom(c7200_t *router,u_int pa_bay); @@ -281,6 +262,9 @@ /* Shutdown all PA of a router */ int c7200_pa_shutdown_all(c7200_t *router); +/* Show info about all NMs */ +int c7200_pa_show_all_info(c7200_t *router); + /* Create a Port Adapter (command line) */ int c7200_cmd_pa_create(c7200_t *router,char *str); @@ -348,5 +332,6 @@ extern struct c7200_pa_driver dev_c7200_pa_a1_driver; extern struct c7200_pa_driver dev_c7200_pa_pos_oc3_driver; extern struct c7200_pa_driver dev_c7200_pa_4b_driver; +extern struct c7200_pa_driver dev_c7200_pa_mc8te1_driver; #endif