summaryrefslogtreecommitdiffstats
path: root/src/net/ethernet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/ethernet.c')
-rw-r--r--src/net/ethernet.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/net/ethernet.c b/src/net/ethernet.c
index e8daf9f9..79ed1dc6 100644
--- a/src/net/ethernet.c
+++ b/src/net/ethernet.c
@@ -148,6 +148,17 @@ int eth_mc_hash ( unsigned int af, const void *net_addr, void *ll_addr ) {
}
}
+/**
+ * Generate Ethernet-compatible compressed link-layer address
+ *
+ * @v ll_addr Link-layer address
+ * @v eth_addr Ethernet-compatible address to fill in
+ */
+int eth_eth_addr ( const void *ll_addr, void *eth_addr ) {
+ memcpy ( eth_addr, ll_addr, ETH_ALEN );
+ return 0;
+}
+
/** Ethernet protocol */
struct ll_protocol ethernet_protocol __ll_protocol = {
.name = "Ethernet",
@@ -160,6 +171,7 @@ struct ll_protocol ethernet_protocol __ll_protocol = {
.init_addr = eth_init_addr,
.ntoa = eth_ntoa,
.mc_hash = eth_mc_hash,
+ .eth_addr = eth_eth_addr,
};
/**