aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libslirp.h5
-rw-r--r--src/slirp.c2
-rw-r--r--src/slirp.h1
3 files changed, 8 insertions, 0 deletions
diff --git a/src/libslirp.h b/src/libslirp.h
index 35ddab6..3afad21 100644
--- a/src/libslirp.h
+++ b/src/libslirp.h
@@ -144,6 +144,11 @@ typedef struct SlirpConfig {
* Fields introduced in SlirpConfig version 5 begin
*/
uint32_t mfr_id; /* Manufacturer ID (IANA Private Enterprise number) */
+ /*
+ * MAC address allocated for an out-of-band management controller, to be
+ * retrieved through NC-SI.
+ */
+ uint8_t oob_eth_addr[6];
} SlirpConfig;
/* Create a new instance of a slirp stack */
diff --git a/src/slirp.c b/src/slirp.c
index 588cada..54056c9 100644
--- a/src/slirp.c
+++ b/src/slirp.c
@@ -650,8 +650,10 @@ Slirp *slirp_new(const SlirpConfig *cfg, const SlirpCb *callbacks, void *opaque)
if (cfg->version >= 5) {
slirp->mfr_id = cfg->mfr_id;
+ memcpy(slirp->oob_eth_addr, cfg->oob_eth_addr, ETH_ALEN);
} else {
slirp->mfr_id = 0;
+ memset(slirp->oob_eth_addr, 0, ETH_ALEN);
}
ip6_post_init(slirp);
diff --git a/src/slirp.h b/src/slirp.h
index 4c956d9..e413867 100644
--- a/src/slirp.h
+++ b/src/slirp.h
@@ -152,6 +152,7 @@ struct Slirp {
bool disable_host_loopback;
uint32_t mfr_id;
+ uint8_t oob_eth_addr[ETH_ALEN];
/* mbuf states */
struct slirp_quehead m_freelist;