/[dynamips]/upstream/dynamips-0.2.6-RC3/dev_c3600.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_c3600.h

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

upstream/dynamips-0.2.5/dev_c3600.h revision 1 by dpavlin, Sat Oct 6 16:01:44 2007 UTC upstream/dynamips-0.2.6-RC2/dev_c3600.h revision 3 by dpavlin, Sat Oct 6 16:05:34 2007 UTC
# Line 69  Line 69 
69  /* C3600 router */  /* C3600 router */
70  typedef struct c3600_router c3600_t;  typedef struct c3600_router c3600_t;
71    
 /* C3600 EEPROM */  
 struct c3600_eeprom {  
    char *name;  
    m_uint16_t *data;  
    u_int len;  
 };  
   
72  /* Prototype of chassis driver initialization function */  /* Prototype of chassis driver initialization function */
73  typedef int (*c3600_chassis_init_fn)(c3600_t *router);  typedef int (*c3600_chassis_init_fn)(c3600_t *router);
74    
75  /* Prototype of NM driver initialization function */  /* Prototype of NM driver initialization function */
76  typedef int (*c3600_nm_init_fn)(c3600_t *router,char *name,u_int nm_bay);  typedef int (*c3600_nm_init_fn)(c3600_t *router,char *name,u_int nm_bay);
77    
78  /* Prototype of PA driver shutdown function */  /* Prototype of NM driver shutdown function */
79  typedef int (*c3600_nm_shutdown_fn)(c3600_t *router,u_int nm_bay);  typedef int (*c3600_nm_shutdown_fn)(c3600_t *router,u_int nm_bay);
80    
81  /* Prototype of PA NIO set function */  /* Prototype of NM NIO set function */
82  typedef int (*c3600_nm_set_nio_fn)(c3600_t *router,u_int nm_bay,u_int port_id,  typedef int (*c3600_nm_set_nio_fn)(c3600_t *router,u_int nm_bay,u_int port_id,
83                                     netio_desc_t *nio);                                     netio_desc_t *nio);
84    
85  /* Prototype of PA NIO unset function */  /* Prototype of NM NIO unset function */
86  typedef int (*c3600_nm_unset_nio_fn)(c3600_t *router,u_int nm_bay,  typedef int (*c3600_nm_unset_nio_fn)(c3600_t *router,u_int nm_bay,
87                                       u_int port_id);                                       u_int port_id);
88    
89    /* Prototype of NM NIO show info function */
90    typedef int (*c3600_nm_show_info_fn)(c3600_t *router,u_int nm_bay);
91    
92  /* C3600 Network Module Driver */  /* C3600 Network Module Driver */
93  struct c3600_nm_driver {  struct c3600_nm_driver {
94     char *dev_type;     char *dev_type;
# Line 102  struct c3600_nm_driver { Line 98  struct c3600_nm_driver {
98     c3600_nm_shutdown_fn nm_shutdown;     c3600_nm_shutdown_fn nm_shutdown;
99     c3600_nm_set_nio_fn nm_set_nio;     c3600_nm_set_nio_fn nm_set_nio;
100     c3600_nm_unset_nio_fn nm_unset_nio;     c3600_nm_unset_nio_fn nm_unset_nio;
101         c3600_nm_show_info_fn nm_show_info;
102    
103     /* TODO: WAN Interface Cards (WIC) */     /* TODO: WAN Interface Cards (WIC) */
104  };  };
105    
# Line 117  struct c3600_nio_binding { Line 114  struct c3600_nio_binding {
114  struct c3600_nm_bay {  struct c3600_nm_bay {
115     char *dev_name;                       /* Device name */     char *dev_name;                       /* Device name */
116     char *dev_type;                       /* Device Type */     char *dev_type;                       /* Device Type */
117       struct cisco_eeprom eeprom;           /* NM EEPROM */
118     struct pci_bus *pci_map;              /* PCI bus */     struct pci_bus *pci_map;              /* PCI bus */
    m_uint16_t *eeprom_data;              /* NM EEPROM data */  
    u_int eeprom_data_len;                /* NM EEPROM data length */  
119     struct c3600_nm_driver *nm_driver;    /* NM Driver */     struct c3600_nm_driver *nm_driver;    /* NM Driver */
120     void *drv_info;                       /* Private driver info */     void *drv_info;                       /* Private driver info */
121     struct c3600_nio_binding *nio_list;   /* NIO bindings to ports */     struct c3600_nio_binding *nio_list;   /* NIO bindings to ports */
# Line 131  struct c3600_chassis_driver { Line 127  struct c3600_chassis_driver {
127     int chassis_id;     int chassis_id;
128     int supported;       int supported;  
129     c3600_chassis_init_fn chassis_init;     c3600_chassis_init_fn chassis_init;
130     m_uint16_t *mb_eeprom;     struct cisco_eeprom *eeprom;
    u_int mb_eeprom_len;  
131  };  };
132    
133  /* C3600 router */  /* C3600 router */
# Line 155  struct c3600_router { Line 150  struct c3600_router {
150      * Mainboard EEPROM.      * Mainboard EEPROM.
151      * It can be modified to change the chassis MAC address.      * It can be modified to change the chassis MAC address.
152      */      */
153     m_uint16_t mb_eeprom_data[64];     struct cisco_eeprom mb_eeprom;
    struct nmc93c46_eeprom_def mb_eeprom;    
154     struct nmc93c46_group mb_eeprom_group;     struct nmc93c46_group mb_eeprom_group;
155    
156     /* Network Module EEPROMs (3620/3640) */     /* Network Module EEPROMs (3620/3640) */
    struct nmc93c46_eeprom_def nm_eeprom;  
157     struct nmc93c46_group nm_eeprom_group;     struct nmc93c46_group nm_eeprom_group;
158    
159     /* Cisco 3660 NM EEPROMs */     /* Cisco 3660 NM EEPROMs */
    struct nmc93c46_eeprom_def c3660_nm_eeprom_def[C3600_MAX_NM_BAYS];  
160     struct nmc93c46_group c3660_nm_eeprom_group[C3600_MAX_NM_BAYS];     struct nmc93c46_group c3660_nm_eeprom_group[C3600_MAX_NM_BAYS];
161  };  };
162    
# Line 185  void c3600_save_config_all(FILE *fd); Line 177  void c3600_save_config_all(FILE *fd);
177    
178  /* Set NM EEPROM definition */  /* Set NM EEPROM definition */
179  int c3600_nm_set_eeprom(c3600_t *router,u_int nm_bay,  int c3600_nm_set_eeprom(c3600_t *router,u_int nm_bay,
180                          const struct c3600_eeprom *eeprom);                          const struct cisco_eeprom *eeprom);
181    
182  /* Unset NM EEPROM definition (empty bay) */  /* Unset NM EEPROM definition (empty bay) */
183  int c3600_nm_unset_eeprom(c3600_t *router,u_int nm_bay);  int c3600_nm_unset_eeprom(c3600_t *router,u_int nm_bay);
# Line 246  int c3600_nm_shutdown(c3600_t *router,u_ Line 238  int c3600_nm_shutdown(c3600_t *router,u_
238  /* Shutdown all NM of a router */  /* Shutdown all NM of a router */
239  int c3600_nm_shutdown_all(c3600_t *router);  int c3600_nm_shutdown_all(c3600_t *router);
240    
241    /* Show info about all NMs */
242    int c3600_nm_show_all_info(c3600_t *router);
243    
244  /* Create a Network Module (command line) */  /* Create a Network Module (command line) */
245  int c3600_cmd_nm_create(c3600_t *router,char *str);  int c3600_cmd_nm_create(c3600_t *router,char *str);
246    
# Line 294  extern struct c3600_nm_driver dev_c3600_ Line 289  extern struct c3600_nm_driver dev_c3600_
289  extern struct c3600_nm_driver dev_c3600_nm_1fe_tx_driver;  extern struct c3600_nm_driver dev_c3600_nm_1fe_tx_driver;
290  extern struct c3600_nm_driver dev_c3600_nm_4t_driver;  extern struct c3600_nm_driver dev_c3600_nm_4t_driver;
291  extern struct c3600_nm_driver dev_c3600_leopard_2fe_driver;  extern struct c3600_nm_driver dev_c3600_leopard_2fe_driver;
292    extern struct c3600_nm_driver dev_c3600_nm_16esw_driver;
293    
294  #endif  #endif

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

  ViewVC Help
Powered by ViewVC 1.1.26