Digi NS7520 DJ Equipment User Manual


 
EFE configuration
206       
NS7520 Hardware Reference, Rev. D 03/2006
*
* none
*
*/
static void set_hash_bit (BYTE *table, int bit)
{
int byte_index, bit_index;
byte_index = bit >> 3;
bit_index = bit & 7;
table [byte_index] |= (1 << bit_index);
}
/*
*
* Function: int calculate_hash_bit (BYTE *mca)
*
* Description:
*
* This routine calculates which bit in the CRC hash table needs
* to be set for the NET+20UM to recognize incoming packets with the
* MCA passed to us.
*
* Parameters:
*
* mca pointer to multi-cast address
*
* Return Values:
*
* bit position to set in hash table
*
*/
#define POLYNOMIAL 0x4c11db6L
static int calculate_hash_bit (BYTE *mca)
{
WORD32 crc;
WORD16 *mcap, bp, bx;
int result, index, mca_word, bit_index;
BYTE lsb;
WORD16 copy_mca[3];