Go to the source code of this file.
Data Structures | |
| struct | cmd_options_t |
Macros | |
| #define | ELXU_VERSION STR_BE_MAJOR "." STR_BE_MINOR "." STR_BE_BUILD "." STR_BE_BRANCH |
| #define | TRANSCEIVER_INFO_PAGE_SIZE 256 |
| #define | ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) |
| #define | ROUNDUP(x, y) ((((x) + ((y)-1)) / (y)) * (y)) |
| #define | LINKCFG_VALUE_NAME_MAX 256 |
| #define | LINKSPEED_VALUE_NAME_MAX 64 |
| #define | LINKTOPO_VALUE_NAME_MAX 16 |
Functions | |
| static uint32_t | addr32_lo (uintptr_t addr) |
| static uint32_t | addr32_hi (uintptr_t addr) |
| void * | zmalloc (uint32_t len) |
| Allocates and zeroes memory to be used. More... | |
| void | zfree (void *p) |
| Frees memory that has been allocated. More... | |
| void | elxu_display_device_list (char *hostname) |
| Display the list of available devices. More... | |
| void | elxu_hba_list_info (elxu_device_t *device_p) |
| Displays HBA List information. More... | |
| int | parse_wwn (char *wwn_in, uint64_t *wwn_out) |
| Parse a WWN from a string into a 64-bit value. More... | |
| char * | format_wwn (uint64_t wwn_in) |
| Format a 64-bit WWN for printing. More... | |
| void | dump8 (const char *label, void *buffer, uint32_t bufferLength) |
| Print a buffer in hexadecimal and ASCII. More... | |
| char * | hex_dump (uint8_t *value, int size) |
| Display a buffer in hexadecimal. More... | |
| char * | trimmed_string (uint8_t *string) |
| Trim trailing non-printable characters from a string. More... | |
| char * | decode_entry_type (uint32_t entry_type) |
| Return the name of a UFI entry type. More... | |
| char * | get_numa_node_map (uint32_t device_port) |
| Return a string of cpu to numa node mapping . More... | |
| char * | get_physical_numa_node (char *bus_addr) |
| Return the physical Numa Node location for an OCS port . More... | |
| int | parse_arguments (int argc, char **argv, cmd_options_t *options, int openflag, int expected_nonargs) |
| Parse command line arguments. More... | |
| void | elxu_get_connection_info (elxu_device_t *device) |
| Print iSCSI connection info for the given device. More... | |
| elxu_device_t * | os_open_device (elxu_device_name_t *devname) |
| Open a device file. More... | |
| void | os_close_device (elxu_device_t *device) |
| Close a device file. More... | |
| int | os_ioctl_device (elxu_device_t *device, int req, void *arg) |
| Send an ioctl to an open device. More... | |
| elxu_device_t * | os_build_device_list (char *path) |
| Build a list of devices. More... | |
| elxu_device_t * | os_build_device_list_uspace (char *hostname) |
| int | os_remove_device (elxu_device_t *device) |
| #define ARRAY_SIZE | ( | x | ) | (sizeof(x) / sizeof(x[0])) |
Definition at line 46 of file elxu_common.h.
| #define ELXU_VERSION STR_BE_MAJOR "." STR_BE_MINOR "." STR_BE_BUILD "." STR_BE_BRANCH |
Definition at line 40 of file elxu_common.h.
| #define LINKCFG_VALUE_NAME_MAX 256 |
Definition at line 95 of file elxu_common.h.
| #define LINKSPEED_VALUE_NAME_MAX 64 |
Definition at line 97 of file elxu_common.h.
| #define LINKTOPO_VALUE_NAME_MAX 16 |
Definition at line 99 of file elxu_common.h.
| #define ROUNDUP | ( | x, | |
| y | |||
| ) | ((((x) + ((y)-1)) / (y)) * (y)) |
Definition at line 49 of file elxu_common.h.
| #define TRANSCEIVER_INFO_PAGE_SIZE 256 |
Definition at line 43 of file elxu_common.h.
|
inlinestatic |
Definition at line 59 of file elxu_common.h.
|
inlinestatic |
Definition at line 50 of file elxu_common.h.
| char* decode_entry_type | ( | uint32_t | entry_type | ) |
Return the name of a UFI entry type.
| entry_type | The type of the entry to lookup. |
Definition at line 474 of file elxu_common.c.
| void dump8 | ( | const char * | label, |
| void * | buffer, | ||
| uint32_t | bufferLength | ||
| ) |
Print a buffer in hexadecimal and ASCII.
| label | Label to be printed above the output. |
| buffer | Buffer of binary data to be printed. |
| bufferLength | Length of buffer. |
Definition at line 100 of file elxu_common.c.
| void elxu_display_device_list | ( | char * | hostname | ) |
Display the list of available devices.
| hostname | hostname in the case of the user space driver. |
Definition at line 152 of file elxu_common.c.
| void elxu_get_connection_info | ( | elxu_device_t * | device | ) |
Print iSCSI connection info for the given device.
| device | The device for which to print connection info. |
Definition at line 230 of file elxu_bsd.c.
| void elxu_hba_list_info | ( | elxu_device_t * | device_p | ) |
Displays HBA List information.
| device_p | A pointer to an elxu_device_t. The device should already have been opened with elxu_open_device. |
Definition at line 188 of file elxu_common.c.
| char* format_wwn | ( | uint64_t | wwn_in | ) |
Format a 64-bit WWN for printing.
| wwn_in | uint64_t containing the WWN |
Definition at line 368 of file elxu_common.c.
| char* get_numa_node_map | ( | uint32_t | device_port | ) |
Return a string of cpu to numa node mapping .
| device_port | The type of the port to list the cpu to numa node map. |
Definition at line 537 of file elxu_common.c.
| char* get_physical_numa_node | ( | char * | bus_addr | ) |
Return the physical Numa Node location for an OCS port .
| bus_addr | The bus address for the current OCS port |
Definition at line 658 of file elxu_common.c.
| char* hex_dump | ( | uint8_t * | value, |
| int | size | ||
| ) |
Display a buffer in hexadecimal.
| value | A pointer to an array of bytes to be printed. |
| size | The size of the array. The maximum size that can be handled is 25 bytes. Values larger than 25 will result in only the first 25 bytes being printed. |
Definition at line 401 of file elxu_common.c.
| elxu_device_t* os_build_device_list_uspace | ( | char * | hostname | ) |
Definition at line 123 of file elxu_bsd.c.
| void os_close_device | ( | elxu_device_t * | device | ) |
Close a device file.
| device | A pointer to an elxu_device_t to be closed. |
Definition at line 187 of file elxu_bsd.c.
| int os_ioctl_device | ( | elxu_device_t * | device, |
| int | req, | ||
| void * | arg | ||
| ) |
Send an ioctl to an open device.
| device | A pointer to the device. |
| req | The request to be sent to the device. |
| arg | The argument to be sent to the device. |
Definition at line 211 of file elxu_bsd.c.
| elxu_device_t* os_open_device | ( | elxu_device_name_t * | devname | ) |
Open a device file.
| devname | An elxu_device_name_t structure that specifies the device to be opened. |
Definition at line 148 of file elxu_bsd.c.
| int os_remove_device | ( | elxu_device_t * | device | ) |
Definition at line 193 of file elxu_bsd.c.
| int parse_arguments | ( | int | argc, |
| char ** | argv, | ||
| cmd_options_t * | options, | ||
| int | openflag, | ||
| int | expected_nonargs | ||
| ) |
Parse command line arguments.
| argc | Count of arguments. |
| argv | Array of pointers to argument strings. |
| options | Pointer to array into which the results will be stored. |
| openflag | If TRUE the device specified by the options should be opened. |
| expected_nonargs | Expected number of extra arguments. |
Definition at line 5572 of file elxu_commands.c.
| int parse_wwn | ( | char * | wwn_in, |
| uint64_t * | wwn_out | ||
| ) |
Parse a WWN from a string into a 64-bit value.
| wwn_in | Pointer to the string to be parsed. |
| wwn_out | Pointer to uint64_t in which to put the parsed result. |
Definition at line 327 of file elxu_common.c.
| char* trimmed_string | ( | uint8_t * | string | ) |
Trim trailing non-printable characters from a string.
| string | A pointer to the string to be trimmed. |
Definition at line 437 of file elxu_common.c.
| void zfree | ( | void * | p | ) |
Frees memory that has been allocated.
| p | The pointer to the memory to be freed. |
Definition at line 80 of file elxu_common.c.
| void* zmalloc | ( | uint32_t | len | ) |
Allocates and zeroes memory to be used.
| len | The amount of memory to be zeroed and allocated. |
Definition at line 63 of file elxu_common.c.