aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/interface.h
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2017-02-02 15:49:21 +0000
committerMichael Brown <mcb30@ipxe.org>2017-02-02 15:49:21 +0000
commit23b788e5cdd7fcfa863a476a1448870ac3cf0103 (patch)
tree71adb0fc07eef44c176e7e8b43d903e9d6bba47e /src/include/ipxe/interface.h
parenta8f80a75d25970f1e4e607e761a153a7d57b9a15 (diff)
downloadipxe-23b788e5cdd7fcfa863a476a1448870ac3cf0103.tar.gz
[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>
Diffstat (limited to 'src/include/ipxe/interface.h')
-rw-r--r--src/include/ipxe/interface.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/ipxe/interface.h b/src/include/ipxe/interface.h
index ebb1b6911..b65002c80 100644
--- a/src/include/ipxe/interface.h
+++ b/src/include/ipxe/interface.h
@@ -10,6 +10,7 @@
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <stddef.h>
+#include <stdarg.h>
#include <ipxe/refcnt.h>
/** An object interface operation */
@@ -148,7 +149,11 @@ extern void intf_close ( struct interface *intf, int rc );
typeof ( void ( object_type, int rc ) )
extern void intf_shutdown ( struct interface *intf, int rc );
+extern void intfs_vshutdown ( va_list intfs, int rc );
+extern void intfs_shutdown ( int rc, ... ) __attribute__ (( sentinel ));
extern void intf_restart ( struct interface *intf, int rc );
+extern void intfs_vrestart ( va_list intfs, int rc );
+extern void intfs_restart ( int rc, ... ) __attribute__ (( sentinel ));
extern void intf_poke ( struct interface *intf,
void ( type ) ( struct interface *intf ) );