summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown2010-09-21 01:55:14 +0200
committerMichael Brown2010-09-21 03:06:06 +0200
commit654da534ada4624d20bd1e2835f86ee9c95ca165 (patch)
treed0c9868837954947d3ff034d7d1a2870f3555536 /src/include
parent[lotest] Add loopback testing commands (diff)
downloadipxe-654da534ada4624d20bd1e2835f86ee9c95ca165.tar.gz
ipxe-654da534ada4624d20bd1e2835f86ee9c95ca165.tar.xz
ipxe-654da534ada4624d20bd1e2835f86ee9c95ca165.zip
[fc] Allow FLOGI response to be sent to newly-assigned peer port ID
The response to a received FLOGI should probably be sent to the peer port ID assigned as a result of the WWPN comparison. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ipxe/fc.h22
-rw-r--r--src/include/ipxe/socket.h1
2 files changed, 23 insertions, 0 deletions
diff --git a/src/include/ipxe/fc.h b/src/include/ipxe/fc.h
index 5d73068f2..00571f1fd 100644
--- a/src/include/ipxe/fc.h
+++ b/src/include/ipxe/fc.h
@@ -16,6 +16,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
#include <ipxe/tables.h>
#include <ipxe/interface.h>
#include <ipxe/retry.h>
+#include <ipxe/socket.h>
/******************************************************************************
*
@@ -40,6 +41,27 @@ struct fc_port_id {
/** Length of Fibre Channel port identifier next */
#define FC_PORT_ID_STRLEN 9 /* "xx.xx.xx" */
+/**
+ * Fibre Channel socket address
+ */
+struct sockaddr_fc {
+ /** Socket address family (part of struct @c sockaddr)
+ *
+ * Always set to @c AF_FC for Fibre Channel addresses
+ */
+ sa_family_t sfc_family;
+ /** Port ID */
+ struct fc_port_id sfc_port_id;
+ /** Padding
+ *
+ * This ensures that a struct @c sockaddr_tcpip is large
+ * enough to hold a socket address for any TCP/IP address
+ * family.
+ */
+ char pad[ sizeof ( struct sockaddr ) - sizeof ( sa_family_t )
+ - sizeof ( struct fc_port_id ) ];
+} __attribute__ (( may_alias ));
+
extern struct fc_port_id fc_empty_port_id;
extern struct fc_port_id fc_f_port_id;
extern struct fc_port_id fc_ptp_low_port_id;
diff --git a/src/include/ipxe/socket.h b/src/include/ipxe/socket.h
index ea2972a89..320dae4f1 100644
--- a/src/include/ipxe/socket.h
+++ b/src/include/ipxe/socket.h
@@ -54,6 +54,7 @@ socket_semantics_name ( int semantics ) {
*/
#define AF_INET 1 /**< IPv4 Internet addresses */
#define AF_INET6 2 /**< IPv6 Internet addresses */
+#define AF_FC 3 /**< Fibre Channel addresses */
/** @} */
/**