[interface] Provide the ability to shut down multiple interfaces
authorMichael Brown <mcb30@ipxe.org>
Thu, 2 Feb 2017 15:49:21 +0000 (15:49 +0000)
committerMichael Brown <mcb30@ipxe.org>
Thu, 2 Feb 2017 15:49:21 +0000 (15:49 +0000)
commit23b788e5cdd7fcfa863a476a1448870ac3cf0103
tree71adb0fc07eef44c176e7e8b43d903e9d6bba47e
parenta8f80a75d25970f1e4e607e761a153a7d57b9a15
[interface] Provide the ability to shut down multiple interfaces

Shutting down (and optionally restarting) multiple interfaces is
fraught with problems if there are loops in the interface connectivity
(e.g. the HTTP content-decoded and transfer-decoded interfaces, which
will generally loop back to each other).  Various workarounds
currently exist across the codebase, generally involving preceding
calls to intf_nullify() to avoid problems due to known loops.

Provide intfs_shutdown() and intfs_restart() to allow all of an
object's interfaces to be shut down (or restarted) in a single call,
without having to worry about potential external loops.

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