/[dynamips]/upstream/dynamips-0.2.7-RC2/dev_nm_16esw.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 /upstream/dynamips-0.2.7-RC2/dev_nm_16esw.c

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

upstream/dynamips-0.2.7-RC1/dev_nm_16esw.c revision 7 by dpavlin, Sat Oct 6 16:23:47 2007 UTC upstream/dynamips-0.2.7-RC2/dev_nm_16esw.c revision 8 by dpavlin, Sat Oct 6 16:24:54 2007 UTC
# Line 1  Line 1 
1  /*  /*
2   * Cisco C3600 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   * NM-16ESW ethernet switch module (experimental!)   * NM-16ESW ethernet switch module (experimental!)
# Line 30  Line 30 
30  #define DEBUG_ACCESS     0  #define DEBUG_ACCESS     0
31  #define DEBUG_UNKNOWN    0  #define DEBUG_UNKNOWN    0
32  #define DEBUG_MII        0  #define DEBUG_MII        0
33  #define DEBUG_MEM        0  #define DEBUG_MEM        1
34  #define DEBUG_REG        0  #define DEBUG_REG        1
35  #define DEBUG_TRANSMIT   0  #define DEBUG_TRANSMIT   0
36  #define DEBUG_RECEIVE    0  #define DEBUG_RECEIVE    0
37  #define DEBUG_FORWARD    0  #define DEBUG_FORWARD    1
38  #define DEBUG_MIRROR     0  #define DEBUG_MIRROR     0
39  #define DEBUG_ARL        0  #define DEBUG_ARL        0
40    
# Line 1520  void *dev_bcm5605_access(cpu_gen_t *cpu, Line 1520  void *dev_bcm5605_access(cpu_gen_t *cpu,
1520                 *data |= BCM5600_INTR_LINKSTAT_MOD;                 *data |= BCM5600_INTR_LINKSTAT_MOD;
1521                 d->mii_intr = FALSE;                 d->mii_intr = FALSE;
1522              }              }
1523    
1524                pci_dev_clear_irq(d->vm,d->pci_dev);
1525           }           }
1526           break;           break;
1527    
# Line 1852  static int bcm5600_dst_mac_lookup(struct Line 1854  static int bcm5600_dst_mac_lookup(struct
1854      */      */
1855     if (dst_mac_index == -1) {     if (dst_mac_index == -1) {
1856  #if DEBUG_FORWARD  #if DEBUG_FORWARD
1857        BCM_LOG(d,"Destination MAC address unknown, flooding.\n");        BCM_LOG(d,"Destination MAC address "
1858                  "%2.2x%2.2x.%2.2x%2.2x.%2.2x%2.2x unknown, flooding.\n",
1859                  dst_mac->eth_addr_byte[0],dst_mac->eth_addr_byte[1],
1860                  dst_mac->eth_addr_byte[2],dst_mac->eth_addr_byte[3],  
1861                  dst_mac->eth_addr_byte[4],dst_mac->eth_addr_byte[5]);
1862  #endif  #endif
1863        p->egress_bitmap = p->vlan_entry[1] & BCM5600_VTABLE_PORT_BMAP_MASK;        p->egress_bitmap = p->vlan_entry[1] & BCM5600_VTABLE_PORT_BMAP_MASK;
1864    
# Line 2071  static inline int bcm5600_is_bpdu(n_eth_ Line 2077  static inline int bcm5600_is_bpdu(n_eth_
2077     if (!memcmp(m,"\x01\x80\xc2\x00\x00",5) && !(m->eth_addr_byte[5] & 0xF0))     if (!memcmp(m,"\x01\x80\xc2\x00\x00",5) && !(m->eth_addr_byte[5] & 0xF0))
2078        return(TRUE);        return(TRUE);
2079    
2080       /*
2081        * CDP: this is cleary a hack, but IOS seems to program this address
2082        * in BPDU registers.
2083        */
2084       if (!memcmp(m,"\x01\x00\x0c\xcc\xcc\xcc",6))
2085          return(TRUE);
2086      
2087     return(FALSE);     return(FALSE);
2088  }  }
2089    

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

  ViewVC Help
Powered by ViewVC 1.1.26