20.12.2012 Views

CPCI-910 Programmer's Guide - Emerson Network Power

CPCI-910 Programmer's Guide - Emerson Network Power

CPCI-910 Programmer's Guide - Emerson Network Power

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

API Call Reference List of APIs<br />

Fundamental to the use of L2 address table entries is an opaque type, which is<br />

used to communicate the L2 entry to the BCM5680 device.<br />

struct arl_t {<br />

unsigned int flags; /* BCM_L2_XXX flags */<br />

unsigned char mac[6];/* 802.3 MAC address */<br />

unsigned short vid; /* VLAN identifier */<br />

int port; /* Zero-based port number */<br />

int tgid; /* Trunk group ID */<br />

int rtag; /* Trunk port select formula */<br />

int cos_dst; /* COS based on dst addr */<br />

int cos_src; /* COS based on src addr */<br />

} arl_t;<br />

In other API routines, either a MAC address (unsigned char *) and/or<br />

VLAN ID (int) are used for manipulation of the address table.<br />

int bcm_l2_addr_remove_by_port(int unit, unsigned int pbmp, unsigned int flags)<br />

DESCRIPTION Removes all L2 (MAC) addresses associated with the port<br />

INCLUDE src/tulsi_drivers/bcm_cli_kern/arl.h<br />

INPUT<br />

unit StrataSwitch PCI device unit number (driver internal)<br />

pbmp Bitmap of ports to affect<br />

flags BCM_L2_REMOVE_XXX<br />

RETURN VALUE<br />

BCM_E_NONE (Success)<br />

BCM_E_INTERNAL (Chip access Failure)<br />

Note: Static entries are removed only if BCM_L2_REMOVE_STATIC<br />

flag is used.<br />

Note: ARL aging and learning on all ports is disabled during this operation.<br />

If these were not disabled, the hardware could shift the contents of<br />

<strong>CPCI</strong>-<strong>910</strong> 2 - 9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!