summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/interface.h
diff options
context:
space:
mode:
authorSimon Rettberg2021-03-08 15:55:33 +0100
committerSimon Rettberg2021-03-08 15:55:33 +0100
commit6707d9218c8e6e760e53068d5f41ceb31fac6ea0 (patch)
tree88e8fc84ede2a0ed2c1cec3a6109beb9fb53abf5 /src/include/ipxe/interface.h
parentMerge branch 'master' into openslx (diff)
parent[linux] Do not assume that stat() works on sysfs files (diff)
downloadipxe-6707d9218c8e6e760e53068d5f41ceb31fac6ea0.tar.gz
ipxe-6707d9218c8e6e760e53068d5f41ceb31fac6ea0.tar.xz
ipxe-6707d9218c8e6e760e53068d5f41ceb31fac6ea0.zip
Merge branch 'master' into openslx
Diffstat (limited to 'src/include/ipxe/interface.h')
-rw-r--r--src/include/ipxe/interface.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/include/ipxe/interface.h b/src/include/ipxe/interface.h
index b65002c80..19f58a4b4 100644
--- a/src/include/ipxe/interface.h
+++ b/src/include/ipxe/interface.h
@@ -36,6 +36,21 @@ struct interface_operation {
? op_func : op_func ), \
}
+/**
+ * Define an unused object interface operation
+ *
+ * @v op_type Operation type
+ * @v object_type Implementing method's expected object type
+ * @v op_func Implementing method
+ * @ret op Object interface operation
+ */
+#define UNUSED_INTF_OP( op_type, object_type, op_func ) { \
+ .type = NULL, \
+ .func = ( ( ( ( typeof ( op_func ) * ) NULL ) == \
+ ( ( op_type ## _TYPE ( object_type ) * ) NULL ) ) \
+ ? NULL : NULL ), \
+ }
+
/** An object interface descriptor */
struct interface_descriptor {
/** Offset of interface within containing object */
@@ -154,6 +169,8 @@ 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_insert ( struct interface *intf, struct interface *upper,
+ struct interface *lower );
extern void intf_poke ( struct interface *intf,
void ( type ) ( struct interface *intf ) );