PxeBcImpl.h revision 4fd606d1f5abe38e1f42c38de1d2e895166bd0f4
/** @file
This EFI_PXE_BASE_CODE_PROTOCOL and EFI_LOAD_FILE_PROTOCOL.
interfaces declaration.
Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __EFI_PXEBC_IMPL_H__
#define __EFI_PXEBC_IMPL_H__
#include <Uefi.h>
#include <IndustryStandard/SmBios.h>
#include <Protocol/NetworkInterfaceIdentifier.h>
#include <Protocol/Ip6Config.h>
#include <Protocol/PxeBaseCode.h>
#include <Protocol/LoadFile.h>
#include <Protocol/PxeBaseCodeCallBack.h>
#include <Protocol/ServiceBinding.h>
#include <Protocol/DriverBinding.h>
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiDriverEntryPoint.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/DevicePathLib.h>
typedef struct _PXEBC_PRIVATE_DATA PXEBC_PRIVATE_DATA;
typedef struct _PXEBC_PRIVATE_PROTOCOL PXEBC_PRIVATE_PROTOCOL;
typedef struct _PXEBC_VIRTUAL_NIC PXEBC_VIRTUAL_NIC;
#include "PxeBcDriver.h"
#include "PxeBcDhcp4.h"
#include "PxeBcDhcp6.h"
#include "PxeBcMtftp.h"
#include "PxeBcBoot.h"
#include "PxeBcSupport.h"
#define PXEBC_DEFAULT_HOPLIMIT 64
#define PXEBC_MTFTP_TIMEOUT 4
#define PXEBC_MTFTP_RETRIES 6
#define PXEBC_MENU_MAX_NUM 24
#define PXEBC_OFFER_MAX_NUM 16
#define PXEBC_PRIVATE_DATA_FROM_PXEBC(a) CR (a, PXEBC_PRIVATE_DATA, PxeBc, PXEBC_PRIVATE_DATA_SIGNATURE)
#define PXEBC_VIRTUAL_NIC_FROM_LOADFILE(a) CR (a, PXEBC_VIRTUAL_NIC, LoadFile, PXEBC_VIRTUAL_NIC_SIGNATURE)
typedef union {
struct _PXEBC_PRIVATE_PROTOCOL {
};
struct _PXEBC_VIRTUAL_NIC {
};
struct _PXEBC_PRIVATE_DATA {
//
// OfferIndex records the index of DhcpOffer[] buffer, and OfferCount records the num of each type of offer.
//
// It supposed that
//
// OfferNum: 8
// OfferBuffer: [ProxyBinl, ProxyBinl, DhcpOnly, ProxyPxe10, DhcpOnly, DhcpPxe10, DhcpBinl, ProxyBinl]
// (OfferBuffer is 0-based.)
//
// And assume that (DhcpPxe10 is the first priority actually.)
//
// SelectIndex: 2
// SelectProxyType: PXEBC_OFFER_TYPE_PROXY_BINL
// (SelectIndex is 1-based, and 0 means no one is selected.)
//
// So it should be
//
// DhcpOnly DhcpPxe10 DhcpWfm11a DhcpBinl ProxyPxe10 ProxyWfm11a ProxyBinl Bootp
// OfferCount: [ 2(n), 1(n), 0(n), 1(n), 1(1), 0(1), 3(n), 1(1)]
//
// OfferIndex: {[ 2, 5, 0, 6, 3, 0, *0, 0]
// [ 4, 0, 0, 0, 0, 0, 1, 0]
// [ 0, 0, 0, 0, 0, 0, 7, 0]
// ... ]}
// (OfferIndex is 0-based.)
//
//
};
#endif