...
Anchor
AddrMulticastRemove()
function used to remove an (IP-to-Ethernet) multicast hardware address from a device.Files
...
net_dev.c
Prototype
...
HTML Table | summary | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
class | Code_Listing | |||||||||
Table Row (tr) | ||||||||||
Table Cell (td) | ||||||||||
| ||||||||||
Anchor | 1113814 | 1113814 | static void NetDev_AddrMulticastRemove||||||||
Code Block | ||||||||||
static void NetDev_AddrMulticastRemove (NET_IF*p_if, Anchor | | 1151478 | 1151478 | CPU_INT08U *p_addr_hw,|||||||
Anchor | 1151479 | 1151479 | CPU_INT08U addr_hw_len,||||||||
Anchor | 1151480 | 1151480 | NET_ERR *p_err);||||||||
Table Row (tr) |
...
*pif,
CPU_INT08U *paddr_hw,
CPU_INT08U addr_hw_len,
NET_ERR *perr); |
Note that since every device driver’s AddrMulticastRemove()
function is accessed only by function pointer via the device driver’s API structure, it doesn’t need to be globally available and should therefore be declared as ‘static’. Anchor
static
’.Arguments
Anchor
pif
Pointer to the interface to remove a multicast address.
Anchor
paddr_hw
Pointer to multicast hardware address to remove.
Anchor
addr_hw_len
Length of multicast hardware address.
Anchor
perr
Pointer to variable that will receive the return error code from this function.
...
Returned Value
...
None. Anchor
Required Configuration
...
Notes / Warnings
Anchor
NetDev_AddrMulticastAdd()
to calculate the device’s CRC hash (see section B-1-6 on page 362 NetDev_AddrMulticastAdd()), but remove a multicast address by decrementing the device’s hash bit reference counters and clearing the appropriate bits in the device’s multicast registers.HTML Table | summary | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
class | Code_Listing | |||||||||||||||||||||||||||||||||||||||||||||
Table Row (tr) | ||||||||||||||||||||||||||||||||||||||||||||||
Table Cell (td) | ||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||
Anchor | 1114621 | 1114621 | /*||||||||||||||||||||||||||||||||||||||||||||
Code Block | ||||||||||||||||||||||||||||||||||||||||||||||
/* ---------- CALCULATE HASH CODE ----------*/ Anchor | | 1151481 | 1151481 | /* Use|||||||||||||||||||||||||||||||||||||||||||
Anchor | 1151482 | 1151482 | /* - REMOVE MULTICAST ADDRESS FROM DEVICE -- */||||||||||||||||||||||||||||||||||||||||||||
Anchor | 1151483 | 1151483 | ||||||||||||||||||||||||||||||||||||||||||||
Anchor | 1151484 | 1151484 | if||||||||||||||||||||||||||||||||||||||||||||
Anchor | 1151485 | 1151485 | ||||||||||||||||||||||||||||||||||||||||||||
Anchor | 1151486 | 1151486 | *perr =||||||||||||||||||||||||||||||||||||||||||||
Anchor | 1151487 | 1151487 | return;||||||||||||||||||||||||||||||||||||||||||||
Anchor | 1151488 | 1151488 | }||||||||||||||||||||||||||||||||||||||||||||
Anchor | 1151489 | 1151489 | ||||||||||||||||||||||||||||||||||||||||||||
Anchor | 1151490 | 1151490 | ||||||||||||||||||||||||||||||||||||||||||||
Anchor | 1151491 | 1151491 | if (hash <= 31u) { /* Clear multicast hash register bit. */||||||||||||||||||||||||||||||||||||||||||||
Anchor | 1151492 | 1151492 | ||||||||||||||||||||||||||||||||||||||||||||
Anchor | 1151493 | 1151493 | } else { /* .. device’s actual multicast registers.) */||||||||||||||||||||||||||||||||||||||||||||
Anchor | 1151494 | 1151494 | ||||||||||||||||||||||||||||||||||||||||||||
Anchor | 1151495 | 1151495 | }||||||||||||||||||||||||||||||||||||||||||||
Table Row (tr) |
...
} |