[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>
This commit is contained in:
Michael Brown
2010-09-21 00:55:14 +01:00
parent 1c7f47895c
commit 654da534ad
4 changed files with 50 additions and 5 deletions

View File

@@ -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;

View File

@@ -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 */
/** @} */
/**