summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/ipxe')
-rw-r--r--src/include/ipxe/eoib.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/include/ipxe/eoib.h b/src/include/ipxe/eoib.h
index acae542b6..93f496c36 100644
--- a/src/include/ipxe/eoib.h
+++ b/src/include/ipxe/eoib.h
@@ -49,11 +49,31 @@ struct eoib_device {
/** Peer cache */
struct list_head peers;
+ /** Send duplicate packet to gateway (or NULL)
+ *
+ * @v eoib EoIB device
+ * @v original Original I/O buffer
+ */
+ void ( * duplicate ) ( struct eoib_device *eoib,
+ struct io_buffer *original );
+ /** Gateway (if any) */
+ struct ib_address_vector gateway;
/** Multicast group additional component mask */
unsigned int mask;
};
/**
+ * Check if EoIB device uses a gateway
+ *
+ * @v eoib EoIB device
+ * @v has_gw EoIB device uses a gateway
+ */
+static inline int eoib_has_gateway ( struct eoib_device *eoib ) {
+
+ return ( eoib->duplicate != NULL );
+}
+
+/**
* Force creation of multicast group
*
* @v eoib EoIB device
@@ -77,5 +97,7 @@ extern int eoib_create ( struct ib_device *ibdev, const uint8_t *hw_addr,
extern struct eoib_device * eoib_find ( struct ib_device *ibdev,
const uint8_t *hw_addr );
extern void eoib_destroy ( struct eoib_device *eoib );
+extern void eoib_set_gateway ( struct eoib_device *eoib,
+ struct ib_address_vector *av );
#endif /* _IPXE_EOIB_H */