From: Euan Harris <euan.harris@citrix.com>
To: xen-devel@lists.xen.org
Subject: libxl: Is the nic param to libxl_network_device_add an (in)_out parameter?
Date: Tue, 18 Nov 2014 15:28:49 +0000 [thread overview]
Message-ID: <20141118152848.GE31225@citrix.com> (raw)
Hi,
If I call libxl_device_nic_add and pass in a mostly-default
libxl_device_nic structure, the function fills in the unspecified default
config fields with data for the NIC which it has just created:
libxl_device_nic nic;
libxl_device_nic_init(&nic);
/*
nic.devid == -1
nic.mac == 00:00:00:00:00:00
nic.model == null
etc.
*/
libxl_device_nic_add(ctx, domid, &nic, NULL);
/*
nic.devid == 3
nic.mac == 00:16:3e:1b:7b:12
nic.model == rtl8139
etc.
*/
Is this behaviour an intentional part of the API which I can rely on,
or just an artefact of the current implementation? In other words, is
nic meant to be an (in)_out parameter? If it's not, what is the correct
way to find out the device ID which was allocated for the new device,
for example?
Thanks,
Euan
next reply other threads:[~2014-11-18 15:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-18 15:28 Euan Harris [this message]
2014-11-18 15:35 ` libxl: Is the nic param to libxl_network_device_add an (in)_out parameter? Ian Campbell
2014-11-18 15:41 ` Ian Jackson
2014-11-18 15:44 ` Ian Campbell
2014-11-18 17:08 ` Euan Harris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141118152848.GE31225@citrix.com \
--to=euan.harris@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.