E F E c o n f i g u r a t i o n

*

*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];

2 0 6

N S 7 5 2 0 H a r d w a r e R e f e r e n c e , R e v . D 0 3 / 2 0 0 6

Page 220
Image 220
Digi NS7520 manual