]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[netdevice] Add concept of a network device index
authorMichael Brown <mcb30@ipxe.org>
Thu, 29 Aug 2013 13:10:16 +0000 (14:10 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 3 Sep 2013 00:24:15 +0000 (01:24 +0100)
commitd5f69e93887cb9ad505b7ed6394891652f393885
treee2d499055f10b9536db2a544eea626e722d26679
parentc9ed9cb4e7227a5c2a90fe53e1d8282488fd8add
[netdevice] Add concept of a network device index

IPv6 link-local socket addresses require some way to specify a local
network device.  We cannot simply use a pointer to the network device,
since a struct sockaddr_in6 may be long-lived and has no way to hold a
reference to the network device.

Using a network device index allows a socket address to cleanly refer
to a network device without worrying about whether or not that device
continues to exist.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/include/ipxe/netdevice.h
src/net/netdevice.c