VirtualBox

忽略:
時間撮記:
2023-4-14 下午03:17:44 (2 年 以前)
作者:
vboxsync
svn:sync-xref-src-repo-rev:
156854
訊息:

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

位置:
trunk/src/VBox/Devices/EFI/FirmwareNew
檔案:
修改 2 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Devices/EFI/FirmwareNew

  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Protocol/Dhcp4.h

    r80721 r99404  
    2828typedef struct _EFI_DHCP4_PROTOCOL EFI_DHCP4_PROTOCOL;
    2929
    30 
    3130#pragma pack(1)
    3231typedef struct {
     
    3433  /// DHCP option code.
    3534  ///
    36   UINT8               OpCode;
     35  UINT8    OpCode;
    3736  ///
    3837  /// Length of the DHCP option data. Not present if OpCode is 0 or 255.
    3938  ///
    40   UINT8               Length;
     39  UINT8    Length;
    4140  ///
    4241  /// Start of the DHCP option data. Not present if OpCode is 0 or 255 or if Length is zero.
    4342  ///
    44   UINT8               Data[1];
     43  UINT8    Data[1];
    4544} EFI_DHCP4_PACKET_OPTION;
    4645#pragma pack()
    47 
    4846
    4947#pragma pack(1)
     
    5250///
    5351typedef struct {
    54   UINT8             OpCode;
    55   UINT8             HwType;
    56   UINT8             HwAddrLen;
    57   UINT8             Hops;
    58   UINT32            Xid;
    59   UINT16            Seconds;
    60   UINT16            Reserved;
    61   EFI_IPv4_ADDRESS  ClientAddr;       ///< Client IP address from client.
    62   EFI_IPv4_ADDRESS  YourAddr;         ///< Client IP address from server.
    63   EFI_IPv4_ADDRESS  ServerAddr;       ///< IP address of next server in bootstrap.
    64   EFI_IPv4_ADDRESS  GatewayAddr;      ///< Relay agent IP address.
    65   UINT8             ClientHwAddr[16]; ///< Client hardware address.
    66   CHAR8             ServerName[64];
    67   CHAR8             BootFileName[128];
    68 }EFI_DHCP4_HEADER;
     52  UINT8               OpCode;
     53  UINT8               HwType;
     54  UINT8               HwAddrLen;
     55  UINT8               Hops;
     56  UINT32              Xid;
     57  UINT16              Seconds;
     58  UINT16              Reserved;
     59  EFI_IPv4_ADDRESS    ClientAddr;       ///< Client IP address from client.
     60  EFI_IPv4_ADDRESS    YourAddr;         ///< Client IP address from server.
     61  EFI_IPv4_ADDRESS    ServerAddr;       ///< IP address of next server in bootstrap.
     62  EFI_IPv4_ADDRESS    GatewayAddr;      ///< Relay agent IP address.
     63  UINT8               ClientHwAddr[16]; ///< Client hardware address.
     64  CHAR8               ServerName[64];
     65  CHAR8               BootFileName[128];
     66} EFI_DHCP4_HEADER;
    6967#pragma pack()
    70 
    7168
    7269#pragma pack(1)
     
    7572  /// Size of the EFI_DHCP4_PACKET buffer.
    7673  ///
    77   UINT32              Size;
     74  UINT32    Size;
    7875  ///
    7976  /// Length of the EFI_DHCP4_PACKET from the first byte of the Header field
    8077  /// to the last byte of the Option[] field.
    8178  ///
    82   UINT32              Length;
     79  UINT32    Length;
    8380
    8481  struct {
     
    8683    /// DHCP packet header.
    8784    ///
    88     EFI_DHCP4_HEADER  Header;
     85    EFI_DHCP4_HEADER    Header;
    8986    ///
    9087    /// DHCP magik cookie in network byte order.
    9188    ///
    92     UINT32            Magik;
     89    UINT32              Magik;
    9390    ///
    9491    /// Start of the DHCP packed option data.
    9592    ///
    96     UINT8             Option[1];
     93    UINT8               Option[1];
    9794  } Dhcp4;
    9895} EFI_DHCP4_PACKET;
    9996#pragma pack()
    10097
    101 
    10298typedef enum {
    10399  ///
    104100  /// The EFI DHCPv4 Protocol driver is stopped.
    105101  ///
    106   Dhcp4Stopped        = 0x0,
     102  Dhcp4Stopped = 0x0,
    107103  ///
    108104  /// The EFI DHCPv4 Protocol driver is inactive.
    109105  ///
    110   Dhcp4Init           = 0x1,
     106  Dhcp4Init = 0x1,
    111107  ///
    112108  /// The EFI DHCPv4 Protocol driver is collecting DHCP offer packets from DHCP servers.
    113109  ///
    114   Dhcp4Selecting      = 0x2,
     110  Dhcp4Selecting = 0x2,
    115111  ///
    116112  /// The EFI DHCPv4 Protocol driver has sent the request to the DHCP server and is waiting for a response.
    117113  ///
    118   Dhcp4Requesting     = 0x3,
     114  Dhcp4Requesting = 0x3,
    119115  ///
    120116  /// The DHCP configuration has completed.
    121117  ///
    122   Dhcp4Bound          = 0x4,
     118  Dhcp4Bound = 0x4,
    123119  ///
    124120  /// The DHCP configuration is being renewed and another request has
    125121  /// been sent out, but it has not received a response from the server yet.
    126122  ///
    127   Dhcp4Renewing       = 0x5,
     123  Dhcp4Renewing = 0x5,
    128124  ///
    129125  /// The DHCP configuration has timed out and the EFI DHCPv4
    130126  /// Protocol driver is trying to extend the lease time.
    131127  ///
    132   Dhcp4Rebinding      = 0x6,
     128  Dhcp4Rebinding = 0x6,
    133129  ///
    134130  /// The EFI DHCPv4 Protocol driver was initialized with a previously
    135131  /// allocated or known IP address.
    136132  ///
    137   Dhcp4InitReboot     = 0x7,
     133  Dhcp4InitReboot = 0x7,
    138134  ///
    139135  /// The EFI DHCPv4 Protocol driver is seeking to reuse the previously
    140136  /// allocated IP address by sending a request to the DHCP server.
    141137  ///
    142   Dhcp4Rebooting      = 0x8
     138  Dhcp4Rebooting = 0x8
    143139} EFI_DHCP4_STATE;
    144140
    145 
    146 typedef enum{
     141typedef enum {
    147142  ///
    148143  /// The packet to start the configuration sequence is about to be sent.
    149144  ///
    150   Dhcp4SendDiscover   = 0x01,
     145  Dhcp4SendDiscover = 0x01,
    151146  ///
    152147  /// A reply packet was just received.
    153148  ///
    154   Dhcp4RcvdOffer      = 0x02,
     149  Dhcp4RcvdOffer = 0x02,
    155150  ///
    156151  /// It is time for Dhcp4Callback to select an offer.
    157152  ///
    158   Dhcp4SelectOffer    = 0x03,
     153  Dhcp4SelectOffer = 0x03,
    159154  ///
    160155  /// A request packet is about to be sent.
    161156  ///
    162   Dhcp4SendRequest    = 0x04,
     157  Dhcp4SendRequest = 0x04,
    163158  ///
    164159  /// A DHCPACK packet was received and will be passed to Dhcp4Callback.
    165160  ///
    166   Dhcp4RcvdAck        = 0x05,
     161  Dhcp4RcvdAck = 0x05,
    167162  ///
    168163  /// A DHCPNAK packet was received and will be passed to Dhcp4Callback.
    169164  ///
    170   Dhcp4RcvdNak        = 0x06,
     165  Dhcp4RcvdNak = 0x06,
    171166  ///
    172167  /// A decline packet is about to be sent.
    173168  ///
    174   Dhcp4SendDecline    = 0x07,
     169  Dhcp4SendDecline = 0x07,
    175170  ///
    176171  /// The DHCP configuration process has completed. No packet is associated with this event.
     
    181176  /// that originally issued the network address. No packet is associated with this event.
    182177  ///
    183   Dhcp4EnterRenewing  = 0x09,
     178  Dhcp4EnterRenewing = 0x09,
    184179  ///
    185180  /// It is time to enter the Dhcp4Rebinding state and to contact any server.
     
    192187  /// the Dhcp4Renewing or Dhcp4Rebinding state. No packet is associated with this event.
    193188  ///
    194   Dhcp4AddressLost    = 0x0b,
     189  Dhcp4AddressLost = 0x0b,
    195190  ///
    196191  /// The DHCP process failed because a DHCPNAK packet was received or the user
     
    198193  /// No packet is associated with this event.
    199194  ///
    200   Dhcp4Fail           = 0x0c
     195  Dhcp4Fail = 0x0c
    201196} EFI_DHCP4_EVENT;
    202197
     
    250245  /// Set to zero to use the default try counts and timeout values.
    251246  ///
    252   UINT32                      DiscoverTryCount;
     247  UINT32                     DiscoverTryCount;
    253248  ///
    254249  /// The maximum amount of time (in seconds) to wait for returned packets in each
     
    256251  /// of one second. Set to NULL to use default timeout values.
    257252  ///
    258   UINT32                      *DiscoverTimeout;
     253  UINT32                     *DiscoverTimeout;
    259254  ///
    260255  /// The number of times to try sending a packet during the Dhcp4SendRequest event
     
    262257  /// failure. Set to zero to use the default try counts and timeout values.
    263258  ///
    264   UINT32                      RequestTryCount;
     259  UINT32                     RequestTryCount;
    265260  ///
    266261  /// The maximum amount of time (in seconds) to wait for return packets in each of the retries.
     
    268263  /// Set to NULL to use default timeout values.
    269264  ///
    270   UINT32                      *RequestTimeout;
     265  UINT32                     *RequestTimeout;
    271266  ///
    272267  /// For a DHCPDISCOVER, setting this parameter to the previously allocated IP
     
    276271  /// which was assigned to the client during a DHCPDISCOVER.
    277272  ///
    278   EFI_IPv4_ADDRESS            ClientAddress;
     273  EFI_IPv4_ADDRESS           ClientAddress;
    279274  ///
    280275  /// The callback function to intercept various events that occurred in
    281276  /// the DHCP configuration process. Set to NULL to ignore all those events.
    282277  ///
    283   EFI_DHCP4_CALLBACK          Dhcp4Callback;
     278  EFI_DHCP4_CALLBACK         Dhcp4Callback;
    284279  ///
    285280  /// The pointer to the context that will be passed to Dhcp4Callback when it is called.
    286281  ///
    287   VOID                        *CallbackContext;
     282  VOID                       *CallbackContext;
    288283  ///
    289284  /// Number of DHCP options in the OptionList.
    290285  ///
    291   UINT32                      OptionCount;
     286  UINT32                     OptionCount;
    292287  ///
    293288  /// List of DHCP options to be included in every packet that is sent during the
     
    297292  /// returns. Ignored if OptionCount is zero.
    298293  ///
    299   EFI_DHCP4_PACKET_OPTION     **OptionList;
     294  EFI_DHCP4_PACKET_OPTION    **OptionList;
    300295} EFI_DHCP4_CONFIG_DATA;
    301296
    302 
    303297typedef struct {
    304298  ///
    305299  /// The EFI DHCPv4 Protocol driver operating state.
    306300  ///
    307   EFI_DHCP4_STATE             State;
     301  EFI_DHCP4_STATE          State;
    308302  ///
    309303  /// The configuration data of the current EFI DHCPv4 Protocol driver instance.
    310304  ///
    311   EFI_DHCP4_CONFIG_DATA       ConfigData;
     305  EFI_DHCP4_CONFIG_DATA    ConfigData;
    312306  ///
    313307  /// The client IP address that was acquired from the DHCP server. If it is zero,
    314308  /// the DHCP acquisition has not completed yet and the following fields in this structure are undefined.
    315309  ///
    316   EFI_IPv4_ADDRESS            ClientAddress;
     310  EFI_IPv4_ADDRESS         ClientAddress;
    317311  ///
    318312  /// The local hardware address.
    319313  ///
    320   EFI_MAC_ADDRESS             ClientMacAddress;
     314  EFI_MAC_ADDRESS          ClientMacAddress;
    321315  ///
    322316  /// The server IP address that is providing the DHCP service to this client.
    323317  ///
    324   EFI_IPv4_ADDRESS            ServerAddress;
     318  EFI_IPv4_ADDRESS         ServerAddress;
    325319  ///
    326320  /// The router IP address that was acquired from the DHCP server.
    327321  /// May be zero if the server does not offer this address.
    328322  ///
    329   EFI_IPv4_ADDRESS            RouterAddress;
     323  EFI_IPv4_ADDRESS         RouterAddress;
    330324  ///
    331325  /// The subnet mask of the connected network that was acquired from the DHCP server.
    332326  ///
    333   EFI_IPv4_ADDRESS            SubnetMask;
     327  EFI_IPv4_ADDRESS         SubnetMask;
    334328  ///
    335329  /// The lease time (in 1-second units) of the configured IP address.
     
    337331  /// A default lease of 7 days is used if the DHCP server does not provide a value.
    338332  ///
    339   UINT32                      LeaseTime;
     333  UINT32                   LeaseTime;
    340334  ///
    341335  /// The cached latest DHCPACK or DHCPNAK or BOOTP REPLY packet. May be NULL if no packet is cached.
    342336  ///
    343   EFI_DHCP4_PACKET            *ReplyPacket;
     337  EFI_DHCP4_PACKET         *ReplyPacket;
    344338} EFI_DHCP4_MODE_DATA;
    345339
    346 
    347340typedef struct {
    348341  ///
    349342  /// Alternate listening address. It can be a unicast, multicast, or broadcast address.
    350343  ///
    351   EFI_IPv4_ADDRESS            ListenAddress;
     344  EFI_IPv4_ADDRESS    ListenAddress;
    352345  ///
    353346  /// The subnet mask of above listening unicast/broadcast IP address.
    354347  /// Ignored if ListenAddress is a multicast address.
    355348  ///
    356   EFI_IPv4_ADDRESS            SubnetMask;
     349  EFI_IPv4_ADDRESS    SubnetMask;
    357350  ///
    358351  /// Alternate station source (or listening) port number.
    359352  /// If zero, then the default station port number (68) will be used.
    360353  ///
    361   UINT16                      ListenPort;
     354  UINT16              ListenPort;
    362355} EFI_DHCP4_LISTEN_POINT;
    363356
    364 
    365357typedef struct {
    366358  ///
    367359  /// The completion status of transmitting and receiving.
    368360  ///
    369   EFI_STATUS              Status;
     361  EFI_STATUS                Status;
    370362  ///
    371363  /// If not NULL, the event that will be signaled when the collection process
    372364  /// completes. If NULL, this function will busy-wait until the collection process competes.
    373365  ///
    374   EFI_EVENT               CompletionEvent;
     366  EFI_EVENT                 CompletionEvent;
    375367  ///
    376368  /// The pointer to the server IP address. This address may be a unicast, multicast, or broadcast address.
    377369  ///
    378   EFI_IPv4_ADDRESS        RemoteAddress;
     370  EFI_IPv4_ADDRESS          RemoteAddress;
    379371  ///
    380372  /// The server listening port number. If zero, the default server listening port number (67) will be used.
    381373  ///
    382   UINT16                  RemotePort;
     374  UINT16                    RemotePort;
    383375  ///
    384376  /// The pointer to the gateway address to override the existing setting.
    385377  ///
    386   EFI_IPv4_ADDRESS        GatewayAddress;
     378  EFI_IPv4_ADDRESS          GatewayAddress;
    387379  ///
    388380  /// The number of entries in ListenPoints. If zero, the default station address and port number 68 are used.
    389381  ///
    390   UINT32                  ListenPointCount;
     382  UINT32                    ListenPointCount;
    391383  ///
    392384  /// An array of station address and port number pairs that are used as receiving filters.
    393385  /// The first entry is also used as the source address and source port of the outgoing packet.
    394386  ///
    395   EFI_DHCP4_LISTEN_POINT  *ListenPoints;
     387  EFI_DHCP4_LISTEN_POINT    *ListenPoints;
    396388  ///
    397389  /// The number of seconds to collect responses. Zero is invalid.
    398390  ///
    399   UINT32                  TimeoutValue;
     391  UINT32                    TimeoutValue;
    400392  ///
    401393  /// The pointer to the packet to be transmitted.
    402394  ///
    403   EFI_DHCP4_PACKET        *Packet;
     395  EFI_DHCP4_PACKET          *Packet;
    404396  ///
    405397  /// Number of received packets.
    406398  ///
    407   UINT32                  ResponseCount;
     399  UINT32                    ResponseCount;
    408400  ///
    409401  /// The pointer to the allocated list of received packets.
    410402  ///
    411   EFI_DHCP4_PACKET        *ResponseList;
     403  EFI_DHCP4_PACKET          *ResponseList;
    412404} EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN;
    413 
    414405
    415406/**
     
    488479  );
    489480
    490 
    491481/**
    492482  Starts the DHCP configuration process.
     
    678668  );
    679669
    680 
    681670/**
    682671  Transmits a DHCP formatted packet and optionally waits for responses.
     
    711700  );
    712701
    713 
    714702/**
    715703  Parses the packed DHCP option data.
     
    758746///
    759747struct _EFI_DHCP4_PROTOCOL {
    760   EFI_DHCP4_GET_MODE_DATA      GetModeData;
    761   EFI_DHCP4_CONFIGURE          Configure;
    762   EFI_DHCP4_START              Start;
    763   EFI_DHCP4_RENEW_REBIND       RenewRebind;
    764   EFI_DHCP4_RELEASE            Release;
    765   EFI_DHCP4_STOP               Stop;
    766   EFI_DHCP4_BUILD              Build;
    767   EFI_DHCP4_TRANSMIT_RECEIVE   TransmitReceive;
    768   EFI_DHCP4_PARSE              Parse;
     748  EFI_DHCP4_GET_MODE_DATA       GetModeData;
     749  EFI_DHCP4_CONFIGURE           Configure;
     750  EFI_DHCP4_START               Start;
     751  EFI_DHCP4_RENEW_REBIND        RenewRebind;
     752  EFI_DHCP4_RELEASE             Release;
     753  EFI_DHCP4_STOP                Stop;
     754  EFI_DHCP4_BUILD               Build;
     755  EFI_DHCP4_TRANSMIT_RECEIVE    TransmitReceive;
     756  EFI_DHCP4_PARSE               Parse;
    769757};
    770758
    771 extern EFI_GUID gEfiDhcp4ProtocolGuid;
    772 extern EFI_GUID gEfiDhcp4ServiceBindingProtocolGuid;
     759extern EFI_GUID  gEfiDhcp4ProtocolGuid;
     760extern EFI_GUID  gEfiDhcp4ServiceBindingProtocolGuid;
    773761
    774762#endif
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette