/[dynamips]/trunk/dev_c3600_serial.c
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 /trunk/dev_c3600_serial.c

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

upstream/dynamips-0.2.6-RC2/dev_c3600_serial.c revision 3 by dpavlin, Sat Oct 6 16:05:34 2007 UTC upstream/dynamips-0.2.7-RC2/dev_c3600_serial.c revision 8 by dpavlin, Sat Oct 6 16:24:54 2007 UTC
# Line 1  Line 1 
1  /*    /*  
2   * Cisco C3600 (Predator) simulation platform.   * Cisco router simulation platform.
3   * Copyright (c) 2006 Christophe Fillot (cf@utc.fr)   * Copyright (c) 2006 Christophe Fillot (cf@utc.fr)
4   *   *
5   * Serial Network Modules.   * Serial Network Modules.
# Line 29  Line 29 
29  /*  /*
30   * dev_c3600_nm_4t_init()   * dev_c3600_nm_4t_init()
31   *   *
32   * Add a PA-4T network module into specified slot.   * Add a NM-4T network module into specified slot.
33   */   */
34  int dev_c3600_nm_4t_init(c3600_t *router,char *name,u_int nm_bay)  int dev_c3600_nm_4t_init(c3600_t *router,char *name,u_int nm_bay)
35  {  {
# Line 43  int dev_c3600_nm_4t_init(c3600_t *router Line 43  int dev_c3600_nm_4t_init(c3600_t *router
43     bay_info = c3600_nm_get_bay_info(c3600_chassis_get_id(router),nm_bay);     bay_info = c3600_nm_get_bay_info(c3600_chassis_get_id(router),nm_bay);
44    
45     if (!bay_info) {     if (!bay_info) {
46        fprintf(stderr,"%s: unable to get info for PA bay %u\n",name,nm_bay);        fprintf(stderr,"%s: unable to get info for NM bay %u\n",name,nm_bay);
47        return(-1);        return(-1);
48     }     }
49    
# Line 51  int dev_c3600_nm_4t_init(c3600_t *router Line 51  int dev_c3600_nm_4t_init(c3600_t *router
51     data = dev_mueslix_init(router->vm,name,0,     data = dev_mueslix_init(router->vm,name,0,
52                             router->nm_bay[nm_bay].pci_map,                             router->nm_bay[nm_bay].pci_map,
53                             bay_info->pci_device,                             bay_info->pci_device,
54                             C3600_NETIO_IRQ);                             c3600_net_irq_for_slot_port(nm_bay,0));
55     if (!data) return(-1);     if (!data) return(-1);
56    
57     /* Store device info into the router structure */     /* Store device info into the router structure */
58     return(c3600_nm_set_drvinfo(router,nm_bay,data));     return(c3600_nm_set_drvinfo(router,nm_bay,data));
59  }  }
60    
61  /* Remove a PA-4T+ from the specified slot */  /* Remove a NM-4T from the specified slot */
62  int dev_c3600_nm_4t_shutdown(c3600_t *router,u_int nm_bay)  int dev_c3600_nm_4t_shutdown(c3600_t *router,u_int nm_bay)
63  {  {
64     struct c3600_nm_bay *bay;     struct c3600_nm_bay *bay;

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

  ViewVC Help
Powered by ViewVC 1.1.26