/[dynamips]/upstream/dynamips-0.2.6-RC3/dev_c7200.h
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /upstream/dynamips-0.2.6-RC3/dev_c7200.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

upstream/dynamips-0.2.5/dev_c7200.h revision 1 by dpavlin, Sat Oct 6 16:01:44 2007 UTC upstream/dynamips-0.2.6-RC3/dev_c7200.h revision 4 by dpavlin, Sat Oct 6 16:06:49 2007 UTC
# Line 91  Line 91 
91  /* C7200 router */  /* C7200 router */
92  typedef struct c7200_router c7200_t;  typedef struct c7200_router c7200_t;
93    
 /* C7200 EEPROM */  
 struct c7200_eeprom {  
    char *name;  
    m_uint16_t *data;  
    u_int len;  
 };  
   
94  /* Prototype of NPE driver initialization function */  /* Prototype of NPE driver initialization function */
95  typedef int (*c7200_npe_init_fn)(c7200_t *router);  typedef int (*c7200_npe_init_fn)(c7200_t *router);
96    
# Line 115  typedef int (*c7200_pa_set_nio_fn)(c7200 Line 108  typedef int (*c7200_pa_set_nio_fn)(c7200
108  typedef int (*c7200_pa_unset_nio_fn)(c7200_t *router,u_int pa_bay,  typedef int (*c7200_pa_unset_nio_fn)(c7200_t *router,u_int pa_bay,
109                                       u_int port_id);                                       u_int port_id);
110    
111    /* Prototype of NM NIO show info function */
112    typedef int (*c7200_pa_show_info_fn)(c7200_t *router,u_int pa_bay);
113    
114  /* C7200 Port Adapter Driver */  /* C7200 Port Adapter Driver */
115  struct c7200_pa_driver {  struct c7200_pa_driver {
116     char *dev_type;     char *dev_type;
# Line 123  struct c7200_pa_driver { Line 119  struct c7200_pa_driver {
119     c7200_pa_shutdown_fn pa_shutdown;     c7200_pa_shutdown_fn pa_shutdown;
120     c7200_pa_set_nio_fn pa_set_nio;     c7200_pa_set_nio_fn pa_set_nio;
121     c7200_pa_unset_nio_fn pa_unset_nio;     c7200_pa_unset_nio_fn pa_unset_nio;
122       c7200_pa_show_info_fn pa_show_info;
123  };  };
124    
125  /* C7200 NIO binding to a slot/port */  /* C7200 NIO binding to a slot/port */
# Line 136  struct c7200_nio_binding { Line 133  struct c7200_nio_binding {
133  struct c7200_pa_bay {  struct c7200_pa_bay {
134     char *dev_name;                       /* Device Name */     char *dev_name;                       /* Device Name */
135     char *dev_type;                       /* Device Type */     char *dev_type;                       /* Device Type */
136       struct cisco_eeprom eeprom;           /* PA EEPROM */
137     struct pci_bus *pci_map;              /* PCI bus */     struct pci_bus *pci_map;              /* PCI bus */
    struct nmc93c46_eeprom_def eeprom;    /* PA EEPROM */  
138     struct c7200_pa_driver *pa_driver;    /* PA driver */     struct c7200_pa_driver *pa_driver;    /* PA driver */
139     void *drv_info;                       /* Private driver info */     void *drv_info;                       /* Private driver info */
140     struct c7200_nio_binding *nio_list;   /* NIO bindings to ports */     struct c7200_nio_binding *nio_list;   /* NIO bindings to ports */
# Line 176  struct c7200_router { Line 173  struct c7200_router {
173     struct pci_bus *pcmcia_bus;     struct pci_bus *pcmcia_bus;
174    
175     /* Midplane EEPROM can be modified to change the chassis MAC address... */     /* Midplane EEPROM can be modified to change the chassis MAC address... */
176     m_uint16_t mp_eeprom_data[64];     struct cisco_eeprom cpu_eeprom,mp_eeprom,pem_eeprom;
     
    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 */  
177    
178     struct nmc93c46_group sys_eeprom_g1;    /* EEPROMs for CPU and Midplane */     struct nmc93c46_group sys_eeprom_g1;    /* EEPROMs for CPU and Midplane */
179     struct nmc93c46_group sys_eeprom_g2;    /* EEPROM for PEM */     struct nmc93c46_group sys_eeprom_g2;    /* EEPROM for PEM */
# Line 191  struct c7200_router { Line 184  struct c7200_router {
184  /* Initialize EEPROM groups */  /* Initialize EEPROM groups */
185  void c7200_init_eeprom_groups(c7200_t *router);  void c7200_init_eeprom_groups(c7200_t *router);
186    
 /* 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);  
   
187  /* Create a new router instance */  /* Create a new router instance */
188  c7200_t *c7200_create_instance(char *name,int instance_id);  c7200_t *c7200_create_instance(char *name,int instance_id);
189    
# Line 220  void c7200_save_config_all(FILE *fd); Line 201  void c7200_save_config_all(FILE *fd);
201    
202  /* Set PA EEPROM definition */  /* Set PA EEPROM definition */
203  int c7200_pa_set_eeprom(c7200_t *router,u_int pa_bay,  int c7200_pa_set_eeprom(c7200_t *router,u_int pa_bay,
204                          const struct c7200_eeprom *eeprom);                          const struct cisco_eeprom *eeprom);
205    
206  /* Unset PA EEPROM definition (empty bay) */  /* Unset PA EEPROM definition (empty bay) */
207  int c7200_pa_unset_eeprom(c7200_t *router,u_int pa_bay);  int c7200_pa_unset_eeprom(c7200_t *router,u_int pa_bay);
# Line 281  int c7200_pa_shutdown(c7200_t *router,u_ Line 262  int c7200_pa_shutdown(c7200_t *router,u_
262  /* Shutdown all PA of a router */  /* Shutdown all PA of a router */
263  int c7200_pa_shutdown_all(c7200_t *router);  int c7200_pa_shutdown_all(c7200_t *router);
264    
265    /* Show info about all NMs */
266    int c7200_pa_show_all_info(c7200_t *router);
267    
268  /* Create a Port Adapter (command line) */  /* Create a Port Adapter (command line) */
269  int c7200_cmd_pa_create(c7200_t *router,char *str);  int c7200_cmd_pa_create(c7200_t *router,char *str);
270    
# Line 348  extern struct c7200_pa_driver dev_c7200_ Line 332  extern struct c7200_pa_driver dev_c7200_
332  extern struct c7200_pa_driver dev_c7200_pa_a1_driver;  extern struct c7200_pa_driver dev_c7200_pa_a1_driver;
333  extern struct c7200_pa_driver dev_c7200_pa_pos_oc3_driver;  extern struct c7200_pa_driver dev_c7200_pa_pos_oc3_driver;
334  extern struct c7200_pa_driver dev_c7200_pa_4b_driver;  extern struct c7200_pa_driver dev_c7200_pa_4b_driver;
335    extern struct c7200_pa_driver dev_c7200_pa_mc8te1_driver;
336    
337  #endif  #endif

Legend:
Removed from v.1  
changed lines
  Added in v.4

  ViewVC Help
Powered by ViewVC 1.1.26