58 printf (
"\"%s\": no such port\n", text );
80 printf (
"\"%s\": invalid port ID\n", text );
97 if (
strcasecmp ( (*handler)->name, text ) == 0 )
101 printf (
"\"%s\": unrecognised ELS\n", text );
192 id = &
opts.peer_port_id;
196 id = &
opts.port->ptp_link_port_id;
203 if ( (
rc =
fcels (
opts.port,
id, handler ) ) != 0 )
#define EINVAL
Invalid argument.
struct arbelprm_rc_send_wqe rc
struct list_head fc_peers
int printf(const char *fmt,...)
Write a formatted string to the console.
int fcels(struct fc_port *port, struct fc_port_id *peer_port_id, struct fc_els_handler *handler)
Issue Fibre Channel ELS.
int optind
Current option index.
static struct command_descriptor fcels_cmd
"fcels" command descriptor
A Fibre Channel extended link services handler.
static int fcstat_exec(int argc, char **argv)
The "fcstat" command.
static int parse_fc_els_handler(char *text, struct fc_els_handler **handler)
Parse Fibre Channel ELS handler name.
struct fc_port_id fc_f_port_id
F_Port contoller port ID.
#define ENOENT
No such file or directory.
int strcasecmp(const char *first, const char *second)
Compare case-insensitive strings.
int parse_options(int argc, char **argv, struct command_descriptor *cmd, void *opts)
Parse command-line options.
static int fcels_exec(int argc, char **argv)
The "fcels" command.
struct list_head fc_ports
void fcportstat(struct fc_port *port)
Print status of Fibre Channel port.
#define list_first_entry(list, type, member)
Get the container of the first entry in a list.
Fibre Channel management.
Port is attached to a fabric.
Parse command-line options.
struct fc_port_id peer_port_id
Fibre Channel peer port ID.
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
A Fibre Channel port identifier.
#define list_for_each_entry(pos, head, member)
Iterate over entries in a list.
static int fc_link_ok(struct fc_link_state *link)
Check Fibre Channel link state.
void fcpeerstat(struct fc_peer *peer)
Print status of Fibre Channel peer.
struct command fcmgmt_commands [] __command
Fibre Channel management commands.
static struct command_descriptor fcstat_cmd
"fcstat" command descriptor
struct list_head list
List of all peers.
static struct option_descriptor fcels_opts[]
"fcels" option list
uint8_t id
Request identifier.
struct fc_port_id fc_empty_port_id
Unassigned port ID.
static int parse_fc_port_id(char *text, struct fc_port_id *port_id)
Parse Fibre Channel port ID.
Command line option parsing.
#define for_each_table_entry(pointer, table)
Iterate through all entries within a linker table.
#define ENODEV
No such device.
static struct option_descriptor fcstat_opts[]
"fcstat" option list
#define FC_ELS_HANDLERS
Fibre Channel ELS handler table.
const char * name
Name of the command.
struct fc_port * port
Fibre Channel port.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
#define OPTION_DESC(_longopt, _shortopt, _has_arg, _struct, _field, _parse)
Construct option descriptor.
Option requires an argument.
A command-line option descriptor.
static int parse_fc_port(char *text, struct fc_port **port)
Parse Fibre Channel port name.
struct fc_port * fc_port_find(const char *name)
Find Fibre Channel port by name.
#define COMMAND_DESC(_struct, _options, _min_args, _max_args, _usage)
Construct command descriptor.
struct mschapv2_challenge peer
Peer challenge.
static union @438 opts
"cert<xxx>" option list
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
#define NULL
NULL pointer (VOID *)
Fibre Channel Extended Link Services.
int fc_id_aton(const char *id_text, struct fc_port_id *id)
Parse Fibre Channel port ID.