summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/ipxe')
-rw-r--r--src/include/ipxe/dhcp.h2
-rw-r--r--src/include/ipxe/ipoib.h42
-rw-r--r--src/include/ipxe/netdevice.h9
3 files changed, 34 insertions, 19 deletions
diff --git a/src/include/ipxe/dhcp.h b/src/include/ipxe/dhcp.h
index 34b4d3fda..b97dfe32c 100644
--- a/src/include/ipxe/dhcp.h
+++ b/src/include/ipxe/dhcp.h
@@ -651,8 +651,6 @@ struct dhcphdr {
#define PXEBS_SETTINGS_NAME "pxebs"
extern uint32_t dhcp_last_xid;
-extern unsigned int dhcp_chaddr ( struct net_device *netdev, void *chaddr,
- uint16_t *flags );
extern int dhcp_create_packet ( struct dhcp_packet *dhcppkt,
struct net_device *netdev, uint8_t msgtype,
uint32_t xid, const void *options,
diff --git a/src/include/ipxe/ipoib.h b/src/include/ipxe/ipoib.h
index e8f12dc5d..68ff8df49 100644
--- a/src/include/ipxe/ipoib.h
+++ b/src/include/ipxe/ipoib.h
@@ -8,6 +8,7 @@
FILE_LICENCE ( GPL2_OR_LATER );
+#include <ipxe/if_arp.h>
#include <ipxe/infiniband.h>
/** IPoIB MAC address length */
@@ -33,25 +34,32 @@ struct ipoib_hdr {
/** Network-layer protocol */
uint16_t proto;
/** Reserved, must be zero */
- union {
- /** Reserved, must be zero */
- uint16_t reserved;
- /** Peer addresses
- *
- * We use these fields internally to represent the
- * peer addresses using a lookup key. There simply
- * isn't enough room in the IPoIB header to store
- * literal source or destination MAC addresses.
- */
- struct {
- /** Destination address key */
- uint8_t dest;
- /** Source address key */
- uint8_t src;
- } __attribute__ (( packed )) peer;
- } __attribute__ (( packed )) u;
+ uint16_t reserved;
} __attribute__ (( packed ));
+/** GUID mask used for constructing eIPoIB Local Ethernet MAC address (LEMAC) */
+#define IPOIB_GUID_MASK 0xe7
+
+/** eIPoIB Remote Ethernet MAC address
+ *
+ * An eIPoIB REMAC address is an Ethernet-like (6 byte) link-layer
+ * pseudo-address used to look up a full IPoIB link-layer address.
+ */
+struct ipoib_remac {
+ /** Remote QPN
+ *
+ * Must be ORed with EIPOIB_QPN_LA so that eIPoIB REMAC
+ * addresses are considered as locally-assigned Ethernet MAC
+ * addreses.
+ */
+ uint32_t qpn;
+ /** Remote LID */
+ uint16_t lid;
+} __attribute__ (( packed ));
+
+/** eIPoIB REMAC locally-assigned address indicator */
+#define EIPOIB_QPN_LA 0x02000000UL
+
extern const char * ipoib_ntoa ( const void *ll_addr );
extern struct net_device * alloc_ipoibdev ( size_t priv_size );
diff --git a/src/include/ipxe/netdevice.h b/src/include/ipxe/netdevice.h
index 3633a1659..e5dbd996b 100644
--- a/src/include/ipxe/netdevice.h
+++ b/src/include/ipxe/netdevice.h
@@ -188,8 +188,17 @@ struct ll_protocol {
uint8_t ll_addr_len;
/** Link-layer header length */
uint8_t ll_header_len;
+ /** Flags */
+ unsigned int flags;
};
+/** Local link-layer address functions only as a name
+ *
+ * This flag indicates that the local link-layer address cannot
+ * directly be used as a destination address by a remote node.
+ */
+#define LL_NAME_ONLY 0x0001
+
/** Network device operations */
struct net_device_operations {
/** Open network device