mirror of
https://github.com/ipxe/ipxe
synced 2025-12-19 19:49:45 +03:00
[netdevice] Split multicast hashing out into an mc_hash method
Multicast hashing is an ugly overlap between network and link layers. EFI requires us to provide access to this functionality, so move it out of ipv4.c and expose it as a method of the link layer.
This commit is contained in:
@@ -222,6 +222,21 @@ const char * ipoib_ntoa ( const void *ll_addr ) {
|
||||
return buf;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hash multicast address
|
||||
*
|
||||
* @v af Address family
|
||||
* @v net_addr Network-layer address
|
||||
* @v ll_addr Link-layer address to fill in
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
static int ipoib_mc_hash ( unsigned int af __unused,
|
||||
const void *net_addr __unused,
|
||||
void *ll_addr __unused ) {
|
||||
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
/** IPoIB protocol */
|
||||
struct ll_protocol ipoib_protocol __ll_protocol = {
|
||||
.name = "IPoIB",
|
||||
@@ -232,6 +247,7 @@ struct ll_protocol ipoib_protocol __ll_protocol = {
|
||||
.push = ipoib_push,
|
||||
.pull = ipoib_pull,
|
||||
.ntoa = ipoib_ntoa,
|
||||
.mc_hash = ipoib_mc_hash,
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user