ibft.h File Reference

iSCSI boot firmware table More...

#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


Detailed Description

iSCSI boot firmware table

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 Documentation

#define IBFT_SIG   "iBFT"

iSCSI Boot Firmware Table signature

Definition at line 49 of file ibft.h.

#define IBFT_STRUCTURE_ID_CONTROL   0x01

Structure ID for Control section.

Definition at line 121 of file ibft.h.

#define IBFT_FL_CONTROL_SINGLE_LOGIN_ONLY   0x01

Attempt login only to specified target.

If this flag is not set, all targets will be logged in to.

Definition at line 127 of file ibft.h.

#define IBFT_STRUCTURE_ID_INITIATOR   0x02

Structure ID for Initiator section.

Definition at line 147 of file ibft.h.

#define IBFT_FL_INITIATOR_BLOCK_VALID   0x01

Initiator block valid.

Definition at line 150 of file ibft.h.

#define IBFT_FL_INITIATOR_FIRMWARE_BOOT_SELECTED   0x02

Initiator firmware boot selected.

Definition at line 153 of file ibft.h.

#define IBFT_STRUCTURE_ID_NIC   0x03

Structure ID for NIC section.

Definition at line 188 of file ibft.h.

#define IBFT_FL_NIC_BLOCK_VALID   0x01

NIC block valid.

Definition at line 191 of file ibft.h.

#define IBFT_FL_NIC_FIRMWARE_BOOT_SELECTED   0x02

NIC firmware boot selected.

Definition at line 194 of file ibft.h.

#define IBFT_FL_NIC_GLOBAL   0x04

NIC global / link local.

Definition at line 197 of file ibft.h.

#define IBFT_STRUCTURE_ID_TARGET   0x04

Structure ID for Target section.

Definition at line 232 of file ibft.h.

#define IBFT_FL_TARGET_BLOCK_VALID   0x01

Target block valid.

Definition at line 235 of file ibft.h.

#define IBFT_FL_TARGET_FIRMWARE_BOOT_SELECTED   0x02

Target firmware boot selected.

Definition at line 238 of file ibft.h.

#define IBFT_FL_TARGET_USE_CHAP   0x04

Target use Radius CHAP.

Definition at line 241 of file ibft.h.

#define IBFT_FL_TARGET_USE_RCHAP   0x08

Target use Radius rCHAP.

Definition at line 244 of file ibft.h.

#define IBFT_CHAP_NONE   0

No CHAP authentication.

Definition at line 247 of file ibft.h.

#define IBFT_CHAP_ONE_WAY   1

One-way CHAP.

Definition at line 248 of file ibft.h.

Referenced by ibft_fill_target_chap().

#define IBFT_CHAP_MUTUAL   2

Mutual CHAP.

Definition at line 249 of file ibft.h.

Referenced by ibft_fill_target_reverse_chap().

#define IBFT_STRINGS_SIZE   384

Amount of space reserved for strings in a gPXE iBFT.

Definition at line 277 of file ibft.h.


Typedef Documentation

An offset from the start of the iBFT.

Definition at line 52 of file ibft.h.

Length of a string within the iBFT (excluding terminating NUL).

Definition at line 55 of file ibft.h.


Function Documentation

FILE_LICENCE ( BSD2   ) 

int ibft_fill_data ( struct net_device netdev,
struct iscsi_session iscsi 
)

Fill in all variable portions of iBFT.

Parameters:
netdev Network device
initiator_iqn Initiator IQN
st_target Target socket address
target_iqn Target IQN
Return values:
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 }


Variable Documentation

struct gpxe_ibft packed

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.


Generated on Tue Apr 6 20:01:12 2010 for gPXE by  doxygen 1.5.7.1