#include <stdint.h>
#include <gpxe/acpi.h>
#include <gpxe/in.h>
Go to the source code of this file.
Data Structures | |
| struct | ibft_string |
| A string within the iBFT. More... | |
| struct | ibft_ipaddr |
| An IP address within the iBFT. More... | |
| struct | ibft_header |
| iBFT structure header More... | |
| struct | ibft_control |
| iBFT Control structure More... | |
| struct | ibft_initiator |
| iBFT Initiator structure More... | |
| struct | ibft_nic |
| iBFT NIC structure More... | |
| struct | ibft_target |
| iBFT Target structure More... | |
| struct | ibft_table |
| iSCSI Boot Firmware Table (iBFT) More... | |
| struct | ibft_string_block |
| iSCSI string block descriptor More... | |
| struct | gpxe_ibft |
| An iBFT created by gPXE. More... | |
Defines | |
| #define | IBFT_SIG "iBFT" |
| iSCSI Boot Firmware Table signature | |
| #define | IBFT_STRUCTURE_ID_CONTROL 0x01 |
| Structure ID for Control section. | |
| #define | IBFT_FL_CONTROL_SINGLE_LOGIN_ONLY 0x01 |
| Attempt login only to specified target. | |
| #define | IBFT_STRUCTURE_ID_INITIATOR 0x02 |
| Structure ID for Initiator section. | |
| #define | IBFT_FL_INITIATOR_BLOCK_VALID 0x01 |
| Initiator block valid. | |
| #define | IBFT_FL_INITIATOR_FIRMWARE_BOOT_SELECTED 0x02 |
| Initiator firmware boot selected. | |
| #define | IBFT_STRUCTURE_ID_NIC 0x03 |
| Structure ID for NIC section. | |
| #define | IBFT_FL_NIC_BLOCK_VALID 0x01 |
| NIC block valid. | |
| #define | IBFT_FL_NIC_FIRMWARE_BOOT_SELECTED 0x02 |
| NIC firmware boot selected. | |
| #define | IBFT_FL_NIC_GLOBAL 0x04 |
| NIC global / link local. | |
| #define | IBFT_STRUCTURE_ID_TARGET 0x04 |
| Structure ID for Target section. | |
| #define | IBFT_FL_TARGET_BLOCK_VALID 0x01 |
| Target block valid. | |
| #define | IBFT_FL_TARGET_FIRMWARE_BOOT_SELECTED 0x02 |
| Target firmware boot selected. | |
| #define | IBFT_FL_TARGET_USE_CHAP 0x04 |
| Target use Radius CHAP. | |
| #define | IBFT_FL_TARGET_USE_RCHAP 0x08 |
| Target use Radius rCHAP. | |
| #define | IBFT_CHAP_NONE 0 |
| No CHAP authentication. | |
| #define | IBFT_CHAP_ONE_WAY 1 |
| One-way CHAP. | |
| #define | IBFT_CHAP_MUTUAL 2 |
| Mutual CHAP. | |
| #define | IBFT_STRINGS_SIZE 384 |
| Amount of space reserved for strings in a gPXE iBFT. | |
Typedefs | |
| typedef uint16_t | ibft_off_t |
| An offset from the start of the iBFT. | |
| typedef uint16_t | ibft_size_t |
| Length of a string within the iBFT (excluding terminating NUL). | |
Functions | |
| FILE_LICENCE (BSD2) | |
| int | ibft_fill_data (struct net_device *netdev, struct iscsi_session *iscsi) |
| Fill in all variable portions of iBFT. | |
Variables | |
| struct ibft_string | packed |
| A string within the iBFT. | |
| struct gpxe_ibft | aligned |
The information in this file is derived from the document "iSCSI Boot Firmware Table (iBFT)" as published by IBM at
ftp://ftp.software.ibm.com/systems/support/system_x_pdf/ibm_iscsi_boot_firmware_table_v1.02.pdf
Definition in file ibft.h.
| #define IBFT_STRUCTURE_ID_CONTROL 0x01 |
| #define IBFT_FL_CONTROL_SINGLE_LOGIN_ONLY 0x01 |
| #define IBFT_STRUCTURE_ID_INITIATOR 0x02 |
| #define IBFT_FL_INITIATOR_BLOCK_VALID 0x01 |
| #define IBFT_FL_INITIATOR_FIRMWARE_BOOT_SELECTED 0x02 |
| #define IBFT_STRUCTURE_ID_NIC 0x03 |
| #define IBFT_FL_NIC_FIRMWARE_BOOT_SELECTED 0x02 |
| #define IBFT_STRUCTURE_ID_TARGET 0x04 |
| #define IBFT_FL_TARGET_FIRMWARE_BOOT_SELECTED 0x02 |
| #define IBFT_FL_TARGET_USE_RCHAP 0x08 |
| #define IBFT_CHAP_ONE_WAY 1 |
| #define IBFT_CHAP_MUTUAL 2 |
| #define IBFT_STRINGS_SIZE 384 |
| typedef uint16_t ibft_off_t |
| typedef uint16_t ibft_size_t |
| FILE_LICENCE | ( | BSD2 | ) |
| int ibft_fill_data | ( | struct net_device * | netdev, | |
| struct iscsi_session * | iscsi | |||
| ) |
Fill in all variable portions of iBFT.
| netdev | Network device | |
| initiator_iqn | Initiator IQN | |
| st_target | Target socket address | |
| target_iqn | Target IQN |
| rc | Return status code |
Definition at line 429 of file ibft.c.
References acpi_fix_checksum(), ibft_fill_initiator(), ibft_fill_nic(), ibft_fill_target(), ibftab, offsetof, and ibft_string_block::table.
Referenced by iscsiboot().
00430 { 00431 struct ibft_string_block strings = { 00432 .table = &ibftab.table, 00433 .offset = offsetof ( typeof ( ibftab ), strings ), 00434 }; 00435 int rc; 00436 00437 /* Fill in NIC, Initiator and Target portions */ 00438 if ( ( rc = ibft_fill_nic ( &ibftab.nic, &strings, netdev ) ) != 0 ) 00439 return rc; 00440 if ( ( rc = ibft_fill_initiator ( &ibftab.initiator, 00441 &strings ) ) != 0 ) 00442 return rc; 00443 if ( ( rc = ibft_fill_target ( &ibftab.target, &strings, 00444 iscsi ) ) != 0 ) 00445 return rc; 00446 00447 /* Update checksum */ 00448 acpi_fix_checksum ( &ibftab.table.acpi ); 00449 00450 return 0; 00451 }
A string within the iBFT.
An iBFT created by gPXE.
iSCSI Boot Firmware Table (iBFT)
iBFT Target structure
iBFT NIC structure
iBFT Initiator structure
iBFT Control structure
iBFT structure header
An IP address within the iBFT.
This structure is common to several sections within the iBFT.
1.5.7.1