VirtualBox

Ignore:
Timestamp:
Oct 29, 2015 4:30:44 AM (9 years ago)
Author:
vboxsync
Message:

EFI/Firmware: Merged in the svn:eol-style, svn:mime-type and trailing whitespace cleanup that was done after the initial UDK2014.SP1 import: svn merge /vendor/edk2/UDK2014.SP1 /vendor/edk2/current .

Location:
trunk/src/VBox/Devices/EFI/Firmware
Files:
129 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/Firmware

  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c

    r58459 r58466  
    11/** @file
    22  ARP driver functions.
    3  
     3
    44Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    3636
    3737  @retval EFI_SUCCESS                The arp service context is initialized.
    38  
     38
    3939  @retval EFI_UNSUPPORTED            The underlayer Snp mode type is not ethernet.
    4040                                     Failed to initialize the service context.
     
    244244/**
    245245  Callback function which provided by user to remove one node in NetDestroyLinkList process.
    246  
     246
    247247  @param[in]    Entry           The entry to be removed.
    248248  @param[in]    Context         Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
     
    261261  ARP_INSTANCE_DATA             *Instance;
    262262  EFI_SERVICE_BINDING_PROTOCOL  *ServiceBinding;
    263  
     263
    264264  if (Entry == NULL || Context == NULL) {
    265265    return EFI_INVALID_PARAMETER;
     
    273273
    274274/**
    275   Tests to see if this driver supports a given controller. 
    276  
    277   If a child device is provided, it further tests to see if this driver supports 
     275  Tests to see if this driver supports a given controller.
     276
     277  If a child device is provided, it further tests to see if this driver supports
    278278  creating a handle for the specified child device.
    279279
    280280  @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
    281   @param[in]  ControllerHandle     The handle of the controller to test. This handle 
    282                                    must support a protocol interface that supplies 
     281  @param[in]  ControllerHandle     The handle of the controller to test. This handle
     282                                   must support a protocol interface that supplies
    283283                                   an I/O abstraction to the driver.
    284   @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path. 
    285                                    This parameter is ignored by device drivers, 
     284  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.
     285                                   This parameter is ignored by device drivers,
    286286                                   and is optional for bus drivers.
    287287
    288288  @retval EFI_SUCCESS              The device specified by ControllerHandle and
    289                                    RemainingDevicePath is supported by the driver 
     289                                   RemainingDevicePath is supported by the driver
    290290                                   specified by This.
    291291  @retval EFI_ALREADY_STARTED      The device specified by ControllerHandle and
    292                                    RemainingDevicePath is already being managed 
     292                                   RemainingDevicePath is already being managed
    293293                                   by the driver specified by This.
    294294  @retval EFI_ACCESS_DENIED        The device specified by ControllerHandle and
    295                                    RemainingDevicePath is already being managed by 
    296                                    a different driver or an application that 
     295                                   RemainingDevicePath is already being managed by
     296                                   a different driver or an application that
    297297                                   requires exclusive acces. Currently not implemented.
    298298  @retval EFI_UNSUPPORTED          The device specified by ControllerHandle and
    299                                    RemainingDevicePath is not supported by the 
     299                                   RemainingDevicePath is not supported by the
    300300                                   driver specified by This.
    301301
     
    343343
    344344/**
    345   Start this driver on ControllerHandle. 
    346  
    347   The Start() function is designed to be invoked from the EFI boot service ConnectController(). 
    348   As a result, much of the error checking on the parameters to Start() has been 
    349   moved into this common boot service. It is legal to call Start() from other locations, 
    350   but the following calling restrictions must be followed or the system behavior 
     345  Start this driver on ControllerHandle.
     346
     347  The Start() function is designed to be invoked from the EFI boot service ConnectController().
     348  As a result, much of the error checking on the parameters to Start() has been
     349  moved into this common boot service. It is legal to call Start() from other locations,
     350  but the following calling restrictions must be followed or the system behavior
    351351  will not be deterministic.
    352352  1. ControllerHandle must be a valid EFI_HANDLE.
    353   2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally 
     353  2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally
    354354     aligned EFI_DEVICE_PATH_PROTOCOL.
    355   3. Prior to calling Start(), the Supported() function for the driver specified 
    356      by This must have been called with the same calling parameters, and Supported() 
    357      must have returned EFI_SUCCESS. 
     355  3. Prior to calling Start(), the Supported() function for the driver specified
     356     by This must have been called with the same calling parameters, and Supported()
     357     must have returned EFI_SUCCESS.
    358358
    359359  @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
    360   @param[in]  ControllerHandle     The handle of the controller to start. This handle 
    361                                    must support a protocol interface that supplies 
     360  @param[in]  ControllerHandle     The handle of the controller to start. This handle
     361                                   must support a protocol interface that supplies
    362362                                   an I/O abstraction to the driver.
    363   @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path. 
    364                                    This parameter is ignored by device drivers, 
     363  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.
     364                                   This parameter is ignored by device drivers,
    365365                                   and is optional for bus drivers.
    366366
     
    368368  @retval EFI_DEVICE_ERROR         The device could not be started due to a device error.
    369369                                   Currently not implemented.
    370   @retval EFI_OUT_OF_RESOURCES     The request could not be completed due to a lack of 
     370  @retval EFI_OUT_OF_RESOURCES     The request could not be completed due to a lack of
    371371                                   resources.
    372372  @retval Others                   The driver failded to start the device.
     
    436436
    437437/**
    438   Stop this driver on ControllerHandle. 
    439  
     438  Stop this driver on ControllerHandle.
     439
    440440  Release the control of this controller and remove the IScsi functions. The Stop()
    441   function is designed to be invoked from the EFI boot service DisconnectController(). 
    442   As a result, much of the error checking on the parameters to Stop() has been moved 
    443   into this common boot service. It is legal to call Stop() from other locations, 
    444   but the following calling restrictions must be followed or the system behavior 
     441  function is designed to be invoked from the EFI boot service DisconnectController().
     442  As a result, much of the error checking on the parameters to Stop() has been moved
     443  into this common boot service. It is legal to call Stop() from other locations,
     444  but the following calling restrictions must be followed or the system behavior
    445445  will not be deterministic.
    446446  1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
     
    450450     Start() function, and the Start() function must have called OpenProtocol() on
    451451     ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
    452  
     452
    453453  @param[in]  This              A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
    454   @param[in]  ControllerHandle  A handle to the device being stopped. The handle must 
    455                                 support a bus specific I/O protocol for the driver 
     454  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must
     455                                support a bus specific I/O protocol for the driver
    456456                                to use to stop the device.
    457457  @param[in]  NumberOfChildren  The number of child device handles in ChildHandleBuffer.
    458458                                Not used.
    459   @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL 
     459  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL
    460460                                if NumberOfChildren is 0.Not used.
    461461
     
    543543/**
    544544  Creates a child handle and installs a protocol.
    545  
    546   The CreateChild() function installs a protocol on ChildHandle. 
    547   If ChildHandle is a pointer to NULL, then a new handle is created and returned 
    548   in ChildHandle. If ChildHandle is not a pointer to NULL, then the protocol 
     545
     546  The CreateChild() function installs a protocol on ChildHandle.
     547  If ChildHandle is a pointer to NULL, then a new handle is created and returned
     548  in ChildHandle. If ChildHandle is not a pointer to NULL, then the protocol
    549549  installs on the existing ChildHandle.
    550550
    551551  @param  This        Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
    552552  @param  ChildHandle Pointer to the handle of the child to create. If it is NULL,
    553                       then a new handle is created. If it is a pointer to an existing 
     553                      then a new handle is created. If it is a pointer to an existing
    554554                      UEFI handle, then the protocol is added to the existing UEFI handle.
    555555
     
    671671/**
    672672  Destroys a child handle with a protocol installed on it.
    673  
    674   The DestroyChild() function does the opposite of CreateChild(). It removes a protocol 
    675   that was installed by CreateChild() from ChildHandle. If the removed protocol is the 
     673
     674  The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
     675  that was installed by CreateChild() from ChildHandle. If the removed protocol is the
    676676  last protocol on ChildHandle, then ChildHandle is destroyed.
    677677
     
    680680
    681681  @retval EFI_SUCCES            The protocol was removed from ChildHandle.
    682   @retval EFI_UNSUPPORTED       ChildHandle does not support the protocol that is 
     682  @retval EFI_UNSUPPORTED       ChildHandle does not support the protocol that is
    683683                                being removed.
    684684  @retval EFI_INVALID_PARAMETER Child handle is NULL.
     
    794794  @param[in]  SystemTable        The system table.
    795795
    796   @retval EFI_SUCCESS            if the driver binding and component name protocols 
     796  @retval EFI_SUCCESS            if the driver binding and component name protocols
    797797                                 are successfully
    798798  @retval Others                 Failed to install the protocols.
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.h

    r48674 r58466  
    11/** @file
    22  ARP driver header file.
    3  
     3
    44Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    4040//
    4141/**
    42   Tests to see if this driver supports a given controller. 
    43  
    44   If a child device is provided, it further tests to see if this driver supports 
     42  Tests to see if this driver supports a given controller.
     43
     44  If a child device is provided, it further tests to see if this driver supports
    4545  creating a handle for the specified child device.
    4646
    4747  @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
    48   @param[in]  ControllerHandle     The handle of the controller to test. This handle 
    49                                    must support a protocol interface that supplies 
     48  @param[in]  ControllerHandle     The handle of the controller to test. This handle
     49                                   must support a protocol interface that supplies
    5050                                   an I/O abstraction to the driver.
    51   @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path. 
    52                                    This parameter is ignored by device drivers, 
     51  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.
     52                                   This parameter is ignored by device drivers,
    5353                                   and is optional for bus drivers.
    5454
    5555  @retval EFI_SUCCESS              The device specified by ControllerHandle and
    56                                    RemainingDevicePath is supported by the driver 
     56                                   RemainingDevicePath is supported by the driver
    5757                                   specified by This.
    5858  @retval EFI_ALREADY_STARTED      The device specified by ControllerHandle and
    59                                    RemainingDevicePath is already being managed 
     59                                   RemainingDevicePath is already being managed
    6060                                   by the driver specified by This.
    6161  @retval EFI_ACCESS_DENIED        The device specified by ControllerHandle and
    62                                    RemainingDevicePath is already being managed by 
    63                                    a different driver or an application that 
     62                                   RemainingDevicePath is already being managed by
     63                                   a different driver or an application that
    6464                                   requires exclusive acces. Currently not implemented.
    6565  @retval EFI_UNSUPPORTED          The device specified by ControllerHandle and
    66                                    RemainingDevicePath is not supported by the 
     66                                   RemainingDevicePath is not supported by the
    6767                                   driver specified by This.
    6868
     
    7777
    7878/**
    79   Start this driver on ControllerHandle. 
    80  
    81   The Start() function is designed to be invoked from the EFI boot service ConnectController(). 
    82   As a result, much of the error checking on the parameters to Start() has been 
    83   moved into this common boot service. It is legal to call Start() from other locations, 
    84   but the following calling restrictions must be followed or the system behavior 
     79  Start this driver on ControllerHandle.
     80
     81  The Start() function is designed to be invoked from the EFI boot service ConnectController().
     82  As a result, much of the error checking on the parameters to Start() has been
     83  moved into this common boot service. It is legal to call Start() from other locations,
     84  but the following calling restrictions must be followed or the system behavior
    8585  will not be deterministic.
    8686  1. ControllerHandle must be a valid EFI_HANDLE.
    87   2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally 
     87  2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally
    8888     aligned EFI_DEVICE_PATH_PROTOCOL.
    89   3. Prior to calling Start(), the Supported() function for the driver specified 
    90      by This must have been called with the same calling parameters, and Supported() 
    91      must have returned EFI_SUCCESS. 
     89  3. Prior to calling Start(), the Supported() function for the driver specified
     90     by This must have been called with the same calling parameters, and Supported()
     91     must have returned EFI_SUCCESS.
    9292
    9393  @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
    94   @param[in]  ControllerHandle     The handle of the controller to start. This handle 
    95                                    must support a protocol interface that supplies 
     94  @param[in]  ControllerHandle     The handle of the controller to start. This handle
     95                                   must support a protocol interface that supplies
    9696                                   an I/O abstraction to the driver.
    97   @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path. 
    98                                    This parameter is ignored by device drivers, 
     97  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.
     98                                   This parameter is ignored by device drivers,
    9999                                   and is optional for bus drivers.
    100100
     
    102102  @retval EFI_DEVICE_ERROR         The device could not be started due to a device error.
    103103                                   Currently not implemented.
    104   @retval EFI_OUT_OF_RESOURCES     The request could not be completed due to a lack of 
     104  @retval EFI_OUT_OF_RESOURCES     The request could not be completed due to a lack of
    105105                                   resources.
    106106  @retval Others                   The driver failded to start the device.
     
    116116
    117117/**
    118   Stop this driver on ControllerHandle. 
    119  
     118  Stop this driver on ControllerHandle.
     119
    120120  Release the control of this controller and remove the IScsi functions. The Stop()
    121   function is designed to be invoked from the EFI boot service DisconnectController(). 
    122   As a result, much of the error checking on the parameters to Stop() has been moved 
    123   into this common boot service. It is legal to call Stop() from other locations, 
    124   but the following calling restrictions must be followed or the system behavior 
     121  function is designed to be invoked from the EFI boot service DisconnectController().
     122  As a result, much of the error checking on the parameters to Stop() has been moved
     123  into this common boot service. It is legal to call Stop() from other locations,
     124  but the following calling restrictions must be followed or the system behavior
    125125  will not be deterministic.
    126126  1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
     
    130130     Start() function, and the Start() function must have called OpenProtocol() on
    131131     ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
    132  
     132
    133133  @param[in]  This              A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
    134   @param[in]  ControllerHandle  A handle to the device being stopped. The handle must 
    135                                 support a bus specific I/O protocol for the driver 
     134  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must
     135                                support a bus specific I/O protocol for the driver
    136136                                to use to stop the device.
    137137  @param[in]  NumberOfChildren  The number of child device handles in ChildHandleBuffer.
    138138                                Not used.
    139   @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL 
     139  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL
    140140                                if NumberOfChildren is 0.Not used.
    141141
     
    155155/**
    156156  Creates a child handle and installs a protocol.
    157  
    158   The CreateChild() function installs a protocol on ChildHandle. 
    159   If ChildHandle is a pointer to NULL, then a new handle is created and returned 
    160   in ChildHandle. If ChildHandle is not a pointer to NULL, then the protocol 
     157
     158  The CreateChild() function installs a protocol on ChildHandle.
     159  If ChildHandle is a pointer to NULL, then a new handle is created and returned
     160  in ChildHandle. If ChildHandle is not a pointer to NULL, then the protocol
    161161  installs on the existing ChildHandle.
    162162
    163163  @param  This        Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
    164164  @param  ChildHandle Pointer to the handle of the child to create. If it is NULL,
    165                       then a new handle is created. If it is a pointer to an existing 
     165                      then a new handle is created. If it is a pointer to an existing
    166166                      UEFI handle, then the protocol is added to the existing UEFI handle.
    167167
     
    182182/**
    183183  Destroys a child handle with a protocol installed on it.
    184  
    185   The DestroyChild() function does the opposite of CreateChild(). It removes a protocol 
    186   that was installed by CreateChild() from ChildHandle. If the removed protocol is the 
     184
     185  The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
     186  that was installed by CreateChild() from ChildHandle. If the removed protocol is the
    187187  last protocol on ChildHandle, then ChildHandle is destroyed.
    188188
     
    191191
    192192  @retval EFI_SUCCES            The protocol was removed from ChildHandle.
    193   @retval EFI_UNSUPPORTED       ChildHandle does not support the protocol that is 
     193  @retval EFI_UNSUPPORTED       ChildHandle does not support the protocol that is
    194194                                being removed.
    195195  @retval EFI_INVALID_PARAMETER Child handle is NULL.
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf

    r58459 r58466  
    3232#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC
    3333#
    34 #  DRIVER_BINDING                =  gArpDriverBinding                       
     34#  DRIVER_BINDING                =  gArpDriverBinding
    3535#  COMPONENT_NAME                =  gArpComponentName
    3636#  COMPONENT_NAME2               =  gArpComponentName2
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/ArpDxe/ArpImpl.c

    r58459 r58466  
    11/** @file
    22  The implementation of the ARP protocol.
    3  
     3
    44Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    331331/**
    332332  Process the already sent arp packets.
    333  
     333
    334334  @param[in]  Context                Pointer to the context data registerd to the
    335335                                     Event.
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/ArpDxe/ArpImpl.h

    r58459 r58466  
    9595/**
    9696  Returns a pointer to the ARP_INSTANCE_DATA structure from the input a.
    97  
    98   If the signatures matches, then a pointer to the data structure that contains 
     97
     98  If the signatures matches, then a pointer to the data structure that contains
    9999  a specified field of that data structure is returned.
    100    
    101   @param  a              Pointer to the field specified by ArpProto within a data 
     100
     101  @param  a              Pointer to the field specified by ArpProto within a data
    102102                         structure of type ARP_INSTANCE_DATA.
    103  
     103
    104104**/
    105105#define ARP_INSTANCE_DATA_FROM_THIS(a) \
     
    131131/**
    132132  Returns a pointer to the ARP_SERVICE_DATA structure from the input a.
    133  
    134   If the signatures matches, then a pointer to the data structure that contains 
     133
     134  If the signatures matches, then a pointer to the data structure that contains
    135135  a specified field of that data structure is returned.
    136    
    137   @param  a              Pointer to the field specified by ServiceBinding within 
     136
     137  @param  a              Pointer to the field specified by ServiceBinding within
    138138                         a data structure of type ARP_SERVICE_DATA.
    139  
     139
    140140**/
    141141#define ARP_SERVICE_DATA_FROM_THIS(a) \
     
    229229  This function is used to assign a station address to the ARP cache for this instance
    230230  of the ARP driver.
    231  
    232   Each ARP instance has one station address. The EFI_ARP_PROTOCOL driver will 
    233   respond to ARP requests that match this registered station address. A call to 
     231
     232  Each ARP instance has one station address. The EFI_ARP_PROTOCOL driver will
     233  respond to ARP requests that match this registered station address. A call to
    234234  this function with the ConfigData field set to NULL will reset this ARP instance.
    235  
    236   Once a protocol type and station address have been assigned to this ARP instance, 
    237   all the following ARP functions will use this information. Attempting to change 
     235
     236  Once a protocol type and station address have been assigned to this ARP instance,
     237  all the following ARP functions will use this information. Attempting to change
    238238  the protocol type or station address to a configured ARP instance will result in errors.
    239239
     
    264264  This function is used to insert entries into the ARP cache.
    265265
    266   ARP cache entries are typically inserted and updated by network protocol drivers 
    267   as network traffic is processed. Most ARP cache entries will time out and be 
    268   deleted if the network traffic stops. ARP cache entries that were inserted 
     266  ARP cache entries are typically inserted and updated by network protocol drivers
     267  as network traffic is processed. Most ARP cache entries will time out and be
     268  deleted if the network traffic stops. ARP cache entries that were inserted
    269269  by the Add() function may be static (will not time out) or dynamic (will time out).
    270   Default ARP cache timeout values are not covered in most network protocol 
    271   specifications (although RFC 1122 comes pretty close) and will only be 
    272   discussed in general in this specification. The timeout values that are 
    273   used in the EFI Sample Implementation should be used only as a guideline. 
    274   Final product implementations of the EFI network stack should be tuned for 
     270  Default ARP cache timeout values are not covered in most network protocol
     271  specifications (although RFC 1122 comes pretty close) and will only be
     272  discussed in general in this specification. The timeout values that are
     273  used in the EFI Sample Implementation should be used only as a guideline.
     274  Final product implementations of the EFI network stack should be tuned for
    275275  their expected network environments.
    276  
     276
    277277  @param  This                   Pointer to the EFI_ARP_PROTOCOL instance.
    278278  @param  DenyFlag               Set to TRUE if this entry is a deny entry. Set to
     
    320320  This function searches the ARP cache for matching entries and allocates a buffer into
    321321  which those entries are copied.
    322  
    323   The first part of the allocated buffer is EFI_ARP_FIND_DATA, following which 
     322
     323  The first part of the allocated buffer is EFI_ARP_FIND_DATA, following which
    324324  are protocol address pairs and hardware address pairs.
    325   When finding a specific protocol address (BySwAddress is TRUE and AddressBuffer 
    326   is not NULL), the ARP cache timeout for the found entry is reset if Refresh is 
    327   set to TRUE. If the found ARP cache entry is a permanent entry, it is not 
     325  When finding a specific protocol address (BySwAddress is TRUE and AddressBuffer
     326  is not NULL), the ARP cache timeout for the found entry is reset if Refresh is
     327  set to TRUE. If the found ARP cache entry is a permanent entry, it is not
    328328  affected by Refresh.
    329  
     329
    330330  @param  This                   Pointer to the EFI_ARP_PROTOCOL instance.
    331331  @param  BySwAddress            Set to TRUE to look for matching software protocol
     
    440440  This function aborts the previous ARP request (identified by This,  TargetSwAddress
    441441  and ResolvedEvent) that is issued by EFI_ARP_PROTOCOL.Request().
    442  
    443   If the request is in the internal ARP request queue, the request is aborted 
    444   immediately and its ResolvedEvent is signaled. Only an asynchronous address 
    445   request needs to be canceled. If TargeSwAddress and ResolveEvent are both 
    446   NULL, all the pending asynchronous requests that have been issued by This 
     442
     443  If the request is in the internal ARP request queue, the request is aborted
     444  immediately and its ResolvedEvent is signaled. Only an asynchronous address
     445  request needs to be canceled. If TargeSwAddress and ResolveEvent are both
     446  NULL, all the pending asynchronous requests that have been issued by This
    447447  instance will be cancelled and their corresponding events will be signaled.
    448  
     448
    449449  @param  This                   Pointer to the EFI_ARP_PROTOCOL instance.
    450450  @param  TargetSwAddress        Pointer to the protocol address in previous
     
    674674/**
    675675  Process the already sent arp packets.
    676  
     676
    677677  @param[in]  Context                Pointer to the context data registerd to the
    678678                                     Event.
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/ArpDxe/ArpMain.c

    r48674 r58466  
    11/** @file
    22  Implementation of EFI Address Resolution Protocol (ARP) Protocol interface functions.
    3  
     3
    44Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    1919  This function is used to assign a station address to the ARP cache for this instance
    2020  of the ARP driver.
    21  
    22   Each ARP instance has one station address. The EFI_ARP_PROTOCOL driver will 
    23   respond to ARP requests that match this registered station address. A call to 
     21
     22  Each ARP instance has one station address. The EFI_ARP_PROTOCOL driver will
     23  respond to ARP requests that match this registered station address. A call to
    2424  this function with the ConfigData field set to NULL will reset this ARP instance.
    25  
    26   Once a protocol type and station address have been assigned to this ARP instance, 
    27   all the following ARP functions will use this information. Attempting to change 
     25
     26  Once a protocol type and station address have been assigned to this ARP instance,
     27  all the following ARP functions will use this information. Attempting to change
    2828  the protocol type or station address to a configured ARP instance will result in errors.
    2929
     
    8484  This function is used to insert entries into the ARP cache.
    8585
    86   ARP cache entries are typically inserted and updated by network protocol drivers 
    87   as network traffic is processed. Most ARP cache entries will time out and be 
    88   deleted if the network traffic stops. ARP cache entries that were inserted 
     86  ARP cache entries are typically inserted and updated by network protocol drivers
     87  as network traffic is processed. Most ARP cache entries will time out and be
     88  deleted if the network traffic stops. ARP cache entries that were inserted
    8989  by the Add() function may be static (will not time out) or dynamic (will time out).
    90   Default ARP cache timeout values are not covered in most network protocol 
    91   specifications (although RFC 1122 comes pretty close) and will only be 
    92   discussed in general in this specification. The timeout values that are 
    93   used in the EFI Sample Implementation should be used only as a guideline. 
    94   Final product implementations of the EFI network stack should be tuned for 
     90  Default ARP cache timeout values are not covered in most network protocol
     91  specifications (although RFC 1122 comes pretty close) and will only be
     92  discussed in general in this specification. The timeout values that are
     93  used in the EFI Sample Implementation should be used only as a guideline.
     94  Final product implementations of the EFI network stack should be tuned for
    9595  their expected network environments.
    96  
     96
    9797  @param  This                   Pointer to the EFI_ARP_PROTOCOL instance.
    9898  @param  DenyFlag               Set to TRUE if this entry is a deny entry. Set to
     
    282282  This function searches the ARP cache for matching entries and allocates a buffer into
    283283  which those entries are copied.
    284  
    285   The first part of the allocated buffer is EFI_ARP_FIND_DATA, following which 
     284
     285  The first part of the allocated buffer is EFI_ARP_FIND_DATA, following which
    286286  are protocol address pairs and hardware address pairs.
    287   When finding a specific protocol address (BySwAddress is TRUE and AddressBuffer 
    288   is not NULL), the ARP cache timeout for the found entry is reset if Refresh is 
    289   set to TRUE. If the found ARP cache entry is a permanent entry, it is not 
     287  When finding a specific protocol address (BySwAddress is TRUE and AddressBuffer
     288  is not NULL), the ARP cache timeout for the found entry is reset if Refresh is
     289  set to TRUE. If the found ARP cache entry is a permanent entry, it is not
    290290  affected by Refresh.
    291  
     291
    292292  @param  This                   Pointer to the EFI_ARP_PROTOCOL instance.
    293293  @param  BySwAddress            Set to TRUE to look for matching software protocol
     
    679679  This function aborts the previous ARP request (identified by This,  TargetSwAddress
    680680  and ResolvedEvent) that is issued by EFI_ARP_PROTOCOL.Request().
    681  
    682   If the request is in the internal ARP request queue, the request is aborted 
    683   immediately and its ResolvedEvent is signaled. Only an asynchronous address 
    684   request needs to be canceled. If TargeSwAddress and ResolveEvent are both 
    685   NULL, all the pending asynchronous requests that have been issued by This 
     681
     682  If the request is in the internal ARP request queue, the request is aborted
     683  immediately and its ResolvedEvent is signaled. Only an asynchronous address
     684  request needs to be canceled. If TargeSwAddress and ResolveEvent are both
     685  NULL, all the pending asynchronous requests that have been issued by This
    686686  instance will be cancelled and their corresponding events will be signaled.
    687  
     687
    688688  @param  This                   Pointer to the EFI_ARP_PROTOCOL instance.
    689689  @param  TargetSwAddress        Pointer to the protocol address in previous
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/ArpDxe/ComponentName.c

    r58459 r58466  
    188188    return EFI_UNSUPPORTED;
    189189  }
    190  
    191   // 
    192   // Make sure this driver produced ChildHandle 
    193   // 
     190
     191  //
     192  // Make sure this driver produced ChildHandle
     193  //
    194194  Status = EfiTestChildHandle (
    195195             ControllerHandle,
     
    201201  }
    202202
    203   // 
    204   // Retrieve an instance of a produced protocol from ChildHandle 
    205   // 
     203  //
     204  // Retrieve an instance of a produced protocol from ChildHandle
     205  //
    206206  Status = gBS->OpenProtocol (
    207207                  ChildHandle,
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Dhcp4Dxe/ComponentName.c

    r58459 r58466  
    250250  @param  Dhcp4[in]               A pointer to the EFI_DHCP4_PROTOCOL.
    251251
    252  
     252
    253253  @retval EFI_SUCCESS             Update the ControllerNameTable of this instance successfully.
    254254  @retval EFI_INVALID_PARAMETER   The input parameter is invalid.
    255255  @retval EFI_DEVICE_ERROR        DHCP is in unknown state.
    256  
     256
    257257**/
    258258EFI_STATUS
     
    275275    return Status;
    276276  }
    277  
     277
    278278  if (gDhcpControllerNameTable != NULL) {
    279279    FreeUnicodeStringTable (gDhcpControllerNameTable);
    280280    gDhcpControllerNameTable = NULL;
    281281  }
    282  
     282
    283283  if (Dhcp4ModeData.State > Dhcp4Rebooting) {
    284284    return EFI_DEVICE_ERROR;
    285285  }
    286  
     286
    287287  Status = AddUnicodeString2 (
    288288             "eng",
     
    295295    return Status;
    296296  }
    297  
     297
    298298  return AddUnicodeString2 (
    299299           "en",
     
    392392    return EFI_UNSUPPORTED;
    393393  }
    394  
    395   // 
    396   // Make sure this driver produced ChildHandle 
    397   // 
     394
     395  //
     396  // Make sure this driver produced ChildHandle
     397  //
    398398  Status = EfiTestChildHandle (
    399399             ControllerHandle,
     
    405405  }
    406406
    407   // 
    408   // Retrieve an instance of a produced protocol from ChildHandle 
    409   // 
     407  //
     408  // Retrieve an instance of a produced protocol from ChildHandle
     409  //
    410410  Status = gBS->OpenProtocol (
    411411                  ChildHandle,
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.c

    r58459 r58466  
    356356/**
    357357  Callback function which provided by user to remove one node in NetDestroyLinkList process.
    358  
     358
    359359  @param[in]    Entry           The entry to be removed.
    360360  @param[in]    Context         Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
     
    446446    //
    447447    // Destroy all the children instances before destory the service.
    448     // 
     448    //
    449449    List = &DhcpSb->Children;
    450450    Status = NetDestroyLinkList (
     
    482482    }
    483483    FreePool (DhcpSb);
    484    
     484
    485485    Status = EFI_SUCCESS;
    486486  }
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.h

    r58459 r58466  
    11/** @file
    22  Header for the DHCP4 driver.
    3  
     3
    44Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    7979  must follow these calling restrictions. If any other agent wishes
    8080  to call Stop() it must also follow these calling restrictions.
    81  
     81
    8282  @param[in]  This              Protocol instance pointer.
    8383  @param[in]  ControllerHandle  Handle of device to stop driver on
     
    101101/**
    102102  Creates a child handle and installs a protocol.
    103  
    104   The CreateChild() function installs a protocol on ChildHandle. 
    105   If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle. 
     103
     104  The CreateChild() function installs a protocol on ChildHandle.
     105  If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
    106106  If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
    107107
    108108  @param  This        Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
    109109  @param  ChildHandle Pointer to the handle of the child to create. If it is NULL,
    110                       then a new handle is created. If it is a pointer to an existing UEFI handle, 
     110                      then a new handle is created. If it is a pointer to an existing UEFI handle,
    111111                      then the protocol is added to the existing UEFI handle.
    112112
     
    127127/**
    128128  Destroys a child handle with a protocol installed on it.
    129  
    130   The DestroyChild() function does the opposite of CreateChild(). It removes a protocol 
    131   that was installed by CreateChild() from ChildHandle. If the removed protocol is the 
     129
     130  The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
     131  that was installed by CreateChild() from ChildHandle. If the removed protocol is the
    132132  last protocol on ChildHandle, then ChildHandle is destroyed.
    133133
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf

    r58459 r58466  
    3232#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC
    3333#
    34 #  DRIVER_BINDING                =  gDhcp4DriverBinding                       
     34#  DRIVER_BINDING                =  gDhcp4DriverBinding
    3535#  COMPONENT_NAME                =  gDhcp4ComponentName
    3636#  COMPONENT_NAME2               =  gDhcp4ComponentName2
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.h

    r58459 r58466  
    66  RFC 1534: Interoperation Between DHCP and BOOTP
    77  RFC 3396: Encoding Long Options in DHCP.
    8  
     8
    99Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
    1010This program and the accompanying materials
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c

    r58459 r58466  
    11/** @file
    22  EFI DHCP protocol implementation.
    3  
     3
    44Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    4242  //
    4343  DhcpSb->ActiveChild->ElaspedTime= 0;
    44  
     44
    4545  if (DhcpSb->DhcpState == Dhcp4Init) {
    4646    DhcpSetState (DhcpSb, Dhcp4Selecting, FALSE);
     
    14051405  ASSERT (UdpIo != NULL);
    14061406  NET_GET_REF (Wrap);
    1407  
     1407
    14081408  Status = UdpIoSendDatagram (
    1409              UdpIo, 
    1410              Wrap, 
    1411              &EndPoint, 
    1412              NULL, 
    1413              DhcpOnPacketSent, 
     1409             UdpIo,
     1410             Wrap,
     1411             &EndPoint,
     1412             NULL,
     1413             DhcpOnPacketSent,
    14141414             DhcpSb
    14151415             );
     
    14641464    return EFI_OUT_OF_RESOURCES;
    14651465  }
    1466  
     1466
    14671467  //
    14681468  // Broadcast the message, unless we know the server address.
     
    15321532    Instance->ElaspedTime++;
    15331533  }
    1534  
     1534
    15351535  //
    15361536  // Check the retransmit timer
     
    15541554      }
    15551555    }
    1556    
     1556
    15571557    if (++DhcpSb->CurRetry < DhcpSb->MaxRetries) {
    15581558      //
     
    15931593    }
    15941594  }
    1595  
     1595
    15961596  //
    15971597  // If an address has been acquired, check whether need to
     
    16251625      if (Instance != NULL) {
    16261626        Instance->ElaspedTime= 0;
    1627       }     
    1628      
     1627      }
     1628
    16291629      Status = DhcpSendMessage (
    16301630                 DhcpSb,
     
    16491649      if (Instance != NULL) {
    16501650        Instance->ElaspedTime= 0;
    1651       }   
     1651      }
    16521652
    16531653      Status = DhcpSendMessage (
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.h

    r48674 r58466  
    11/** @file
    22  The DHCP4 protocol implementation.
    3  
     3
    44Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Option.c

    r48674 r58466  
    11/** @file
    22  Function to validate, parse, process the DHCP options.
    3  
     3
    44Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Option.h

    r48674 r58466  
    11/** @file
    22  To validate, parse and process the DHCP options.
    3  
     3
    44Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    129129#define DHCP_MAX_OPTIONS          256
    130130
    131  
     131
    132132//
    133133// DHCP option types, this is used to validate the DHCP options.
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/DpcDxe/Dpc.c

    r48674 r58466  
    338338  Status = gBS->InstallMultipleProtocolInterfaces (
    339339                  &mDpcHandle,
    340                   &gEfiDpcProtocolGuid, 
     340                  &gEfiDpcProtocolGuid,
    341341                  &mDpc,
    342342                  NULL
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/ComponentName.c

    r58459 r58466  
    3434
    3535GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mIScsiDriverNameTable[] = {
    36   {"eng;en", L"iSCSI Driver"}, 
     36  {"eng;en", L"iSCSI Driver"},
    3737  {NULL, NULL}
    3838};
     
    4949  by This does not support the language specified by Language,
    5050  then EFI_UNSUPPORTED is returned.
    51  
     51
    5252  @param[in]  This        A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
    5353  @param[in]  Language    A pointer to a three character ISO 639-2 language identifier.
     
    8989
    9090  @param[in]  IScsiExtScsiPassThru  A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
    91  
     91
    9292  @retval EFI_SUCCESS               Update the ControllerNameTable of this instance successfully.
    9393  @retval EFI_INVALID_PARAMETER     The input parameter is invalid.
    9494  @retval EFI_UNSUPPORTED           Can't get the corresponding NIC info from the Controller handle.
    95  
     95
    9696**/
    9797EFI_STATUS
     
    111111    return EFI_INVALID_PARAMETER;
    112112  }
    113  
     113
    114114  Private  = ISCSI_DRIVER_DATA_FROM_EXT_SCSI_PASS_THRU (IScsiExtScsiPassThru);
    115115
     
    123123  VlanId = NetLibGetVlanId (Private->Controller);
    124124  IScsiMacAddrToStr (&MacAddress, (UINT32) HwAddressSize, VlanId, MacString);
    125    
     125
    126126  UnicodeSPrint (
    127127    HandleName,
     
    184184  @retval EFI_SUCCESS           The Unicode string for the user readable name in the
    185185                                language specified by Language for the driver
    186                                 specified by This was returned in DriverName.                               
     186                                specified by This was returned in DriverName.
    187187  @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
    188188  @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
     
    272272    }
    273273  }
    274  
     274
    275275  return LookupUnicodeString2 (
    276276           Language,
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/ComponentName.h

    r48674 r58466  
    3535  by This does not support the language specified by Language,
    3636  then EFI_UNSUPPORTED is returned.
    37  
     37
    3838  @param[in]  This        A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
    3939  @param[in]  Language    A pointer to a three characters ISO 639-2 language identifier.
     
    9090  @retval EFI_SUCCESS           The Unicode string for the user readable name in the
    9191                                language specified by Language for the driver
    92                                 specified by This was returned in DriverName.                               
     92                                specified by This was returned in DriverName.
    9393  @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
    9494  @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
     
    110110  OUT CHAR16                        **ControllerName
    111111  );
    112  
     112
    113113//
    114114// EFI iSCSI Initiator Name Protocol for IScsi driver.
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.h

    r48674 r58466  
    3030/// MD5_HASHSIZE
    3131///
    32 #define ISCSI_CHAP_RSP_LEN        16 
     32#define ISCSI_CHAP_RSP_LEN        16
    3333
    34 #define ISCSI_CHAP_INITIAL        0 
     34#define ISCSI_CHAP_INITIAL        0
    3535#define ISCSI_CHAP_STEP_ONE       1
    3636#define ISCSI_CHAP_STEP_TWO       2
     
    7474  This function checks the received iSCSI Login Response during the security
    7575  negotiation stage.
    76  
     76
    7777  @param[in] Conn             The iSCSI connection.
    7878
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c

    r58459 r58466  
    4040    END_DEVICE_PATH_TYPE,
    4141    END_ENTIRE_DEVICE_PATH_SUBTYPE,
    42     { 
     42    {
    4343      (UINT8) (END_DEVICE_PATH_LENGTH),
    4444      (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)
     
    181181
    182182  @retval EFI_SUCCESS            The callback successfully handled the action.
    183   @retval Others                 Other errors as indicated.   
     183  @retval Others                 Other errors as indicated.
    184184**/
    185185EFI_STATUS
     
    446446                                  error. In this case, the
    447447                                  Progress parameter would be
    448                                   set to NULL. 
     448                                  set to NULL.
    449449  @retval EFI_NOT_FOUND           Routing data doesn't match any
    450450                                  known driver. Progress set to the
     
    580580  @param[in]  This           Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
    581581  @param[in]  Configuration  A null-terminated Unicode string in
    582                              <ConfigString> format.   
     582                             <ConfigString> format.
    583583  @param[out] Progress       A pointer to a string filled in with the
    584584                             offset of the most recent '&' before the
     
    590590
    591591  @retval EFI_SUCCESS             The results have been distributed or are
    592                                   awaiting distribution. 
     592                                  awaiting distribution.
    593593  @retval EFI_OUT_OF_RESOURCES    Not enough memory to store the
    594594                                  parts of the results that must be
     
    635635  @param[in]  QuestionId         A unique value which is sent to the original
    636636                                 exporting driver so that it can identify the type
    637                                  of data to expect. The format of the data tends to 
     637                                 of data to expect. The format of the data tends to
    638638                                 vary based on the opcode that enerated the callback.
    639639  @param[in]  Type               The type of value for the question.
     
    649649  @retval EFI_UNSUPPORTED        The specified Action is not supported by the
    650650                                 callback.Currently not implemented.
    651   @retval EFI_INVALID_PARAMETERS Passing in wrong parameter. 
    652   @retval Others                 Other errors as indicated. 
     651  @retval EFI_INVALID_PARAMETERS Passing in wrong parameter.
     652  @retval Others                 Other errors as indicated.
    653653**/
    654654EFI_STATUS
     
    712712    }
    713713  } else if (Action == EFI_BROWSER_ACTION_CHANGED) {
    714     switch (QuestionId) { 
     714    switch (QuestionId) {
    715715    case KEY_INITIATOR_NAME:
    716716      IScsiUnicodeStrToAsciiStr (IfrNvData->InitiatorName, IScsiName);
     
    923923    HiiSetBrowserData (&gIp4IScsiConfigGuid, mVendorStorageName, sizeof (ISCSI_CONFIG_IFR_NVDATA), (UINT8 *) IfrNvData, NULL);
    924924  }
    925  
     925
    926926  FreePool (IfrNvData);
    927  
     927
    928928  return Status;
    929929}
     
    10121012      if (EFI_ERROR (Status)) {
    10131013        ZeroMem (&ConfigFormEntry->SessionConfigData, sizeof (ConfigFormEntry->SessionConfigData));
    1014        
     1014
    10151015        //
    10161016        // Generate OUI-format ISID based on MAC address.
    10171017        //
    10181018        CopyMem (ConfigFormEntry->SessionConfigData.IsId, &MacAddress, 6);
    1019         ConfigFormEntry->SessionConfigData.IsId[0] = 
     1019        ConfigFormEntry->SessionConfigData.IsId[0] =
    10201020          (UINT8) (ConfigFormEntry->SessionConfigData.IsId[0] & 0x3F);
    10211021      }
     
    11671167                  );
    11681168  ASSERT_EFI_ERROR (Status);
    1169  
     1169
    11701170  //
    11711171  // Publish our HII data
     
    11941194
    11951195  @param[in]  DriverBindingHandle The iSCSI driverbinding handle.
    1196  
     1196
    11971197  @retval EFI_SUCCESS             The iSCSI configuration form is unloaded.
    11981198  @retval EFI_OUT_OF_RESOURCES    Failed to allocate memory.
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.h

    r58459 r58466  
    3636
    3737/**
    38   If the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is clear, 
     38  If the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is clear,
    3939  then this macro return a pointer to a data structure ISCSI_FORM_CALLBACK_INFO.
    4040
    41   If the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is set, 
    42   The Signature field of the data structure ISCSI_FORM_CALLBACK_INFO 
    43   is compared to TestSignature.  If the signatures match, then a pointer 
    44   to the pointer to a data structure ISCSI_FORM_CALLBACK_INFO is returned. 
    45   If the signatures do not match, then DebugAssert() is called with a description 
    46   of "CR has a bad signature" and Callback is returned. 
     41  If the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is set,
     42  The Signature field of the data structure ISCSI_FORM_CALLBACK_INFO
     43  is compared to TestSignature.  If the signatures match, then a pointer
     44  to the pointer to a data structure ISCSI_FORM_CALLBACK_INFO is returned.
     45  If the signatures do not match, then DebugAssert() is called with a description
     46  of "CR has a bad signature" and Callback is returned.
    4747
    4848  If the data type ISCSI_FORM_CALLBACK_INFO_SIGNATURE does not contain the field
    4949  specified by Callback, then the module will not compile.
    5050
    51   If ISCSI_FORM_CALLBACK_INFO_SIGNATURE does not contain a field called Signature, 
     51  If ISCSI_FORM_CALLBACK_INFO_SIGNATURE does not contain a field called Signature,
    5252  then the module will not compile.
    5353
    54   @param   Callback      Pointer to the specified field within the data 
     54  @param   Callback      Pointer to the specified field within the data
    5555                         structure ISCSI_FORM_CALLBACK_INFO.
    5656  @return  A pointer to the pointer to a data structure ISCSI_FORM_CALLBACK_INFO.
     
    155155
    156156  @param[in]  DriverBindingHandle The iSCSI driverbinding handle.
    157  
     157
    158158  @retval EFI_SUCCESS             The iSCSI configuration form is unloaded.
    159159  @retval EFI_OUT_OF_RESOURCES    Failed to allocate memory.
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigDxe.vfr

    • Property svn:eol-style set to native
    r58459 r58466  
    11/** @file
    22  Vfr file for iSCSI config.
    3  
     3
    44Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    1717#define EFI_NETWORK_DEVICE_CLASS  0x04
    1818
    19 formset 
     19formset
    2020  guid     = IP4_ISCSI_CONFIG_GUID,
    2121  title    = STRING_TOKEN(STR_ISCSI_CONFIG_FORM_TITLE),
     
    3030    title  = STRING_TOKEN(STR_ISCSI_MAIN_FORM_TITLE);
    3131
    32     string  varid   = ISCSI_CONFIG_IFR_NVDATA.InitiatorName, 
     32    string  varid   = ISCSI_CONFIG_IFR_NVDATA.InitiatorName,
    3333            prompt  = STRING_TOKEN(STR_ISCSI_CONFIG_INIT_NAME),
    3434            help    = STRING_TOKEN(STR_ISCSI_CONFIG_INIT_NAME_HELP),
     
    6060    endcheckbox;
    6161
    62     suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.InitiatorInfoFromDhcp == 0x01; 
    63     string  varid   = ISCSI_CONFIG_IFR_NVDATA.LocalIp, 
     62    suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.InitiatorInfoFromDhcp == 0x01;
     63    string  varid   = ISCSI_CONFIG_IFR_NVDATA.LocalIp,
    6464            prompt  = STRING_TOKEN(STR_ISCSI_LOCAL_IP_ADDRESS),
    6565            help    = STRING_TOKEN(STR_ISCSI_IP_ADDRESS_HELP),
     
    7070    endstring;
    7171
    72     string  varid   = ISCSI_CONFIG_IFR_NVDATA.SubnetMask, 
     72    string  varid   = ISCSI_CONFIG_IFR_NVDATA.SubnetMask,
    7373            prompt  = STRING_TOKEN(STR_ISCSI_LOCAL_MASK),
    7474            help    = STRING_TOKEN(STR_ISCSI_IP_ADDRESS_HELP),
     
    7979    endstring;
    8080
    81     string  varid   = ISCSI_CONFIG_IFR_NVDATA.Gateway, 
     81    string  varid   = ISCSI_CONFIG_IFR_NVDATA.Gateway,
    8282            prompt  = STRING_TOKEN(STR_ISCSI_LOCAL_GATEWAY),
    8383            help    = STRING_TOKEN(STR_ISCSI_IP_ADDRESS_HELP),
     
    8989    endif;
    9090
    91     subtitle text = STRING_TOKEN(STR_NULL); 
    92 
    93     suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.InitiatorInfoFromDhcp == 0x00; 
     91    subtitle text = STRING_TOKEN(STR_NULL);
     92
     93    suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.InitiatorInfoFromDhcp == 0x00;
    9494    checkbox varid  = ISCSI_CONFIG_IFR_NVDATA.TargetInfoFromDhcp,
    9595             prompt = STRING_TOKEN(STR_ISCSI_ENABLE_DHCP_ON_TARGET),
     
    9898    endcheckbox;
    9999    endif;
    100      
    101     suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.TargetInfoFromDhcp == 0x01; 
    102 
    103     string  varid   = ISCSI_CONFIG_IFR_NVDATA.TargetName, 
     100
     101    suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.TargetInfoFromDhcp == 0x01;
     102
     103    string  varid   = ISCSI_CONFIG_IFR_NVDATA.TargetName,
    104104            prompt  = STRING_TOKEN(STR_ISCSI_TARGET_NAME),
    105105            help    = STRING_TOKEN(STR_ISCSI_TARGET_NAME),
     
    110110    endstring;
    111111
    112     string  varid   = ISCSI_CONFIG_IFR_NVDATA.TargetIp, 
     112    string  varid   = ISCSI_CONFIG_IFR_NVDATA.TargetIp,
    113113            prompt  = STRING_TOKEN(STR_ISCSI_TARGET_IP_ADDRESS),
    114114            help    = STRING_TOKEN(STR_ISCSI_IP_ADDRESS_HELP),
     
    118118            maxsize = IP_MAX_SIZE,
    119119    endstring;
    120    
    121     numeric varid   = ISCSI_CONFIG_IFR_NVDATA.TargetPort, 
     120
     121    numeric varid   = ISCSI_CONFIG_IFR_NVDATA.TargetPort,
    122122            prompt  = STRING_TOKEN(STR_ISCSI_TARGET_PORT),
    123123            help    = STRING_TOKEN(STR_ISCSI_TARGET_PORT),
    124124            flags   = 0,
    125125            minimum = TARGET_PORT_MIN_NUM,
    126             maximum = TARGET_PORT_MAX_NUM,     
     126            maximum = TARGET_PORT_MAX_NUM,
    127127            step    = 0,
    128128    endnumeric;
    129    
    130     string varid    = ISCSI_CONFIG_IFR_NVDATA.BootLun, 
     129
     130    string varid    = ISCSI_CONFIG_IFR_NVDATA.BootLun,
    131131            prompt  = STRING_TOKEN(STR_ISCSI_BOOT_LUN),
    132132            help    = STRING_TOKEN(STR_ISCSI_BOOT_LUN_HELP),
     
    138138    endif;
    139139
    140     subtitle text = STRING_TOKEN(STR_NULL); 
     140    subtitle text = STRING_TOKEN(STR_NULL);
    141141
    142142    oneof varid  = ISCSI_CONFIG_IFR_NVDATA.CHAPType,
    143143          prompt = STRING_TOKEN(STR_CHAP_TYPE_PROMPT),
    144           help   = STRING_TOKEN(STR_CHAP_TYPE_HELP), 
     144          help   = STRING_TOKEN(STR_CHAP_TYPE_HELP),
    145145          option text = STRING_TOKEN(STR_CHAP_TYPE_NONE),   value = ISCSI_CHAP_NONE,   flags = DEFAULT;
    146146          option text = STRING_TOKEN(STR_CHAP_TYPE_UNI),    value = ISCSI_CHAP_UNI,    flags = 0;
     
    148148    endoneof;
    149149
    150     suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.CHAPType == ISCSI_CHAP_NONE; 
    151 
    152     string  varid   = ISCSI_CONFIG_IFR_NVDATA.CHAPName, 
     150    suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.CHAPType == ISCSI_CHAP_NONE;
     151
     152    string  varid   = ISCSI_CONFIG_IFR_NVDATA.CHAPName,
    153153            prompt  = STRING_TOKEN(STR_ISCSI_CHAP_NAME),
    154154            help    = STRING_TOKEN(STR_ISCSI_CHAP_NAME),
     
    159159    endstring;
    160160
    161     string  varid    = ISCSI_CONFIG_IFR_NVDATA.CHAPSecret, 
     161    string  varid    = ISCSI_CONFIG_IFR_NVDATA.CHAPSecret,
    162162            prompt   = STRING_TOKEN(STR_ISCSI_CHAP_SECRET),
    163163            help     = STRING_TOKEN(STR_ISCSI_CHAP_SECRET_HELP),
     
    172172    suppressif NOT ideqval ISCSI_CONFIG_IFR_NVDATA.CHAPType == ISCSI_CHAP_MUTUAL;
    173173
    174     string  varid   = ISCSI_CONFIG_IFR_NVDATA.ReverseCHAPName, 
     174    string  varid   = ISCSI_CONFIG_IFR_NVDATA.ReverseCHAPName,
    175175            prompt  = STRING_TOKEN(STR_ISCSI_REVERSE_CHAP_NAME),
    176176            help    = STRING_TOKEN(STR_ISCSI_REVERSE_CHAP_NAME),
     
    181181    endstring;
    182182
    183     string  varid    = ISCSI_CONFIG_IFR_NVDATA.ReverseCHAPSecret, 
     183    string  varid    = ISCSI_CONFIG_IFR_NVDATA.ReverseCHAPSecret,
    184184            prompt   = STRING_TOKEN(STR_ISCSI_REVERSE_CHAP_SECRET),
    185185            help     = STRING_TOKEN(STR_ISCSI_CHAP_SECRET_HELP),
     
    192192    endif;
    193193
    194     subtitle text = STRING_TOKEN(STR_NULL); 
    195 
    196     string  varid   = ISCSI_CONFIG_IFR_NVDATA.IsId, 
     194    subtitle text = STRING_TOKEN(STR_NULL);
     195
     196    string  varid   = ISCSI_CONFIG_IFR_NVDATA.IsId,
    197197            prompt  = STRING_TOKEN(STR_ISCSI_CONFIG_ISID),
    198198            help    = STRING_TOKEN(STR_ISCSI_CONFIG_ISID_HELP),
     
    203203    endstring;
    204204
    205     subtitle text = STRING_TOKEN(STR_NULL); 
     205    subtitle text = STRING_TOKEN(STR_NULL);
    206206
    207207    text
     
    210210      flags  = INTERACTIVE,
    211211      key    = KEY_SAVE_CHANGES;
    212      
    213     goto FORMID_MAIN_FORM, 
    214     prompt = STRING_TOKEN (STR_RETURN_MAIN_FORM), 
     212
     213    goto FORMID_MAIN_FORM,
     214    prompt = STRING_TOKEN (STR_RETURN_MAIN_FORM),
    215215    help   = STRING_TOKEN (STR_RETURN_MAIN_FORM),
    216216    flags  = 0;
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigDxeStrings.uni

    • Property svn:mime-type changed from application/octet-stream to text/plain;encoding=UTF-16LE
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.c

    r48674 r58466  
    9696    goto ON_EXIT;
    9797  }
    98  
     98
    9999    if ((Fields[RP_FIELD_IDX_SERVERNAME].Str == NULL) ||
    100100      (Fields[RP_FIELD_IDX_TARGETNAME].Str == NULL) ||
     
    171171  The callback function registerd to the DHCP4 instance which is used to select
    172172  the qualified DHCP OFFER.
    173  
     173
    174174  @param[in]  This         The DHCP4 protocol.
    175175  @param[in]  Context      The context set when configuring the DHCP4 protocol.
    176176  @param[in]  CurrentState The current state of the DHCP4 protocol.
    177177  @param[in]  Dhcp4Event   The event occurs in the current state.
    178   @param[in]  Packet       The DHCP packet that is to be sent or already received. 
     178  @param[in]  Packet       The DHCP packet that is to be sent or already received.
    179179  @param[out] NewPacket    The packet used to replace the above Packet.
    180  
     180
    181181  @retval EFI_SUCCESS      Either the DHCP OFFER is qualified or we're not intereseted
    182182                           in the Dhcp4Event.
     
    338338/**
    339339  Parse the DHCP ACK to get the address configuration and DNS information.
    340  
     340
    341341  @param[in]       Image            The handle of the driver image.
    342342  @param[in]       Controller       The handle of the controller;
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.h

    r48674 r58466  
    4141/**
    4242  Parse the DHCP ACK to get the address configuration and DNS information.
    43  
     43
    4444  @param[in]       Image            The handle of the driver image.
    4545  @param[in]       Controller       The handle of the controller;
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c

    r58459 r58466  
    2525
    2626/**
    27   Tests to see if this driver supports the RemainingDevicePath. 
    28 
    29   @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This 
    30                                    parameter is ignored by device drivers, and is optional for bus 
    31                                    drivers. For bus drivers, if this parameter is not NULL, then 
    32                                    the bus driver must determine if the bus controller specified 
    33                                    by ControllerHandle and the child controller specified 
    34                                    by RemainingDevicePath are both supported by this 
     27  Tests to see if this driver supports the RemainingDevicePath.
     28
     29  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.  This
     30                                   parameter is ignored by device drivers, and is optional for bus
     31                                   drivers. For bus drivers, if this parameter is not NULL, then
     32                                   the bus driver must determine if the bus controller specified
     33                                   by ControllerHandle and the child controller specified
     34                                   by RemainingDevicePath are both supported by this
    3535                                   bus driver.
    3636
     
    6363
    6464/**
    65   Tests to see if this driver supports a given controller. If a child device is provided, 
     65  Tests to see if this driver supports a given controller. If a child device is provided,
    6666  it further tests to see if this driver supports creating a handle for the specified child device.
    6767
    6868  @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
    69   @param[in]  ControllerHandle     The handle of the controller to test. This handle 
    70                                    must support a protocol interface that supplies 
     69  @param[in]  ControllerHandle     The handle of the controller to test. This handle
     70                                   must support a protocol interface that supplies
    7171                                   an I/O abstraction to the driver.
    72   @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path. 
     72  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.
    7373                                   This parameter is ignored by device drivers, and is optional for bus drivers.
    7474
     
    143143
    144144/**
    145   Start this driver on ControllerHandle. 
    146  
    147   The Start() function is designed to be invoked from the EFI boot service ConnectController(). 
    148   As a result, much of the error checking on the parameters to Start() has been moved into this 
    149   common boot service. It is legal to call Start() from other locations, but the following calling 
     145  Start this driver on ControllerHandle.
     146
     147  The Start() function is designed to be invoked from the EFI boot service ConnectController().
     148  As a result, much of the error checking on the parameters to Start() has been moved into this
     149  common boot service. It is legal to call Start() from other locations, but the following calling
    150150  restrictions must be followed or the system behavior will not be deterministic.
    151151  1. ControllerHandle must be a valid EFI_HANDLE.
     
    153153     EFI_DEVICE_PATH_PROTOCOL.
    154154  3. Prior to calling Start(), the Supported() function for the driver specified by This must
    155      have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. 
     155     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
    156156
    157157  @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
    158   @param[in]  ControllerHandle     The handle of the controller to start. This handle 
    159                                    must support a protocol interface that supplies 
     158  @param[in]  ControllerHandle     The handle of the controller to start. This handle
     159                                   must support a protocol interface that supplies
    160160                                   an I/O abstraction to the driver.
    161   @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path. 
     161  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.
    162162                                   This parameter is ignored by device drivers, and is optional for bus drivers.
    163163
     
    215215
    216216  //
    217   // Always install private protocol no matter what happens later. We need to 
     217  // Always install private protocol no matter what happens later. We need to
    218218  // keep the relationship between ControllerHandle and ChildHandle.
    219219  //
     
    287287                  Private->ExtScsiPassThruHandle,
    288288                  EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
    289                   );             
     289                  );
    290290  if (EFI_ERROR (Status)) {
    291291    gBS->UninstallMultipleProtocolInterfaces (
     
    297297           NULL
    298298           );
    299    
     299
    300300    goto ON_ERROR;
    301301  }
     
    316316
    317317/**
    318   Stop this driver on ControllerHandle. 
    319  
     318  Stop this driver on ControllerHandle.
     319
    320320  Release the control of this controller and remove the IScsi functions. The Stop()
    321   function is designed to be invoked from the EFI boot service DisconnectController(). 
    322   As a result, much of the error checking on the parameters to Stop() has been moved 
    323   into this common boot service. It is legal to call Stop() from other locations, 
     321  function is designed to be invoked from the EFI boot service DisconnectController().
     322  As a result, much of the error checking on the parameters to Stop() has been moved
     323  into this common boot service. It is legal to call Stop() from other locations,
    324324  but the following calling restrictions must be followed or the system behavior will not be deterministic.
    325325  1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
     
    329329     Start() function, and the Start() function must have called OpenProtocol() on
    330330     ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
    331  
     331
    332332  @param[in]  This              A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
    333   @param[in]  ControllerHandle  A handle to the device being stopped. The handle must 
    334                                 support a bus specific I/O protocol for the driver 
     333  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must
     334                                support a bus specific I/O protocol for the driver
    335335                                to use to stop the device.
    336336  @param[in]  NumberOfChildren  The number of child device handles in ChildHandleBuffer.Not used.
    337   @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL 
     337  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL
    338338                                if NumberOfChildren is 0.Not used.
    339339
     
    387387           Private->ExtScsiPassThruHandle
    388388           );
    389    
     389
    390390    gBS->CloseProtocol (
    391391          Conn->Tcp4Io.Handle,
     
    509509      goto ON_EXIT;
    510510    }
    511   } 
     511  }
    512512
    513513  //
     
    539539    }
    540540  }
    541  
     541
    542542  Status = gBS->HandleProtocol (
    543543                  gIScsiDriverBinding.DriverBindingHandle,
     
    570570    FreePool (DeviceHandleBuffer);
    571571  }
    572  
     572
    573573  return Status;
    574574}
     
    577577  This is the declaration of an EFI image entry point. This entry point is
    578578  the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including
    579   both device drivers and bus drivers. It initialize the global variables and 
     579  both device drivers and bus drivers. It initialize the global variables and
    580580  publish the driver binding protocol.
    581581
     
    645645      return Status;
    646646    }
    647  
     647
    648648    //
    649649    // Initialize the configuration form of iSCSI.
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.h

    r48674 r58466  
    3939
    4040/**
    41   Tests to see if this driver supports a given controller. If a child device is provided, 
     41  Tests to see if this driver supports a given controller. If a child device is provided,
    4242  it further tests to see if this driver supports creating a handle for the specified child device.
    4343
    4444  @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
    45   @param[in]  ControllerHandle     The handle of the controller to test. This handle 
    46                                    must support a protocol interface that supplies 
     45  @param[in]  ControllerHandle     The handle of the controller to test. This handle
     46                                   must support a protocol interface that supplies
    4747                                   an I/O abstraction to the driver.
    48   @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path. 
     48  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.
    4949                                   This parameter is ignored by device drivers, and is optional for bus drivers.
    5050
     
    7171
    7272/**
    73   Start this driver on ControllerHandle. The Start() function is designed to be 
    74   invoked from the EFI boot service ConnectController(). As a result, much of 
    75   the error checking on the parameters to Start() has been moved into this 
    76   common boot service. It is legal to call Start() from other locations, 
     73  Start this driver on ControllerHandle. The Start() function is designed to be
     74  invoked from the EFI boot service ConnectController(). As a result, much of
     75  the error checking on the parameters to Start() has been moved into this
     76  common boot service. It is legal to call Start() from other locations,
    7777  but the following calling restrictions must be followed or the system behavior will not be deterministic.
    7878  1. ControllerHandle must be a valid EFI_HANDLE.
     
    8080     EFI_DEVICE_PATH_PROTOCOL.
    8181  3. Prior to calling Start(), the Supported() function for the driver specified by This must
    82      have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. 
     82     have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
    8383
    8484  @param[in]  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
    85   @param[in]  ControllerHandle     The handle of the controller to start. This handle 
    86                                    must support a protocol interface that supplies 
     85  @param[in]  ControllerHandle     The handle of the controller to start. This handle
     86                                   must support a protocol interface that supplies
    8787                                   an I/O abstraction to the driver.
    88   @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path. 
     88  @param[in]  RemainingDevicePath  A pointer to the remaining portion of a device path.
    8989                                   This parameter is ignored by device drivers, and is optional for bus drivers.
    9090
     
    104104
    105105/**
    106   Stop this driver on ControllerHandle. 
    107  
     106  Stop this driver on ControllerHandle.
     107
    108108  Release the control of this controller and remove the IScsi functions. The Stop()
    109   function is designed to be invoked from the EFI boot service DisconnectController(). 
    110   As a result, much of the error checking on the parameters to Stop() has been moved 
    111   into this common boot service. It is legal to call Stop() from other locations, 
     109  function is designed to be invoked from the EFI boot service DisconnectController().
     110  As a result, much of the error checking on the parameters to Stop() has been moved
     111  into this common boot service. It is legal to call Stop() from other locations,
    112112  but the following calling restrictions must be followed or the system behavior will not be deterministic.
    113113  1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
     
    117117     Start() function, and the Start() function must have called OpenProtocol() on
    118118     ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
    119  
     119
    120120  @param[in]  This              A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
    121   @param[in]  ControllerHandle  A handle to the device being stopped. The handle must 
    122                                 support a bus specific I/O protocol for the driver 
     121  @param[in]  ControllerHandle  A handle to the device being stopped. The handle must
     122                                support a bus specific I/O protocol for the driver
    123123                                to use to stop the device.
    124124  @param[in]  NumberOfChildren  The number of child device handles in ChildHandleBuffer.Not used.
    125   @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL 
     125  @param[in]  ChildHandleBuffer An array of child handles to be freed. May be NULL
    126126                                if NumberOfChildren is 0.Not used.
    127127
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiExtScsiPassThru.c

    r58459 r58466  
    1616
    1717/**
    18   Sends a SCSI Request Packet to a SCSI device that is attached to the SCSI channel. This function   
     18  Sends a SCSI Request Packet to a SCSI device that is attached to the SCSI channel. This function
    1919  supports both blocking I/O and nonblocking I/O. The blocking I/O functionality is required, and the
    20   nonblocking I/O functionality is optional.                                                             
     20  nonblocking I/O functionality is optional.
    2121
    2222  @param[in]      This    A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
     
    4343                                could be transferred is returned in InTransferLength. For write
    4444                                and bi-directional commands, OutTransferLength bytes were
    45                                 transferred by OutDataBuffer. Currently not implemeted.                               
     45                                transferred by OutDataBuffer. Currently not implemeted.
    4646  @retval EFI_NOT_READY         The SCSI Request Packet could not be sent because there are too many
    47                                 SCSI Request Packets already queued. The caller may retry again later.                             
     47                                SCSI Request Packets already queued. The caller may retry again later.
    4848  @retval EFI_DEVICE_ERROR      A device error occurred while attempting to send the SCSI Request
    49                                 Packet. 
     49                                Packet.
    5050  @retval EFI_INVALID_PARAMETER Target, Lun, or the contents of ScsiRequestPacket are invalid.
    5151  @retval EFI_UNSUPPORTED       The command described by the SCSI Request Packet is not supported
     
    5454                                Packet was not sent, so no additional status information is available.
    5555                                Currently not implemeted.
    56   @retval EFI_TIMEOUT           A timeout occurred while waiting for the SCSI Request Packet to execute.                             
     56  @retval EFI_TIMEOUT           A timeout occurred while waiting for the SCSI Request Packet to execute.
    5757**/
    5858EFI_STATUS
     
    6868  ISCSI_DRIVER_DATA           *Private;
    6969  ISCSI_SESSION_CONFIG_NVDATA *ConfigNvData;
    70   EFI_STATUS                  Status; 
     70  EFI_STATUS                  Status;
    7171
    7272  Private       = ISCSI_DRIVER_DATA_FROM_EXT_SCSI_PASS_THRU (This);
     
    9797
    9898/**
    99   Used to retrieve the list of legal Target IDs and LUNs for SCSI devices on a SCSI channel. These       
     99  Used to retrieve the list of legal Target IDs and LUNs for SCSI devices on a SCSI channel. These
    100100  can either be the list SCSI devices that are actually present on the SCSI channel, or the list of legal
    101   Target Ids and LUNs for the SCSI channel. Regardless, the caller of this function must probe the       
    102   Target ID and LUN returned to see if a SCSI device is actually present at that location on the SCSI   
    103   channel.                                                                                               
     101  Target Ids and LUNs for the SCSI channel. Regardless, the caller of this function must probe the
     102  Target ID and LUN returned to see if a SCSI device is actually present at that location on the SCSI
     103  channel.
    104104
    105105  @param[in]       This    A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
     
    311311  Resets a SCSI channel. This operation resets all the SCSI devices connected to the SCSI channel.
    312312  Currently not implemented.
    313  
     313
    314314  @param[in]  This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
    315315
     
    359359
    360360/**
    361   Used to retrieve the list of legal Target IDs for SCSI devices on a SCSI channel. These can either     
     361  Used to retrieve the list of legal Target IDs for SCSI devices on a SCSI channel. These can either
    362362  be the list SCSI devices that are actually present on the SCSI channel, or the list of legal Target IDs
    363   for the SCSI channel. Regardless, the caller of this function must probe the Target ID returned to     
    364   see if a SCSI device is actually present at that location on the SCSI channel.                         
     363  for the SCSI channel. Regardless, the caller of this function must probe the Target ID returned to
     364  see if a SCSI device is actually present at that location on the SCSI channel.
    365365
    366366  @param[in]       This    A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c

    r58459 r58466  
    2020/**
    2121  Initialize the header of the iSCSI Boot Firmware Table.
    22  
     22
    2323  @param[out]  Header     The header of the iSCSI Boot Firmware Table.
    2424  @param[in]   OemId      The OEM ID.
     
    3838  Header->Revision  = EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_REVISION;
    3939  Header->Checksum  = 0;
    40  
     40
    4141  CopyMem (Header->OemId, OemId, sizeof (Header->OemId));
    4242  CopyMem (&Header->OemTableId, OemTableId, sizeof (UINT64));
     
    4545/**
    4646  Initialize the control section of the iSCSI Boot Firmware Table.
    47  
     47
    4848  @param[in]  Table       The ACPI table.
    4949  @param[in]  HandleCount The number of the handles associated with iSCSI sessions, it's
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c

    r58459 r58466  
    2020  Removes (trims) specified leading and trailing characters from a string.
    2121
    22   @param[in, out]  Str  Pointer to the null-terminated string to be trimmed. On return, 
    23                         Str will hold the trimmed string. 
     22  @param[in, out]  Str  Pointer to the null-terminated string to be trimmed. On return,
     23                        Str will hold the trimmed string.
    2424
    2525  @param[in]      CharC Character will be trimmed from str.
     
    3333  CHAR16  *Pointer1;
    3434  CHAR16  *Pointer2;
    35  
     35
    3636  if (*Str == 0) {
    3737    return;
    3838  }
    39  
     39
    4040  //
    4141  // Trim off the leading and trailing characters c
     
    4444    ;
    4545  }
    46  
     46
    4747  Pointer2 = Str;
    4848  if (Pointer2 == Pointer1) {
     
    5252    }
    5353  } else {
    54     while (*Pointer1 != 0) {   
    55     *Pointer2 = *Pointer1;   
     54    while (*Pointer1 != 0) {
     55    *Pointer2 = *Pointer1;
    5656    Pointer1++;
    5757    Pointer2++;
     
    5959    *Pointer2 = 0;
    6060  }
    61  
    62  
     61
     62
    6363  for (Pointer1 = Str + StrLen(Str) - 1; Pointer1 >= Str && *Pointer1 == CharC; Pointer1--) {
    6464    ;
    6565  }
    66   if  (Pointer1 !=  Str + StrLen(Str) - 1) { 
     66  if  (Pointer1 !=  Str + StrLen(Str) - 1) {
    6767    *(Pointer1 + 1) = 0;
    6868  }
     
    110110
    111111/**
    112   Convert the hexadecimal encoded LUN string into the 64-bit LUN. 
     112  Convert the hexadecimal encoded LUN string into the 64-bit LUN.
    113113
    114114  @param[in]   Str             The hexadecimal encoded LUN string.
     
    128128  UINT8   TemValue;
    129129  UINT16  Value[4];
    130  
     130
    131131  ZeroMem (Lun, 8);
    132132  ZeroMem (TemStr, 2);
    133133  ZeroMem ((UINT8 *) Value, sizeof (Value));
    134   SizeStr    = AsciiStrLen (Str); 
     134  SizeStr    = AsciiStrLen (Str);
    135135  IndexValue = 0;
    136136  IndexNum   = 0;
     
    147147      }
    148148    }
    149    
     149
    150150    if ((TemValue == 0) && (TemStr[0] == '-')) {
    151151      //
     
    164164      continue;
    165165    }
    166    
     166
    167167    if (++IndexNum > 4) {
    168       //     
     168      //
    169169      // Each Lun Str can't exceed size 4, because it will be as UINT16 value
    170170      //
    171171      return EFI_INVALID_PARAMETER;
    172172    }
    173    
     173
    174174    //
    175175    // Combine UINT16 value
     
    177177    Value[IndexValue] = (UINT16) ((Value[IndexValue] << 4) + TemValue);
    178178  }
    179  
     179
    180180  for (Index = 0; Index <= IndexValue; Index ++) {
    181181    *((UINT16 *) &Lun[Index * 2]) =  HTONS (Value[Index]);
    182182  }
    183  
     183
    184184  return EFI_SUCCESS;
    185185}
     
    393393  @param[in, out]  HexLength   The length of the string.
    394394
    395   @retval EFI_SUCCESS          The binary data is converted to the hexadecimal string 
     395  @retval EFI_SUCCESS          The binary data is converted to the hexadecimal string
    396396                               and the length of the string is updated.
    397397  @retval EFI_BUFFER_TOO_SMALL The string is too small.
     
    456456  UINT8   Digit;
    457457  CHAR8   TemStr[2];
    458  
     458
    459459  ZeroMem (TemStr, sizeof (TemStr));
    460460
     
    465465    HexStr += 2;
    466466  }
    467  
     467
    468468  Length = AsciiStrLen (HexStr);
    469469
     
    483483    }
    484484  }
    485  
     485
    486486  *BinLength = (UINT32) ((Index + 1)/2);
    487487
     
    622622
    623623  @param[in]  Controller           The handle of the controller.
    624  
     624
    625625  @retval TRUE                     The handle of the controller need the Dhcp protocol.
    626626  @retval FALSE                    The handle of the controller does not need the Dhcp protocol.
    627  
     627
    628628**/
    629629BOOLEAN
     
    812812
    813813      DPathNode->Ipv4.LocalPort       = 0;
    814       DPathNode->Ipv4.StaticIpAddress = 
     814      DPathNode->Ipv4.StaticIpAddress =
    815815        (BOOLEAN) (!Session->ConfigData.NvData.InitiatorInfoFromDhcp);
    816816
     
    862862  is performed by evaluating if the the protocol specified by ProtocolGuid is
    863863  present on ControllerHandle and is was opened by DriverBindingHandle and Nic
    864   Device handle with an attribute of EFI_OPEN_PROTOCOL_BY_DRIVER. 
     864  Device handle with an attribute of EFI_OPEN_PROTOCOL_BY_DRIVER.
    865865  If ProtocolGuid is NULL, then ASSERT().
    866866
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.h

    r58459 r58466  
    6161
    6262/**
    63   Convert the hexadecimal encoded LUN string into the 64-bit LUN. 
     63  Convert the hexadecimal encoded LUN string into the 64-bit LUN.
    6464
    6565  @param[in]   Str             The hexadecimal encoded LUN string.
     
    154154  @param[in, out]  HexLength   The length of the string.
    155155
    156   @retval EFI_SUCCESS          The binary data is converted to the hexadecimal string 
     156  @retval EFI_SUCCESS          The binary data is converted to the hexadecimal string
    157157                               and the length of the string is updated.
    158158  @retval EFI_BUFFER_TOO_SMALL The string is too small.
     
    226226
    227227  @param[in]  Controller           The handle of the controller.
    228  
     228
    229229  @retval TRUE                     The handle of the controller need the Dhcp protocol.
    230230  @retval FALSE                    The handle of the controller does not need the Dhcp protocol.
    231  
     231
    232232**/
    233233BOOLEAN
     
    283283  is performed by evaluating if the the protocol specified by ProtocolGuid is
    284284  present on ControllerHandle and is was opened by DriverBindingHandle and Nic
    285   Device handle with an attribute of EFI_OPEN_PROTOCOL_BY_DRIVER. 
     285  Device handle with an attribute of EFI_OPEN_PROTOCOL_BY_DRIVER.
    286286  If ProtocolGuid is NULL, then ASSERT().
    287287
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c

    r58459 r58466  
    1818
    1919/**
    20   Attach the iSCSI connection to the iSCSI session. 
     20  Attach the iSCSI connection to the iSCSI session.
    2121
    2222  @param[in, out]  Session The iSCSI session.
     
    3535
    3636/**
    37   Detach the iSCSI connection from the session it belongs to. 
     37  Detach the iSCSI connection from the session it belongs to.
    3838
    3939  @param[in, out]  Conn The iSCSI connection.
     
    5050
    5151/**
    52   Check the sequence number according to RFC3720. 
     52  Check the sequence number according to RFC3720.
    5353
    5454  @param[in, out]  ExpSN   The currently expected sequence number.
     
    117117  @retval EFI_SUCCESS        The iSCSI connection is logged into the iSCSI target.
    118118  @retval EFI_TIMEOUT        Timeout happened during the login procedure.
    119   @retval Others             Other errors as indicated. 
     119  @retval Others             Other errors as indicated.
    120120**/
    121121EFI_STATUS
     
    382382
    383383  @param[in]  Conn             The connection in the iSCSI login phase.
    384  
     384
    385385  @retval EFI_SUCCESS          The iSCSI login response PDU is received and processed.
    386386  @retval Others               Other errors as indicated.
     
    808808                               TargetAddress key-value list.
    809809  @param[in]      Len          Length of the data.
    810  
     810
    811811  @retval EFI_SUCCESS          The target address is updated.
    812812  @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
     
    18461846    NetbufFree (PduHeader);
    18471847    return NULL;
    1848   }     
     1848  }
    18491849  Header  = (ISCSI_ADDITIONAL_HEADER *) (ScsiCmd + 1);
    18501850
     
    25022502  @param[in, out]  Packet    The request packet containing IO request, SCSI command
    25032503                             buffer and buffers to read/write.
    2504                              
    2505   @retval EFI_SUCCES           The SCSI command is executed and the result is updated to 
     2504
     2505  @retval EFI_SUCCES           The SCSI command is executed and the result is updated to
    25062506                               the Packet.
    25072507  @retval EFI_DEVICE_ERROR     Session state was not as required.
     
    26202620        goto ON_EXIT;
    26212621      }
    2622       TimeoutEvent = Conn->TimeoutEvent; 
     2622      TimeoutEvent = Conn->TimeoutEvent;
    26232623    }
    26242624    //
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.h

    r58459 r58466  
    622622
    623623/**
    624   Attach the iSCSI connection to the iSCSI session. 
     624  Attach the iSCSI connection to the iSCSI session.
    625625
    626626  @param[in, out]  Session The iSCSI session.
     
    634634
    635635/**
    636   Detach the iSCSI connection from the session it belongs to. 
     636  Detach the iSCSI connection from the session it belongs to.
    637637
    638638  @param[in, out]  Conn The iSCSI connection.
     
    650650  @retval EFI_SUCCESS        The iSCSI connection is logged into the iSCSI target.
    651651  @retval EFI_TIMEOUT        Timeout happened during the login procedure.
    652   @retval Others             Other errors as indicated. 
     652  @retval Others             Other errors as indicated.
    653653**/
    654654EFI_STATUS
     
    717717
    718718  @param[in]  Conn             The connection in the iSCSI login phase.
    719  
     719
    720720  @retval EFI_SUCCESS          The iSCSI login response PDU is received and processed.
    721721  @retval Others               Other errors as indicated.
     
    786786                               TargetAddress key-value list.
    787787  @param[in]      Len          Length of the data.
    788  
     788
    789789  @retval EFI_SUCCESS          The target address is updated.
    790790  @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
     
    946946  @param[in, out]  Packet    The request packet containing IO request, SCSI command
    947947                             buffer and buffers to read/write.
    948                              
    949   @retval EFI_SUCCES           The SCSI command is executed and the result is updated to 
     948
     949  @retval EFI_SUCCES           The SCSI command is executed and the result is updated to
    950950                               the Packet.
    951951  @retval EFI_DEVICE_ERROR     Session state was not as required.
     
    986986  IN BOOLEAN            Recovery
    987987  );
    988  
     988
    989989/**
    990990  Abort the iSCSI session, that is, reset all the connection and free the
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.c

    r48674 r58466  
    1616
    1717/**
    18   The common notify function associated with various Tcp4Io events. 
     18  The common notify function associated with various Tcp4Io events.
    1919
    2020  @param[in]  Event   The event signaled.
     
    3232
    3333/**
    34   Create a TCP socket with the specified configuration data. 
     34  Create a TCP socket with the specified configuration data.
    3535
    3636  @param[in]  Image      The handle of the driver image.
     
    3838  @param[in]  ConfigData The Tcp4 configuration data.
    3939  @param[in]  Tcp4Io     The Tcp4Io.
    40  
     40
    4141  @retval EFI_SUCCESS    The TCP socket is created and configured.
    4242  @retval Others         Failed to create the TCP socket or configure it.
     
    231231
    232232/**
    233   Destroy the socket. 
     233  Destroy the socket.
    234234
    235235  @param[in]  Tcp4Io The Tcp4Io which wraps the socket to be destroyeds.
     
    270270  @param[in, out]  Tcp4Io    The Tcp4Io wrapping the TCP socket.
    271271  @param[in]       Timeout   The time to wait for connection done.
    272  
     272
    273273  @retval EFI_SUCCESS          Connect to the other endpoint of the TCP socket successfully.
    274274  @retval EFI_TIMEOUT          Failed to connect to the other endpoint of the TCP socket in the                               specified time period.
     
    336336  @param[in]   Tcp4Io          The Tcp4Io wrapping the TCP socket.
    337337  @param[in]   Packet          The packet to transmit.
    338  
     338
    339339  @retval EFI_SUCCESS          The packet is trasmitted.
    340340  @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.h

    r48674 r58466  
    4747
    4848/**
    49   Create a TCP socket with the specified configuration data. 
     49  Create a TCP socket with the specified configuration data.
    5050
    5151  @param[in]  Image      The handle of the driver image.
     
    5353  @param[in]  ConfigData The Tcp4 configuration data.
    5454  @param[in]  Tcp4Io     The Tcp4Io.
    55  
     55
    5656  @retval EFI_SUCCESS    The TCP socket is created and configured.
    5757  @retval Others         Failed to create the TCP socket or configure it.
     
    6666
    6767/**
    68   Destroy the socket. 
     68  Destroy the socket.
    6969
    7070  @param[in]  Tcp4Io The Tcp4Io which wraps the socket to be destroyeds.
     
    8080  @param[in, out]  Tcp4Io    The Tcp4Io wrapping the TCP socket.
    8181  @param[in]       Timeout   The time to wait for connection done.
    82  
     82
    8383  @retval EFI_SUCCESS          Connect to the other endpoint of the TCP socket successfully.
    8484  @retval EFI_TIMEOUT          Failed to connect to the other endpoint of the TCP socket in the                               specified time period.
     
    106106  @param[in]   Tcp4Io          The Tcp4Io wrapping the TCP socket.
    107107  @param[in]   Packet          The packet to transmit.
    108  
     108
    109109  @retval EFI_SUCCESS          The packet is trasmitted.
    110110  @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/Md5.c

    r48674 r58466  
    5858  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    5959  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    60   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    61   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    62   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    63   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    64   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    65   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    66   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    67   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 
     60  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     61  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     62  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     63  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     64  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     65  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     66  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     67  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
    6868};
    6969
     
    8080/**
    8181  Tf1 is one basic MD5 transform function.
    82  
     82
    8383  @param[in]  A      A  32-bit quantity.
    84   @param[in]  B      A  32-bit quantity. 
     84  @param[in]  B      A  32-bit quantity.
    8585  @param[in]  C      A  32-bit quantity.
    8686
    8787  @return             Output was produced as a 32-bit quantity based on the
    88                       three 32-bit input quantity.   
    89 **/
    90 UINT32 
     88                      three 32-bit input quantity.
     89**/
     90UINT32
    9191Tf1 (
    92   IN UINT32 A, 
    93   IN UINT32 B, 
     92  IN UINT32 A,
     93  IN UINT32 B,
    9494  IN UINT32 C
    9595  )
     
    100100/**
    101101  Tf2 is one basic MD5 transform function.
    102  
     102
    103103  @param[in]  A      A  32-bit quantity.
    104   @param[in]  B      A  32-bit quantity. 
     104  @param[in]  B      A  32-bit quantity.
    105105  @param[in]  C      A  32-bit quantity.
    106106
    107107  @return             Output was produced as a 32-bit quantity based on the
    108                       three 32-bit input quantity.   
    109 **/
    110 UINT32 
     108                      three 32-bit input quantity.
     109**/
     110UINT32
    111111Tf2 (
    112   IN UINT32 A, 
    113   IN UINT32 B, 
     112  IN UINT32 A,
     113  IN UINT32 B,
    114114  IN UINT32 C
    115115  )
     
    120120/**
    121121  Tf3 is one basic MD5 transform function.
    122  
     122
    123123  @param[in]  A      A  32-bit quantity.
    124   @param[in]  B      A  32-bit quantity. 
     124  @param[in]  B      A  32-bit quantity.
    125125  @param[in]  C      A  32-bit quantity.
    126126
    127127  @return             Output was produced as a 32-bit quantity based on the
    128                       three 32-bit input quantity.   
    129 **/
    130 UINT32 
     128                      three 32-bit input quantity.
     129**/
     130UINT32
    131131Tf3 (
    132   IN UINT32 A, 
    133   IN UINT32 B, 
     132  IN UINT32 A,
     133  IN UINT32 B,
    134134  IN UINT32 C
    135135  )
     
    140140/**
    141141  Tf4 is one basic MD5 transform function.
    142  
     142
    143143  @param[in]  A      A  32-bit quantity.
    144   @param[in]  B      A  32-bit quantity. 
     144  @param[in]  B      A  32-bit quantity.
    145145  @param[in]  C      A  32-bit quantity.
    146146
    147147  @return             Output was produced as a 32-bit quantity based on the
    148                       three 32-bit input quantity.   
    149 **/
    150 UINT32 
     148                      three 32-bit input quantity.
     149**/
     150UINT32
    151151Tf4 (
    152   IN UINT32 A, 
    153   IN UINT32 B, 
     152  IN UINT32 A,
     153  IN UINT32 B,
    154154  IN UINT32 C
    155155  )
     
    221221  If the length of data segment is larger than 64 bytes, then does the transform
    222222  immediately and the generated Md5 code is stored in the States field of MD5_CTX
    223   data struct for later accumulation. 
     223  data struct for later accumulation.
    224224  All of Md5 code generated for the sequential 64-bytes data segaments are be
    225225  accumulated in MD5Final() function.
     
    242242    CopyMem (Md5Ctx->M + Md5Ctx->Count, (VOID *)Data, Limit);
    243243    MD5Transform (Md5Ctx);
    244    
     244
    245245    Md5Ctx->Count = 0;
    246246    Data         += Limit;
     
    272272  Md5Ctx->States[1] = 0xefcdab89;
    273273  Md5Ctx->States[2] = 0x98badcfe;
    274   Md5Ctx->States[3] = 0x10325476; 
     274  Md5Ctx->States[3] = 0x10325476;
    275275
    276276  return EFI_SUCCESS;
     
    329329    CopyMem (HashVal, (UINT8 *) Md5Ctx->States, MD5_HASHSIZE);
    330330    ZeroMem ((UINT8 *)Md5Ctx, sizeof (*Md5Ctx));
    331    
     331
    332332    return EFI_SUCCESS;
    333333  }
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/Md5.h

    r48674 r58466  
    2020#include <Library/BaseMemoryLib.h>
    2121#include <Library/NetLib.h>
    22  
     22
    2323#define MD5_HASHSIZE  16
    2424
     
    7878  );
    7979
    80 #endif 
     80#endif
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4ConfigDxe/ComponentName.c

    r48674 r58466  
    11/** @file
    22  UEFI Component Name(2) protocol implementation for Ip4ConfigDxe driver.
    3  
     3
    44Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    6262                                number of languages supported by a driver is up
    6363                                to the driver writer. Language is specified
    64                                 in RFC 4646 or ISO 639-2 language code format.                               
     64                                in RFC 4646 or ISO 639-2 language code format.
    6565  @param  DriverName[out]       A pointer to the Unicode string to return.
    6666                                This Unicode string is the name of the
     
    135135                                Language from the point of view of the driver
    136136                                specified by This.
    137                                
     137
    138138  @retval EFI_SUCCESS           The Unicode string for the user readable name in
    139139                                the language specified by Language for the
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c

    r58459 r58466  
    146146  // cable swap, a new round auto configuration will be initiated. The timer
    147147  // starts in DHCP policy only. STATIC policy stops the timer.
    148   // 
     148  //
    149149  if (NicConfig->Source == IP4_CONFIG_SOURCE_DHCP) {
    150150    gBS->SetTimer (Instance->Timer, TimerPeriodic, TICKS_PER_SECOND);
     
    152152    gBS->SetTimer (Instance->Timer, TimerCancel, 0);
    153153  }
    154  
     154
    155155  return Status;
    156156}
     
    692692/**
    693693  A dedicated timer is used to poll underlying media status. In case of
    694   cable swap, a new round auto configuration will be initiated. The timer 
     694  cable swap, a new round auto configuration will be initiated. The timer
    695695  will signal the IP4 to run the auto configuration again. IP4 driver will free
    696696  old IP address related resource, such as route table and Interface, then
     
    712712  EFI_STATUS                   Status;
    713713  EFI_SIMPLE_NETWORK_MODE      SnpModeData;
    714   IP4_CONFIG_INSTANCE         *Instance; 
     714  IP4_CONFIG_INSTANCE         *Instance;
    715715
    716716  Instance = (IP4_CONFIG_INSTANCE *) Context;
    717717
    718718  OldMediaPresent = Instance->MediaPresent;
    719  
     719
    720720  //
    721721  // Get fresh mode data from MNP, since underlying media status may change
     
    733733    //
    734734    // Signal the IP4 to run the auto configuration again. IP4 driver will free
    735     // old IP address related resource, such as route table and Interface, then 
    736     // initiate a DHCP round by IP4Config->Start to acquire new IP, eventually 
     735    // old IP address related resource, such as route table and Interface, then
     736    // initiate a DHCP round by IP4Config->Start to acquire new IP, eventually
    737737    // create route table for new IP address.
    738738    //
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.h

    r58459 r58466  
    136136
    137137  //
    138   // Underlying media present status. 
     138  // Underlying media present status.
    139139  //
    140140  BOOLEAN                         MediaPresent;
     
    514514/**
    515515  A dedicated timer is used to poll underlying media status. In case of
    516   cable swap, a new round auto configuration will be initiated. The timer 
     516  cable swap, a new round auto configuration will be initiated. The timer
    517517  will signal the IP4 to run the auto configuration again. IP4 driver will free
    518518  old IP address related resource, such as route table and Interface, then
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDriver.c

    r58459 r58466  
    498498    Instance->Timer = NULL;
    499499  }
    500  
     500
    501501  Ip4ConfigCleanConfig (Instance);
    502502  FreePool (Instance);
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDxe.vfr

    • Property svn:eol-style set to native
    r58459 r58466  
    7979
    8080    subtitle text = STRING_TOKEN(STR_NULL);
    81    
     81
    8282    text
    8383      help   = STRING_TOKEN(STR_SAVE_CHANGES),
     
    8585      flags  = INTERACTIVE,
    8686      key    = KEY_SAVE_CHANGES;
    87      
     87
    8888  endform;
    8989
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDxeStrings.uni

    • Property svn:mime-type changed from application/octet-stream to text/plain;encoding=UTF-16LE
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/ComponentName.c

    r58459 r58466  
    11/** @file
    2  
     2
    33Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>
    44This program and the accompanying materials
     
    238238  @param  Ip4[in]                 A pointer to the EFI_IP4_PROTOCOL.
    239239
    240  
     240
    241241  @retval EFI_SUCCESS             Update the ControllerNameTable of this instance successfully.
    242242  @retval EFI_INVALID_PARAMETER   The input parameter is invalid.
    243  
     243
    244244**/
    245245EFI_STATUS
     
    291291    return Status;
    292292  }
    293  
     293
    294294  return AddUnicodeString2 (
    295295           "en",
     
    379379  )
    380380{
    381   EFI_STATUS                    Status; 
     381  EFI_STATUS                    Status;
    382382  EFI_IP4_PROTOCOL              *Ip4;
    383  
     383
    384384  //
    385385  // Only provide names for child handles.
     
    389389  }
    390390
    391   // 
    392   // Make sure this driver produced ChildHandle 
    393   // 
     391  //
     392  // Make sure this driver produced ChildHandle
     393  //
    394394  Status = EfiTestChildHandle (
    395395             ControllerHandle,
     
    401401  }
    402402
    403   // 
    404   // Retrieve an instance of a produced protocol from ChildHandle 
    405   // 
     403  //
     404  // Retrieve an instance of a produced protocol from ChildHandle
     405  //
    406406  Status = gBS->OpenProtocol (
    407407                  ChildHandle,
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Common.h

    r58459 r58466  
    11/** @file
    22  Common definition for IP4.
    3  
     3
    44Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c

    r58459 r58466  
    396396/**
    397397  Callback function which provided by user to remove one node in NetDestroyLinkList process.
    398  
     398
    399399  @param[in]    Entry           The entry to be removed.
    400400  @param[in]    Context         Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
     
    563563{
    564564  EFI_SERVICE_BINDING_PROTOCOL             *ServiceBinding;
    565   IP4_SERVICE                              *IpSb; 
     565  IP4_SERVICE                              *IpSb;
    566566  EFI_HANDLE                               NicHandle;
    567   EFI_STATUS                               Status; 
     567  EFI_STATUS                               Status;
    568568  INTN                                     State;
    569569  LIST_ENTRY                               *List;
     
    689689    Ip4FreeInterface (IpSb->DefaultInterface, NULL);
    690690    Ip4FreeRouteTable (IpSb->DefaultRouteTable);
    691    
     691
    692692    IpIf = Ip4CreateInterface (IpSb->Mnp, IpSb->Controller, IpSb->Image);
    693693    if (IpIf == NULL) {
     
    699699      goto ON_ERROR;;
    700700    }
    701    
     701
    702702    IpSb->DefaultInterface  = IpIf;
    703703    InsertHeadList (&IpSb->Interfaces, &IpIf->Link);
     
    727727           ServiceBinding
    728728           );
    729    
     729
    730730    if (gIp4ControllerNameTable != NULL) {
    731731      FreeUnicodeStringTable (gIp4ControllerNameTable);
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.h

    r58459 r58466  
    3535  the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including
    3636  both device drivers and bus drivers.
    37  
     37
    3838  The entry point for IP4 driver which install the driver
    3939  binding and component name protocol on its image.
     
    115115  must follow these calling restrictions. If any other agent wishes
    116116  to call Stop() it must also follow these calling restrictions.
    117  
     117
    118118  @param[in]  This              Protocol instance pointer.
    119119  @param[in]  ControllerHandle  Handle of device to stop driver on
     
    140140/**
    141141  Creates a child handle and installs a protocol.
    142  
    143   The CreateChild() function installs a protocol on ChildHandle. 
    144   If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle. 
     142
     143  The CreateChild() function installs a protocol on ChildHandle.
     144  If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
    145145  If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
    146146
    147147  @param  This        Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
    148148  @param  ChildHandle Pointer to the handle of the child to create. If it is NULL,
    149                       then a new handle is created. If it is a pointer to an existing UEFI handle, 
     149                      then a new handle is created. If it is a pointer to an existing UEFI handle,
    150150                      then the protocol is added to the existing UEFI handle.
    151151
     
    166166/**
    167167  Destroys a child handle with a protocol installed on it.
    168  
    169   The DestroyChild() function does the opposite of CreateChild(). It removes a protocol 
    170   that was installed by CreateChild() from ChildHandle. If the removed protocol is the 
     168
     169  The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
     170  that was installed by CreateChild() from ChildHandle. If the removed protocol is the
    171171  last protocol on ChildHandle, then ChildHandle is destroyed.
    172172
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf

    r58459 r58466  
    2525  FILE_GUID                      = 9FB1A1F3-3B71-4324-B39A-745CBB015FFF
    2626  MODULE_TYPE                    = UEFI_DRIVER
    27   VERSION_STRING                 = 1.0 
     27  VERSION_STRING                 = 1.0
    2828  ENTRY_POINT                    = Ip4DriverEntryPoint
    2929  UNLOAD_IMAGE                   = NetLibDefaultUnload
     
    3434#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC
    3535#
    36 #  DRIVER_BINDING                =  gIp4DriverBinding                       
     36#  DRIVER_BINDING                =  gIp4DriverBinding
    3737#  COMPONENT_NAME                =  gIp4ComponentName
    3838#  COMPONENT_NAME2               =  gIp4ComponentName2
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.c

    r58459 r58466  
    7373  Process the ICMP redirect. Find the instance then update
    7474  its route cache.
    75  
     75
    7676  All kinds of redirect is treated as host redirect as
    7777  specified by RFC1122 3.3.1.2:
     
    8181  message;"
    8282
    83   @param[in]  IpSb               The IP4 service binding instance that received 
     83  @param[in]  IpSb               The IP4 service binding instance that received
    8484                                 the packet.
    8585  @param[in]  Head               The IP head of the received ICMPpacket.
     
    167167  @retval EFI_INVALID_PARAMETER  The packet is invalid
    168168  @retval Others                 Failed to process the packet.
    169  
     169
    170170**/
    171171EFI_STATUS
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.h

    r48674 r58466  
    11/** @file
    22  Header file for ICMP protocol.
    3  
     3
    44Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c

    r58459 r58466  
    11/** @file
    22  Implement IP4 pesudo interface.
    3  
     3
    44Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    6969  @param  Context           The context of the callback, a point to the ARP
    7070                            queue.
    71                                
     71
    7272**/
    7373VOID
     
    140140  @param[in]  Context           Opaque parameter to the call back.
    141141
    142   @retval   Token               The wrapped token if succeed 
     142  @retval   Token               The wrapped token if succeed
    143143  @retval   NULL                The wrapped token if NULL
    144144
     
    862862  @param  Context           The context of the callback, a point to the ARP
    863863                            queue.
    864                                
     864
    865865**/
    866866VOID
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.h

    r58459 r58466  
    11/** @file
    22  Definition for IP4 pesudo interface structure.
    3  
     3
    44Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Igmp.c

    r48674 r58466  
    11/** @file
    22  This file implements the RFC2236: IGMP v2.
    3  
     3
    44Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c

    r58459 r58466  
    659659
    660660  if (IpIf->Arp != NULL) {
    661     //   
    662     // A non-NULL IpIf->Arp here means a new ARP child is created when setting default address, 
     661    //
     662    // A non-NULL IpIf->Arp here means a new ARP child is created when setting default address,
    663663    // but some IP children may have referenced the default interface before it is configured,
    664664    // these IP instances also consume this ARP protocol so they need to open it BY_CHILD_CONTROLLER.
     
    20012001
    20022002    RawHdrLen = (UINT8) (RawHdrLen << 2);
    2003    
     2003
    20042004    CopyMem (&Head, FirstFragment, IP4_MIN_HEADLEN);
    20052005
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.h

    r58459 r58466  
    11/** @file
    22  Ip4 internal functions and type defintions.
    3  
     3
    44Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.c

    r58459 r58466  
    11/** @file
    22  IP4 input process.
    3  
     3
    44Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    440440
    441441/**
    442   The callback function for the net buffer which wraps the packet processed by 
    443   IPsec. It releases the wrap packet and also signals IPsec to free the resources. 
     442  The callback function for the net buffer which wraps the packet processed by
     443  IPsec. It releases the wrap packet and also signals IPsec to free the resources.
    444444
    445445  @param[in]  Arg       The wrap context
     
    468468
    469469/**
    470   The work function to locate IPsec protocol to process the inbound or 
     470  The work function to locate IPsec protocol to process the inbound or
    471471  outbound IP packets. The process routine handls the packet with following
    472   actions: bypass the packet, discard the packet, or protect the packet.       
     472  actions: bypass the packet, discard the packet, or protect the packet.
    473473
    474474  @param[in]       IpSb          The IP4 service instance.
     
    477477  @param[in, out]  Options       The caller supplied options.
    478478  @param[in, out]  OptionsLen    The length of the option.
    479   @param[in]       Direction     The directionality in an SPD entry, 
     479  @param[in]       Direction     The directionality in an SPD entry,
    480480                                 EfiIPsecInBound or EfiIPsecOutBound.
    481481  @param[in]       Context       The token's wrap.
     
    484484  @retval EFI_SUCCESS            The packet was bypassed and all buffers remain the same.
    485485  @retval EFI_SUCCESS            The packet was protected.
    486   @retval EFI_ACCESS_DENIED      The packet was discarded. 
     486  @retval EFI_ACCESS_DENIED      The packet was discarded.
    487487  @retval EFI_OUT_OF_RESOURCES   There is no suffcient resource to complete the operation.
    488   @retval EFI_BUFFER_TOO_SMALL   The number of non-empty block is bigger than the 
     488  @retval EFI_BUFFER_TOO_SMALL   The number of non-empty block is bigger than the
    489489                                 number of input data blocks when build a fragment table.
    490490
     
    517517  IpSecWrap     = NULL;
    518518  FragmentTable = NULL;
    519   TxWrap        = (IP4_TXTOKEN_WRAP *) Context; 
     519  TxWrap        = (IP4_TXTOKEN_WRAP *) Context;
    520520  FragmentCount = Packet->BlockOpNum;
    521521
    522522  ZeroMem (&ZeroHead, sizeof (IP4_HEAD));
    523  
     523
    524524  if (mIpSec == NULL) {
    525525    gBS->LocateProtocol (&gEfiIpSec2ProtocolGuid, NULL, (VOID **) &mIpSec);
     
    535535    //
    536536    // If IPsec is disabled, restore the original MTU
    537     //   
     537    //
    538538    IpSb->MaxPacketSize = IpSb->OldMaxPacketSize;
    539539    goto ON_EXIT;
    540540  } else {
    541541    //
    542     // If IPsec is enabled, use the MTU which reduce the IPsec header length. 
    543     //
    544     IpSb->MaxPacketSize = IpSb->OldMaxPacketSize - IP4_MAX_IPSEC_HEADLEN;   
     542    // If IPsec is enabled, use the MTU which reduce the IPsec header length.
     543    //
     544    IpSb->MaxPacketSize = IpSb->OldMaxPacketSize - IP4_MAX_IPSEC_HEADLEN;
    545545  }
    546546
     
    554554    goto ON_EXIT;
    555555  }
    556  
     556
    557557  Status = NetbufBuildExt (Packet, FragmentTable, &FragmentCount);
    558  
     558
    559559  //
    560560  // Record the original FragmentTable and count.
     
    572572  //
    573573  Ip4NtohHead (*Head);
    574  
     574
    575575  Status = mIpSec->ProcessExt (
    576576                     mIpSec,
     
    590590  //
    591591  Ip4NtohHead (*Head);
    592  
     592
    593593  if (EFI_ERROR (Status)) {
    594594    FreePool (OriginalFragmentTable);
     
    610610
    611611  if (Direction == EfiIPsecOutBound && TxWrap != NULL) {
    612  
     612
    613613    TxWrap->IpSecRecycleSignal = RecycleEvent;
    614614    TxWrap->Packet             = NetbufFromExt (
     
    635635    NetIpSecNetbufFree (*Netbuf);
    636636    *Netbuf = TxWrap->Packet;
    637    
     637
    638638  } else {
    639  
     639
    640640    IpSecWrap = AllocateZeroPool (sizeof (IP4_IPSEC_WRAP));
    641  
     641
    642642    if (IpSecWrap == NULL) {
    643643      Status = EFI_OUT_OF_RESOURCES;
     
    645645      goto ON_EXIT;
    646646    }
    647    
     647
    648648    IpSecWrap->IpSecRecycleSignal = RecycleEvent;
    649649    IpSecWrap->Packet             = Packet;
    650650    Packet                        = NetbufFromExt (
    651                                       FragmentTable, 
    652                                       FragmentCount, 
    653                                       IP4_MAX_HEADLEN, 
    654                                       0, 
    655                                       Ip4IpSecFree, 
     651                                      FragmentTable,
     652                                      FragmentCount,
     653                                      IP4_MAX_HEADLEN,
     654                                      0,
     655                                      Ip4IpSecFree,
    656656                                      IpSecWrap
    657657                                      );
    658  
     658
    659659    if (Packet == NULL) {
    660660      Packet = IpSecWrap->Packet;
     
    686686  Pre-process the IPv4 packet. First validates the IPv4 packet, and
    687687  then reassembles packet if it is necessary.
    688  
     688
    689689  @param[in]       IpSb            Pointer to IP4_SERVICE.
    690690  @param[in, out]  Packet          Pointer to the Packet to be processed.
     
    696696
    697697  @retval     EFI_SEUCCESS               The recieved packet is in well form.
    698   @retval     EFI_INVAILD_PARAMETER      The recieved packet is malformed. 
     698  @retval     EFI_INVAILD_PARAMETER      The recieved packet is malformed.
    699699
    700700**/
     
    705705  IN     IP4_HEAD       *Head,
    706706  IN     UINT8          *Option,
    707   IN     UINT32         OptionLen, 
     707  IN     UINT32         OptionLen,
    708708  IN     UINT32         Flag
    709   ) 
     709  )
    710710{
    711711  IP4_CLIP_INFO             *Info;
     
    720720    return EFI_INVALID_PARAMETER;
    721721  }
    722  
     722
    723723  HeadLen  = (Head->HeadLen << 2);
    724724  TotalLen = NTOHS (Head->TotalLen);
     
    769769  // there is no option to save some CPU process.
    770770  //
    771  
     771
    772772  if ((OptionLen > 0) && !Ip4OptionIsValid (Option, OptionLen, TRUE)) {
    773773    return EFI_INVALID_PARAMETER;
     
    810810    }
    811811  }
    812  
     812
    813813  return EFI_SUCCESS;
    814814}
     
    842842  UINT8                     *Option;
    843843  UINT32                    OptionLen;
    844  
     844
    845845  IpSb   = (IP4_SERVICE *) Context;
    846846  Option = NULL;
     
    861861  //
    862862  Status = Ip4PreProcessPacket (
    863              IpSb, 
    864              &Packet, 
    865              Head, 
     863             IpSb,
     864             &Packet,
     865             Head,
    866866             Option,
    867              OptionLen, 
     867             OptionLen,
    868868             Flag
    869869             );
     
    890890    goto RESTART;
    891891  }
    892  
     892
    893893  //
    894894  // If the packet is protected by tunnel mode, parse the inner Ip Packet.
     
    914914    }
    915915  }
    916  
     916
    917917  ASSERT (Packet != NULL);
    918918  Head  = Packet->Ip.Ip4;
     
    12981298        Head = NetbufAllocSpace (Dup, IP4_MAX_HEADLEN, NET_BUF_HEAD);
    12991299        ASSERT (Head != NULL);
    1300        
     1300
    13011301        Dup->Ip.Ip4 = (IP4_HEAD *) Head;
    13021302
     
    13451345  @param[in]  Packet             The data of the received packet.
    13461346  @param[in]  Option             Point to the IP4 packet header options.
    1347   @param[in]  OptionLen          Length of the IP4 packet header options. 
     1347  @param[in]  OptionLen          Length of the IP4 packet header options.
    13481348  @param[in]  IpIf               The interface to enqueue the packet to.
    13491349
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.h

    r58459 r58466  
    1818#define IP4_MAX_HEADLEN        60
    1919///
    20 /// 8(ESP header) + 16(max IV) + 16(max padding) + 2(ESP tail) + 12(max ICV) = 54 
     20/// 8(ESP header) + 16(max IV) + 16(max padding) + 2(ESP tail) + 12(max ICV) = 54
    2121///
    2222#define IP4_MAX_IPSEC_HEADLEN  54
     
    170170  @param[in]  Packet             The data of the received packet.
    171171  @param[in]  Option             Point to the IP4 packet header options.
    172   @param[in]  OptionLen          Length of the IP4 packet header options. 
     172  @param[in]  OptionLen          Length of the IP4 packet header options.
    173173  @param[in]  IpIf               The interface to enqueue the packet to.
    174174
     
    217217
    218218/**
    219   The work function to locate IPsec protocol to process the inbound or 
     219  The work function to locate IPsec protocol to process the inbound or
    220220  outbound IP packets. The process routine handls the packet with following
    221   actions: bypass the packet, discard the packet, or protect the packet.       
     221  actions: bypass the packet, discard the packet, or protect the packet.
    222222
    223223  @param[in]       IpSb          The IP4 service instance.
     
    226226  @param[in, out]  Options       The caller supplied options.
    227227  @param[in, out]  OptionsLen    The length of the option.
    228   @param[in]       Direction     The directionality in an SPD entry, 
     228  @param[in]       Direction     The directionality in an SPD entry,
    229229                                 EfiIPsecInBound or EfiIPsecOutBound.
    230230  @param[in]       Context       The token's wrap.
     
    233233  @retval EFI_SUCCESS            The packet was bypassed and all buffers remain the same.
    234234  @retval EFI_SUCCESS            The packet was protected.
    235   @retval EFI_ACCESS_DENIED      The packet was discarded. 
     235  @retval EFI_ACCESS_DENIED      The packet was discarded.
    236236  @retval EFI_OUT_OF_RESOURCES   There is no suffcient resource to complete the operation.
    237   @retval EFI_BUFFER_TOO_SMALL   The number of non-empty block is bigger than the 
     237  @retval EFI_BUFFER_TOO_SMALL   The number of non-empty block is bigger than the
    238238                                 number of input data blocks when build a fragment table.
    239239
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.c

    r48674 r58466  
    11/** @file
    22  IP4 option support functions.
    3  
     3
    44Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    110110  @param[in]       OptionLen         The length of the original option
    111111  @param[in]       FirstFragment     Whether it is the first fragment
    112   @param[in, out]  Buf               The buffer to copy options to. NULL 
     112  @param[in, out]  Buf               The buffer to copy options to. NULL
    113113  @param[in, out]  BufLen            The length of the buffer
    114114
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.h

    r48674 r58466  
    11/** @file
    22  IP4 option support routines.
    3  
     3
    44Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    5555  @param[in]       OptionLen         The length of the original option
    5656  @param[in]       FirstFragment     Whether it is the first fragment
    57   @param[in, out]  Buf               The buffer to copy options to. NULL 
     57  @param[in, out]  Buf               The buffer to copy options to. NULL
    5858  @param[in, out]  BufLen            The length of the buffer
    5959
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Output.c

    r58459 r58466  
    11/** @file
    22  Transmit the IP4 packet.
    3  
     3
    44Copyright (c) 2005 - 2013, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    270270    RawData        = FALSE;
    271271  }
    272  
     272
    273273  //
    274274  // Call IPsec process.
    275275  //
    276276  Status = Ip4IpSecProcessPacket (
    277              IpSb, 
    278              &Head, 
    279              &Packet, 
    280              &Option, 
    281              &OptLen, 
     277             IpSb,
     278             &Head,
     279             &Packet,
     280             &Option,
     281             &OptLen,
    282282             EfiIPsecOutBound,
    283283             Context
     
    287287    return Status;
    288288  }
    289  
     289
    290290  Dest = Head->Dst;
    291291  if (IP4_IS_BROADCAST (Ip4GetNetCast (Dest, IpIf)) || (Dest == IP4_ALLONE_ADDRESS)) {
     
    327327  // them. Tag each fragment other than the first one as spawn from it.
    328328  //
    329   Mtu = IpSb->MaxPacketSize + sizeof (IP4_HEAD); 
     329  Mtu = IpSb->MaxPacketSize + sizeof (IP4_HEAD);
    330330
    331331  if (Packet->TotalSize + HeadLen > Mtu) {
     
    336336      return EFI_BAD_BUFFER_SIZE;
    337337    }
    338    
     338
    339339    //
    340340    // Packet is fragmented from the tail to the head, that is, the
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Route.h

    r48674 r58466  
    11/** @file
    22  EFI IP4 route table and route cache table defintions.
    3  
     3
    44Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/MnpDxe/ComponentName.c

    r58459 r58466  
    108108  @param  Mnp[in]                 A pointer to the EFI_MANAGED_NETWORK_PROTOCOL.
    109109
    110  
     110
    111111  @retval EFI_SUCCESS             Update the ControllerNameTable of this instance successfully.
    112112  @retval EFI_INVALID_PARAMETER   The input parameter is invalid.
    113  
     113
    114114**/
    115115EFI_STATUS
     
    158158    // Remove the last '-'
    159159    //
    160     OffSet--; 
     160    OffSet--;
    161161    //
    162162    // Print the ProtocolType and VLAN ID for this instance.
     
    178178    return Status;
    179179  }
    180  
     180
    181181  if (gMnpControllerNameTable != NULL) {
    182182    FreeUnicodeStringTable (gMnpControllerNameTable);
    183183    gMnpControllerNameTable = NULL;
    184184  }
    185  
     185
    186186  Status = AddUnicodeString2 (
    187187             "eng",
     
    194194    return Status;
    195195  }
    196  
     196
    197197  return AddUnicodeString2 (
    198198           "en",
     
    291291    return EFI_UNSUPPORTED;
    292292  }
    293  
    294   // 
    295   // Make sure this driver is currently managing ControllerHandle 
    296   // 
     293
     294  //
     295  // Make sure this driver is currently managing ControllerHandle
     296  //
    297297  Status = EfiTestManagedDevice (
    298298             ControllerHandle,
     
    300300             &gEfiSimpleNetworkProtocolGuid
    301301             );
    302   if (EFI_ERROR (Status)) { 
    303     return Status;
    304   }
    305  
    306   // 
    307   // Make sure this driver produced ChildHandle 
    308   // 
     302  if (EFI_ERROR (Status)) {
     303    return Status;
     304  }
     305
     306  //
     307  // Make sure this driver produced ChildHandle
     308  //
    309309  Status = EfiTestChildHandle (
    310310             ControllerHandle,
     
    316316  }
    317317
    318   // 
    319   // Retrieve an instance of a produced protocol from ChildHandle 
    320   // 
     318  //
     319  // Retrieve an instance of a produced protocol from ChildHandle
     320  //
    321321  Status = gBS->OpenProtocol (
    322322                  ChildHandle,
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/MnpDxe/MnpConfig.c

    r58459 r58466  
    688688/**
    689689  Callback function which provided by user to remove one node in NetDestroyLinkList process.
    690  
     690
    691691  @param[in]    Entry           The entry to be removed.
    692692  @param[in]    Context         Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
     
    728728  EFI_STATUS                         Status;
    729729  UINTN                              ListLength;
    730  
     730
    731731  List = &MnpServiceData->ChildrenList;
    732  
     732
    733733  Status = NetDestroyLinkList (
    734734             List,
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/MnpDxe/MnpDriver.c

    r58459 r58466  
    2929/**
    3030  Callback function which provided by user to remove one node in NetDestroyLinkList process.
    31  
     31
    3232  @param[in]    Entry           The entry to be removed.
    3333  @param[in]    Context         Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
     
    4545{
    4646  MNP_SERVICE_DATA              *MnpServiceData;
    47  
     47
    4848  MnpServiceData = MNP_SERVICE_DATA_FROM_LINK (Entry);
    4949  return MnpDestroyServiceData (MnpServiceData);
     
    5252/**
    5353  Callback function which provided by user to remove one node in NetDestroyLinkList process.
    54  
     54
    5555  @param[in]    Entry           The entry to be removed.
    5656  @param[in]    Context         Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf

    r58459 r58466  
    44#  This module produces EFI Managed Network Protocol upon EFI Simple Network Protocol,
    55#  to provide raw asynchronous network I/O services. It also produces EFI VLAN Protocol
    6 #  to provide manageability interface for VLAN configuration. 
     6#  to provide manageability interface for VLAN configuration.
    77#
    88#  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c

    r58459 r58466  
    134134  //
    135135  *PktBuf = MnpDerviceData->TxBuf + NET_VLAN_TAG_LEN;
    136  
     136
    137137  if ((TxData->DestinationAddress == NULL) && (TxData->FragmentCount == 1)) {
    138138    CopyMem (
     
    141141        TxData->FragmentTable[0].FragmentLength
    142142        );
    143    
     143
    144144    *PktLen = TxData->FragmentTable[0].FragmentLength;
    145145  } else {
     
    149149    // media header space if necessary.
    150150    //
    151     SnpMode = MnpDerviceData->Snp->Mode; 
     151    SnpMode = MnpDerviceData->Snp->Mode;
    152152    DstPos  = *PktBuf;
    153153    *PktLen = 0;
     
    241241  }
    242242
    243  
     243
    244244  if (MnpServiceData->VlanId != 0) {
    245245    //
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Mtftp4Dxe/ComponentName.c

    r58459 r58466  
    11/** @file
    22  UEFI Component Name(2) protocol implementation for Mtftp4Dxe driver.
    3  
     3
    44Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    238238  @param  Mtftp4[in]                A pointer to the EFI_MTFTP4_PROTOCOL.
    239239
    240  
     240
    241241  @retval EFI_SUCCESS               Update the ControllerNameTable of this instance successfully.
    242242  @retval EFI_INVALID_PARAMETER     The input parameter is invalid.
    243  
     243
    244244**/
    245245EFI_STATUS
     
    278278    gMtftp4ControllerNameTable = NULL;
    279279  }
    280  
     280
    281281  Status = AddUnicodeString2 (
    282282             "eng",
     
    289289    return Status;
    290290  }
    291  
     291
    292292  return AddUnicodeString2 (
    293293           "en",
     
    386386    return EFI_UNSUPPORTED;
    387387  }
    388  
    389   // 
    390   // Make sure this driver produced ChildHandle 
    391   // 
     388
     389  //
     390  // Make sure this driver produced ChildHandle
     391  //
    392392  Status = EfiTestChildHandle (
    393393             ControllerHandle,
     
    399399  }
    400400
    401   // 
     401  //
    402402  // Retrieve an instance of a produced protocol from ChildHandle
    403   // 
     403  //
    404404  Status = gBS->OpenProtocol (
    405405                  ChildHandle,
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.c

    r58459 r58466  
    320320/**
    321321  Callback function which provided by user to remove one node in NetDestroyLinkList process.
    322  
     322
    323323  @param[in]    Entry           The entry to be removed.
    324324  @param[in]    Context         Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
     
    692692           gMtftp4DriverBinding.DriverBindingHandle,
    693693           ChildHandle
    694            ); 
     694           );
    695695  }
    696696
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.h

    r58459 r58466  
    11/** @file
    22  Mtftp drivers function header.
    3  
     3
    44Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    5050
    5151/**
    52   Start the MTFTP driver on this controller. 
    53  
     52  Start the MTFTP driver on this controller.
     53
    5454  MTFTP driver will install a MTFTP SERVICE BINDING protocol on the supported
    5555  controller, which can be used to create/destroy MTFTP children.
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf

    r58459 r58466  
    3131#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC
    3232#
    33 #  DRIVER_BINDING                =  gMtftp4DriverBinding                       
     33#  DRIVER_BINDING                =  gMtftp4DriverBinding
    3434#  COMPONENT_NAME                =  gMtftp4ComponentName
    3535#  COMPONENT_NAME2               =  gMtftp4ComponentName2
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c

    r58459 r58466  
    11/** @file
    22  Interface routine for Mtftp4.
    3  
     3
    44Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    9696
    9797/**
    98   Check packet for GetInfo. 
    99  
    100   GetInfo is implemented with EfiMtftp4ReadFile. It use Mtftp4GetInfoCheckPacket 
     98  Check packet for GetInfo.
     99
     100  GetInfo is implemented with EfiMtftp4ReadFile. It use Mtftp4GetInfoCheckPacket
    101101  to inspect the first packet from server, then abort the session.
    102102
     
    167167
    168168/**
    169   Check whether the override data is valid. 
    170  
     169  Check whether the override data is valid.
     170
    171171  It will first validate whether the server is a valid unicast. If a gateway
    172   is provided in the Override, it also check that it is a unicast on the 
     172  is provided in the Override, it also check that it is a unicast on the
    173173  connected network.
    174174
     
    178178  @retval TRUE                   The override data is valid
    179179  @retval FALSE                  The override data is invalid
    180  
     180
    181181**/
    182182BOOLEAN
     
    219219/**
    220220  Poll the UDP to get the IP4 default address, which may be retrieved
    221   by DHCP. 
    222  
    223   The default time out value is 5 seconds. If IP has retrieved the default address, 
     221  by DHCP.
     222
     223  The default time out value is 5 seconds. If IP has retrieved the default address,
    224224  the UDP is reconfigured.
    225225
     
    532532  Reads the current operational settings.
    533533
    534   The GetModeData()function reads the current operational settings of this 
     534  The GetModeData()function reads the current operational settings of this
    535535  EFI MTFTPv4 Protocol driver instance.
    536536
    537537  @param  This                   Pointer to the EFI_MTFTP4_PROTOCOL instance.
    538538  @param  ModeData               Pointer to storage for the EFI MTFTPv4 Protocol
    539                                  driver mode data. 
     539                                 driver mode data.
    540540
    541541  @retval EFI_SUCCESS            The configuration data was successfully returned.
    542542  @retval EFI_OUT_OF_RESOURCES   The required mode data could not be allocated.
    543543  @retval EFI_INVALID_PARAMETER  This is NULL or ModeData is NULL.
    544  
     544
    545545**/
    546546EFI_STATUS
     
    575575
    576576/**
    577   Initializes, changes, or resets the default operational setting for this 
     577  Initializes, changes, or resets the default operational setting for this
    578578  EFI MTFTPv4 Protocol driver instance.
    579  
    580   The Configure() function is used to set and change the configuration data for 
    581   this EFI MTFTPv4 Protocol driver instance. The configuration data can be reset 
    582   to startup defaults by calling Configure() with MtftpConfigData set to NULL. 
    583   Whenever the instance is reset, any pending operation is aborted. By changing 
    584   the EFI MTFTPv4 Protocol driver instance configuration data, the client can 
    585   connect to different MTFTPv4 servers. The configuration parameters in 
    586   MtftpConfigData are used as the default parameters in later MTFTPv4 operations 
     579
     580  The Configure() function is used to set and change the configuration data for
     581  this EFI MTFTPv4 Protocol driver instance. The configuration data can be reset
     582  to startup defaults by calling Configure() with MtftpConfigData set to NULL.
     583  Whenever the instance is reset, any pending operation is aborted. By changing
     584  the EFI MTFTPv4 Protocol driver instance configuration data, the client can
     585  connect to different MTFTPv4 servers. The configuration parameters in
     586  MtftpConfigData are used as the default parameters in later MTFTPv4 operations
    587587  and can be overridden in later operations.
    588  
     588
    589589  @param  This                   Pointer to the EFI_MTFTP4_PROTOCOL instance
    590   @param  ConfigData             MtftpConfigDataPointer to the configuration data 
     590  @param  ConfigData             MtftpConfigDataPointer to the configuration data
    591591                                 structure
    592592
    593   @retval EFI_SUCCESS            The EFI MTFTPv4 Protocol driver was configured 
     593  @retval EFI_SUCCESS            The EFI MTFTPv4 Protocol driver was configured
    594594                                 successfully.
    595595  @retval EFI_INVALID_PARAMETER  One or more following conditions are TRUE:
    596596                                 1.This is NULL.
    597                                  2.MtftpConfigData.UseDefaultSetting is FALSE and 
    598                                    MtftpConfigData.StationIp is not a valid IPv4 
     597                                 2.MtftpConfigData.UseDefaultSetting is FALSE and
     598                                   MtftpConfigData.StationIp is not a valid IPv4
    599599                                   unicast address.
    600                                  3.MtftpCofigData.UseDefaultSetting is FALSE and 
     600                                 3.MtftpCofigData.UseDefaultSetting is FALSE and
    601601                                   MtftpConfigData.SubnetMask is invalid.
    602                                  4.MtftpCofigData.ServerIp is not a valid IPv4 
     602                                 4.MtftpCofigData.ServerIp is not a valid IPv4
    603603                                   unicast address.
    604                                  5.MtftpConfigData.UseDefaultSetting is FALSE and 
    605                                    MtftpConfigData.GatewayIp is not a valid IPv4 
    606                                    unicast address or is not in the same subnet 
     604                                 5.MtftpConfigData.UseDefaultSetting is FALSE and
     605                                   MtftpConfigData.GatewayIp is not a valid IPv4
     606                                   unicast address or is not in the same subnet
    607607                                   with station address.
    608   @retval EFI_ACCESS_DENIED      The EFI configuration could not be changed at this 
    609                                  time because there is one MTFTP background operation 
     608  @retval EFI_ACCESS_DENIED      The EFI configuration could not be changed at this
     609                                 time because there is one MTFTP background operation
    610610                                 in progress.
    611   @retval EFI_NO_MAPPING         When using a default address, configuration 
     611  @retval EFI_NO_MAPPING         When using a default address, configuration
    612612                                 (DHCP, BOOTP, RARP, etc.) has not finished yet.
    613   @retval EFI_UNSUPPORTED        A configuration protocol (DHCP, BOOTP, RARP, etc.) 
    614                                  could not be located when clients choose to use 
     613  @retval EFI_UNSUPPORTED        A configuration protocol (DHCP, BOOTP, RARP, etc.)
     614                                 could not be located when clients choose to use
    615615                                 the default address settings.
    616   @retval EFI_OUT_OF_RESOURCES   The EFI MTFTPv4 Protocol driver instance data could 
     616  @retval EFI_OUT_OF_RESOURCES   The EFI MTFTPv4 Protocol driver instance data could
    617617                                 not be allocated.
    618   @retval EFI_DEVICE_ERROR       An unexpected system or network error occurred. 
    619                                  The EFI MTFTPv4 Protocol driver instance is not 
     618  @retval EFI_DEVICE_ERROR       An unexpected system or network error occurred.
     619                                 The EFI MTFTPv4 Protocol driver instance is not
    620620                                 configured.
    621621
     
    703703/**
    704704  Parses the options in an MTFTPv4 OACK packet.
    705  
    706   The ParseOptions() function parses the option fields in an MTFTPv4 OACK packet 
    707   and returns the number of options that were found and optionally a list of 
     705
     706  The ParseOptions() function parses the option fields in an MTFTPv4 OACK packet
     707  and returns the number of options that were found and optionally a list of
    708708  pointers to the options in the packet.
    709   If one or more of the option fields are not valid, then EFI_PROTOCOL_ERROR is 
     709  If one or more of the option fields are not valid, then EFI_PROTOCOL_ERROR is
    710710  returned and *OptionCount and *OptionList stop at the last valid option.
    711711  The OptionList is allocated by this function, and caller should free it when used.
     
    713713  @param  This                   Pointer to the EFI_MTFTP4_PROTOCOL instance.
    714714  @param  PacketLen              Length of the OACK packet to be parsed.
    715   @param  Packet                 Pointer to the OACK packet to be parsed. 
     715  @param  Packet                 Pointer to the OACK packet to be parsed.
    716716  @param  OptionCount            Pointer to the number of options in following OptionList.
    717   @param  OptionList             Pointer to EFI_MTFTP4_OPTION storage. Call the 
     717  @param  OptionList             Pointer to EFI_MTFTP4_OPTION storage. Call the
    718718                                 EFI Boot Service FreePool() to release theOptionList
    719                                  if the options in this OptionList are not needed 
     719                                 if the options in this OptionList are not needed
    720720                                 any more
    721721
     
    765765/**
    766766  Downloads a file from an MTFTPv4 server.
    767  
    768   The ReadFile() function is used to initialize and start an MTFTPv4 download 
    769   process and optionally wait for completion. When the download operation completes, 
    770   whether successfully or not, the Token.Status field is updated by the EFI MTFTPv4 
     767
     768  The ReadFile() function is used to initialize and start an MTFTPv4 download
     769  process and optionally wait for completion. When the download operation completes,
     770  whether successfully or not, the Token.Status field is updated by the EFI MTFTPv4
    771771  Protocol driver and then Token.Event is signaled (if it is not NULL).
    772772  Data can be downloaded from the MTFTPv4 server into either of the following locations:
    773773  1.A fixed buffer that is pointed to by Token.Buffer
    774774  2.A download service function that is pointed to by Token.CheckPacket
    775   If both Token.Buffer and Token.CheckPacket are used, then Token.CheckPacket 
    776   will be called first. If the call is successful, the packet will be stored in 
     775  If both Token.Buffer and Token.CheckPacket are used, then Token.CheckPacket
     776  will be called first. If the call is successful, the packet will be stored in
    777777  Token.Buffer.
    778778
    779779  @param  This                  Pointer to the EFI_MTFTP4_PROTOCOL instance
    780   @param  Token                 Pointer to the token structure to provide the 
     780  @param  Token                 Pointer to the token structure to provide the
    781781                                parameters that are used in this operation.
    782782
    783783  @retval EFI_SUCCESS           The data file has been transferred successfully.
    784784  @retval EFI_OUT_OF_RESOURCES  Required system resources could not be allocated.
    785   @retval EFI_BUFFER_TOO_SMALL  BufferSize is not large enough to hold the downloaded 
     785  @retval EFI_BUFFER_TOO_SMALL  BufferSize is not large enough to hold the downloaded
    786786                                data in downloading process.
    787787  @retval EFI_ABORTED           Current operation is aborted by user.
     
    807807  Sends a data file to an MTFTPv4 server. May be unsupported in some EFI implementations
    808808
    809   The WriteFile() function is used to initialize an uploading operation with the 
    810   given option list and optionally wait for completion. If one or more of the 
    811   options is not supported by the server, the unsupported options are ignored and 
    812   a standard TFTP process starts instead. When the upload process completes, 
    813   whether successfully or not, Token.Event is signaled, and the EFI MTFTPv4 Protocol 
     809  The WriteFile() function is used to initialize an uploading operation with the
     810  given option list and optionally wait for completion. If one or more of the
     811  options is not supported by the server, the unsupported options are ignored and
     812  a standard TFTP process starts instead. When the upload process completes,
     813  whether successfully or not, Token.Event is signaled, and the EFI MTFTPv4 Protocol
    814814  driver updates Token.Status.
    815815  The caller can supply the data to be uploaded in the following two modes:
     
    817817  2.Through a callback function
    818818  With the user-provided buffer, the Token.BufferSize field indicates the length
    819   of the buffer, and the driver will upload the data in the buffer. With an 
    820   EFI_MTFTP4_PACKET_NEEDED callback function, the driver will call this callback 
    821   function to get more data from the user to upload. See the definition of 
    822   EFI_MTFTP4_PACKET_NEEDED for more information. These two modes cannot be used at 
     819  of the buffer, and the driver will upload the data in the buffer. With an
     820  EFI_MTFTP4_PACKET_NEEDED callback function, the driver will call this callback
     821  function to get more data from the user to upload. See the definition of
     822  EFI_MTFTP4_PACKET_NEEDED for more information. These two modes cannot be used at
    823823  the same time. The callback function will be ignored if the user provides the buffer.
    824824
    825825  @param  This                   Pointer to the EFI_MTFTP4_PROTOCOL instance.
    826   @param  Token                  Pointer to the token structure to provide the 
     826  @param  Token                  Pointer to the token structure to provide the
    827827                                 parameters that are used in this function
    828828
     
    839839                                 6. Token.Buffer and Token.PacketNeeded are both
    840840                                    NULL.
    841                                  7. One or more IPv4 addresses in Token.OverrideData 
    842                                     are not valid unicast IPv4 addresses if 
     841                                 7. One or more IPv4 addresses in Token.OverrideData
     842                                    are not valid unicast IPv4 addresses if
    843843                                    Token.OverrideData is not NULL.
    844844  @retval EFI_UNSUPPORTED        One or more options in the Token.OptionList are in the
    845845                                 unsupported list of structure EFI_MTFTP4_MODE_DATA.
    846846  @retval EFI_NOT_STARTED        The EFI MTFTPv4 Protocol driver has not been started.
    847   @retval EFI_NO_MAPPING         When using a default address, configuration (DHCP, 
     847  @retval EFI_NO_MAPPING         When using a default address, configuration (DHCP,
    848848                                 BOOTP, RARP, etc.) is not finished yet.
    849   @retval EFI_ALREADY_STARTED    This Token is already being used in another MTFTPv4 
     849  @retval EFI_ALREADY_STARTED    This Token is already being used in another MTFTPv4
    850850                                 session.
    851851  @retval EFI_OUT_OF_RESOURCES   Required system resources could not be allocated.
     
    866866
    867867/**
    868   Downloads a data file "directory" from an MTFTPv4 server. 
     868  Downloads a data file "directory" from an MTFTPv4 server.
    869869  May be unsupported in some EFI implementations
    870  
    871   The ReadDirectory() function is used to return a list of files on the MTFTPv4 
    872   server that are logically (or operationally) related to Token.Filename. The 
    873   directory request packet that is sent to the server is built with the option 
     870
     871  The ReadDirectory() function is used to return a list of files on the MTFTPv4
     872  server that are logically (or operationally) related to Token.Filename. The
     873  directory request packet that is sent to the server is built with the option
    874874  list that was provided by caller, if present.
    875   The file information that the server returns is put into either of the following 
     875  The file information that the server returns is put into either of the following
    876876  locations:
    877877  1.A fixed buffer that is pointed to by Token.Buffer
    878878  2.A download service function that is pointed to by Token.CheckPacket
    879   If both Token.Buffer and Token.CheckPacket are used, then Token.CheckPacket will 
     879  If both Token.Buffer and Token.CheckPacket are used, then Token.CheckPacket will
    880880  be called first. If the call is successful, the packet will be stored in Token.Buffer.
    881   The returned directory listing in the Token.Buffer or EFI_MTFTP4_PACKET consists 
    882   of a list of two or three variable-length ASCII strings, each terminated by a 
    883   null character, for each file in the directory. If the multicast option is involved, 
    884   the first field of each directory entry is the static multicast IP address and 
    885   UDP port number that is associated with the file name. The format of the field 
    886   is ip:ip:ip:ip:port. If the multicast option is not involved, this field and its 
     881  The returned directory listing in the Token.Buffer or EFI_MTFTP4_PACKET consists
     882  of a list of two or three variable-length ASCII strings, each terminated by a
     883  null character, for each file in the directory. If the multicast option is involved,
     884  the first field of each directory entry is the static multicast IP address and
     885  UDP port number that is associated with the file name. The format of the field
     886  is ip:ip:ip:ip:port. If the multicast option is not involved, this field and its
    887887  terminating null character are not present.
    888   The next field of each directory entry is the file name and the last field is 
    889   the file information string. The information string contains the file size and 
    890   the create/modify timestamp. The format of the information string is filesize 
    891   yyyy-mm-dd hh:mm:ss:ffff. The timestamp is Coordinated Universal Time 
     888  The next field of each directory entry is the file name and the last field is
     889  the file information string. The information string contains the file size and
     890  the create/modify timestamp. The format of the information string is filesize
     891  yyyy-mm-dd hh:mm:ss:ffff. The timestamp is Coordinated Universal Time
    892892  (UTC; also known as Greenwich Mean Time [GMT]).
    893893  The only difference between ReadFile and ReadDirectory is the opcode used.
    894894
    895895  @param  This                   Pointer to the EFI_MTFTP4_PROTOCOL instance
    896   @param  Token                  Pointer to the token structure to provide the 
     896  @param  Token                  Pointer to the token structure to provide the
    897897                                 parameters that are used in this function
    898898
     
    909909                                 6. Token.Buffer and Token.PacketNeeded are both
    910910                                    NULL.
    911                                  7. One or more IPv4 addresses in Token.OverrideData 
    912                                     are not valid unicast IPv4 addresses if 
     911                                 7. One or more IPv4 addresses in Token.OverrideData
     912                                    are not valid unicast IPv4 addresses if
    913913                                    Token.OverrideData is not NULL.
    914914  @retval EFI_UNSUPPORTED        One or more options in the Token.OptionList are in the
    915915                                 unsupported list of structure EFI_MTFTP4_MODE_DATA.
    916916  @retval EFI_NOT_STARTED        The EFI MTFTPv4 Protocol driver has not been started.
    917   @retval EFI_NO_MAPPING         When using a default address, configuration (DHCP, 
     917  @retval EFI_NO_MAPPING         When using a default address, configuration (DHCP,
    918918                                 BOOTP, RARP, etc.) is not finished yet.
    919   @retval EFI_ALREADY_STARTED    This Token is already being used in another MTFTPv4 
     919  @retval EFI_ALREADY_STARTED    This Token is already being used in another MTFTPv4
    920920                                 session.
    921921  @retval EFI_OUT_OF_RESOURCES   Required system resources could not be allocated.
     
    936936
    937937/**
    938   Gets information about a file from an MTFTPv4 server. 
    939  
    940   The GetInfo() function assembles an MTFTPv4 request packet with options; 
    941   sends it to the MTFTPv4 server; and may return an MTFTPv4 OACK, MTFTPv4 ERROR, 
    942   or ICMP ERROR packet. Retries occur only if no response packets are received 
     938  Gets information about a file from an MTFTPv4 server.
     939
     940  The GetInfo() function assembles an MTFTPv4 request packet with options;
     941  sends it to the MTFTPv4 server; and may return an MTFTPv4 OACK, MTFTPv4 ERROR,
     942  or ICMP ERROR packet. Retries occur only if no response packets are received
    943943  from the MTFTPv4 server before the timeout expires.
    944   It is implemented with EfiMtftp4ReadFile: build a token, then pass it to 
     944  It is implemented with EfiMtftp4ReadFile: build a token, then pass it to
    945945  EfiMtftp4ReadFile. In its check packet callback abort the opertions.
    946946
    947947  @param  This                   Pointer to the EFI_MTFTP4_PROTOCOL instance
    948   @param  OverrideData           Data that is used to override the existing 
    949                                  parameters. If NULL, the default parameters that 
    950                                  were set in the EFI_MTFTP4_PROTOCOL.Configure() 
     948  @param  OverrideData           Data that is used to override the existing
     949                                 parameters. If NULL, the default parameters that
     950                                 were set in the EFI_MTFTP4_PROTOCOL.Configure()
    951951                                 function are used
    952952  @param  Filename               Pointer to null-terminated ASCII file name string
    953   @param  ModeStr                Pointer to null-terminated ASCII mode string. If NULL, "octet" 
     953  @param  ModeStr                Pointer to null-terminated ASCII mode string. If NULL, "octet"
    954954                                 will be used
    955955  @param  OptionCount            Number of option/value string pairs in OptionList
    956   @param  OptionList             Pointer to array of option/value string pairs. 
     956  @param  OptionList             Pointer to array of option/value string pairs.
    957957                                 Ignored if OptionCount is zero
    958958  @param  PacketLength           The number of bytes in the returned packet
    959   @param  Packet                 PacketThe pointer to the received packet. This 
     959  @param  Packet                 PacketThe pointer to the received packet. This
    960960                                 buffer must be freed by the caller.
    961961
    962   @retval EFI_SUCCESS            An MTFTPv4 OACK packet was received and is in 
     962  @retval EFI_SUCCESS            An MTFTPv4 OACK packet was received and is in
    963963                                 the Buffer.
    964964  @retval EFI_INVALID_PARAMETER  One or more of the following conditions is TRUE:
     
    968968                                 4.One or more options in OptionList have wrong format.
    969969                                 5.PacketLength is NULL.
    970                                  6.One or more IPv4 addresses in OverrideData are 
    971                                    not valid unicast IPv4 addresses if OverrideData 
     970                                 6.One or more IPv4 addresses in OverrideData are
     971                                   not valid unicast IPv4 addresses if OverrideData
    972972                                   is not NULL.
    973973  @retval EFI_UNSUPPORTED        One or more options in the OptionList are in the
    974974                                 unsupported list of structure EFI_MTFTP4_MODE_DATA
    975975  @retval EFI_NOT_STARTED        The EFI MTFTPv4 Protocol driver has not been started.
    976   @retval EFI_NO_MAPPING         When using a default address, configuration (DHCP, 
     976  @retval EFI_NO_MAPPING         When using a default address, configuration (DHCP,
    977977                                 BOOTP, RARP, etc.) has not finished yet.
    978978  @retval EFI_ACCESS_DENIED      The previous operation has not completed yet.
    979979  @retval EFI_OUT_OF_RESOURCES   Required system resources could not be allocated.
    980   @retval EFI_TFTP_ERROR         An MTFTPv4 ERROR packet was received and is in 
     980  @retval EFI_TFTP_ERROR         An MTFTPv4 ERROR packet was received and is in
    981981                                 the Buffer.
    982   @retval EFI_ICMP_ERROR         An ICMP ERROR packet was received and the Packet 
     982  @retval EFI_ICMP_ERROR         An ICMP ERROR packet was received and the Packet
    983983                                 is set to NULL.
    984   @retval EFI_PROTOCOL_ERROR     An unexpected MTFTPv4 packet was received and is 
     984  @retval EFI_PROTOCOL_ERROR     An unexpected MTFTPv4 packet was received and is
    985985                                 in the Buffer.
    986986  @retval EFI_TIMEOUT            No responses were received from the MTFTPv4 server.
     
    10491049  Polls for incoming data packets and processes outgoing data packets.
    10501050
    1051   The Poll() function can be used by network drivers and applications to increase 
    1052   the rate that data packets are moved between the communications device and the 
     1051  The Poll() function can be used by network drivers and applications to increase
     1052  the rate that data packets are moved between the communications device and the
    10531053  transmit and receive queues.
    1054   In some systems, the periodic timer event in the managed network driver may not 
    1055   poll the underlying communications device fast enough to transmit and/or receive 
    1056   all data packets without missing incoming packets or dropping outgoing packets. 
    1057   Drivers and applications that are experiencing packet loss should try calling 
     1054  In some systems, the periodic timer event in the managed network driver may not
     1055  poll the underlying communications device fast enough to transmit and/or receive
     1056  all data packets without missing incoming packets or dropping outgoing packets.
     1057  Drivers and applications that are experiencing packet loss should try calling
    10581058  the Poll() function more often.
    1059  
     1059
    10601060  @param  This                   Pointer to the EFI_MTFTP4_PROTOCOL instance
    10611061
     
    10661066  @retval EFI_INVALID_PARAMETER  This is NULL.
    10671067  @retval EFI_DEVICE_ERROR       An unexpected system or network error occurred.
    1068   @retval EFI_TIMEOUT            Data was dropped out of the transmit and/or receive 
     1068  @retval EFI_TIMEOUT            Data was dropped out of the transmit and/or receive
    10691069                                 queue. Consider increasing the polling rate.
    10701070
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h

    r58459 r58466  
    11/** @file
    2  
     2
    33  Mtftp4 Implementation.
    4  
     4
    55  Mtftp4 Implementation, it supports the following RFCs:
    66  RFC1350 - THE TFTP PROTOCOL (REVISION 2)
     
    99  RFC2348 - TFTP Blocksize Option
    1010  RFC2349 - TFTP Timeout Interval and Transfer Size Options
    11  
     11
    1212Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
    1313This program and the accompanying materials
     
    170170/**
    171171  Start the MTFTP session for upload.
    172  
    173   It will first init some states, then send the WRQ request packet, 
     172
     173  It will first init some states, then send the WRQ request packet,
    174174  and start receiving the packet.
    175175
     
    189189
    190190/**
    191   Start the MTFTP session to download. 
    192  
    193   It will first initialize some of the internal states then build and send a RRQ 
     191  Start the MTFTP session to download.
     192
     193  It will first initialize some of the internal states then build and send a RRQ
    194194  reqeuest packet, at last, it will start receive for the downloading.
    195195
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Option.h

    r48674 r58466  
    11/** @file
    22  Routines to process MTFTP4 options.
    3  
     3
    44Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    3939
    4040/**
    41   Allocate and fill in a array of Mtftp options from the Packet. 
    42  
     41  Allocate and fill in a array of Mtftp options from the Packet.
     42
    4343  It first calls Mtftp4FillOption to get the option number, then allocate
    4444  the array, at last, call Mtftp4FillOption again to save the options.
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Rrq.c

    r58459 r58466  
    11/** @file
    22  Routines to process Rrq (download).
    3  
     3
    44Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    3737
    3838/**
    39   Start the MTFTP session to download. 
    40  
    41   It will first initialize some of the internal states then build and send a RRQ 
     39  Start the MTFTP session to download.
     40
     41  It will first initialize some of the internal states then build and send a RRQ
    4242  reqeuest packet, at last, it will start receive for the downloading.
    4343
     
    167167  // returns EFI_NOT_FOUND, the block has been saved, don't save it again.
    168168  // Note that : For bigger files, allowing the block counter to roll over
    169   // to accept transfers of unlimited size. So TotalBlock is memorised as 
     169  // to accept transfers of unlimited size. So TotalBlock is memorised as
    170170  // continuous block counter.
    171171  //
     
    228228
    229229/**
    230   Function to process the received data packets. 
    231  
     230  Function to process the received data packets.
     231
    232232  It will save the block then send back an ACK if it is active.
    233233
     
    318318/**
    319319  Validate whether the options received in the server's OACK packet is valid.
    320  
     320
    321321  The options are valid only if:
    322322  1. The server doesn't include options not requested by us
     
    428428  }
    429429
    430   if (!Config->UseDefaultSetting && 
     430  if (!Config->UseDefaultSetting &&
    431431      !EFI_IP4_EQUAL (&mZeroIp4Addr, &Config->GatewayIp)) {
    432432    //
     
    435435    //
    436436    Status = McastIo->Protocol.Udp4->Routes (
    437                                        McastIo->Protocol.Udp4, 
     437                                       McastIo->Protocol.Udp4,
    438438                                       FALSE,
    439439                                       &mZeroIp4Addr,
     
    441441                                       &Config->GatewayIp
    442442                                       );
    443                              
     443
    444444    if (EFI_ERROR (Status)) {
    445445      McastIo->Protocol.Udp4->Configure (McastIo->Protocol.Udp4, NULL);
     
    459459
    460460/**
    461   Function to process the OACK. 
    462  
     461  Function to process the OACK.
     462
    463463  It will first validate the OACK packet, then update the various negotiated parameters.
    464464
     
    591591        return Status;
    592592      }
    593    
     593
    594594      //
    595595      // Update the parameters used.
     
    598598        Instance->BlkSize = Reply.BlkSize;
    599599      }
    600      
     600
    601601      if (Reply.Timeout != 0) {
    602602        Instance->Timeout = Reply.Timeout;
    603       } 
    604     }   
    605    
     603      }
     604    }
     605
    606606  } else {
    607607    Instance->Master = TRUE;
    608    
     608
    609609    if (Reply.BlkSize != 0) {
    610610      Instance->BlkSize = Reply.BlkSize;
     
    615615    }
    616616  }
    617  
     617
    618618  //
    619619  // Send an ACK to (Expected - 1) which is 0 for unicast download,
     
    762762    Status = EFI_TFTP_ERROR;
    763763    break;
    764    
     764
    765765  default:
    766766    break;
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c

    r58459 r58466  
    11/** @file
    22  Support routines for Mtftp.
    3  
     3
    44Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    4949
    5050/**
    51   Initialize the block range for either RRQ or WRQ. 
    52  
    53   RRQ and WRQ have different requirements for Start and End. 
    54   For example, during start up, WRQ initializes its whole valid block range 
    55   to [0, 0xffff]. This is bacause the server will send us a ACK0 to inform us 
    56   to start the upload. When the client received ACK0, it will remove 0 from the 
     51  Initialize the block range for either RRQ or WRQ.
     52
     53  RRQ and WRQ have different requirements for Start and End.
     54  For example, during start up, WRQ initializes its whole valid block range
     55  to [0, 0xffff]. This is bacause the server will send us a ACK0 to inform us
     56  to start the upload. When the client received ACK0, it will remove 0 from the
    5757  range, get the next block number, which is 1, then upload the BLOCK1. For RRQ
    58   without option negotiation, the server will directly send us the BLOCK1 in 
    59   response to the client's RRQ. When received BLOCK1, the client will remove 
    60   it from the block range and send an ACK. It also works if there is option 
     58  without option negotiation, the server will directly send us the BLOCK1 in
     59  response to the client's RRQ. When received BLOCK1, the client will remove
     60  it from the block range and send an ACK. It also works if there is option
    6161  negotiation.
    6262
     
    9494  @param  Head                  The block range head
    9595
    96   @return The first valid block number, -1 if the block range is empty. 
     96  @return The first valid block number, -1 if the block range is empty.
    9797
    9898**/
     
    114114
    115115/**
    116   Set the last block number of the block range list. 
    117  
     116  Set the last block number of the block range list.
     117
    118118  It will remove all the blocks after the Last. MTFTP initialize the block range
    119   to the maximum possible range, such as [0, 0xffff] for WRQ. When it gets the 
     119  to the maximum possible range, such as [0, 0xffff] for WRQ. When it gets the
    120120  last block number, it will call this function to set the last block number.
    121121
     
    160160  @param  Num                   The block number to remove
    161161  @param  Completed             Whether Num is the last block number
    162   @param  TotalBlock            The continuous block number in all 
     162  @param  TotalBlock            The continuous block number in all
    163163
    164164  @retval EFI_NOT_FOUND         The block number isn't in the block range list
     
    214214
    215215      //
    216       // Note that: RFC 1350 does not mention block counter roll-over, 
    217       // but several TFTP hosts implement the roll-over be able to accept 
    218       // transfers of unlimited size. There is no consensus, however, whether 
    219       // the counter should wrap around to zero or to one. Many implementations 
    220       // wrap to zero, because this is the simplest to implement. Here we choose 
     216      // Note that: RFC 1350 does not mention block counter roll-over,
     217      // but several TFTP hosts implement the roll-over be able to accept
     218      // transfers of unlimited size. There is no consensus, however, whether
     219      // the counter should wrap around to zero or to one. Many implementations
     220      // wrap to zero, because this is the simplest to implement. Here we choose
    221221      // this solution.
    222222      //
    223223          *TotalBlock  = Num;
    224          
     224
    225225      if (Range->Round > 0) {
    226226            *TotalBlock += Range->Bound +  MultU64x32 ((UINTN) (Range->Round -1), (UINT32) (Range->Bound + 1)) + 1;
     
    341341
    342342  @param  Instance              The MTFTP session
    343   @param  ErrCode               The error code 
     343  @param  ErrCode               The error code
    344344  @param  ErrInfo               The error message
    345345
     
    380380/**
    381381  The callback function called when the packet is transmitted.
    382  
     382
    383383  It simply frees the packet.
    384384
     
    422422
    423423/**
    424   Send the packet for the instance. 
    425  
    426   It will first save a reference to the packet for later retransmission. 
    427   Then determine the destination port, listen port for requests, and connected 
     424  Send the packet for the instance.
     425
     426  It will first save a reference to the packet for later retransmission.
     427  Then determine the destination port, listen port for requests, and connected
    428428  port for others. At last, send the packet out.
    429429
     
    469469  OpCode = NTOHS (*(UINT16 *)Buffer);
    470470
    471   if ((OpCode == EFI_MTFTP4_OPCODE_RRQ) || 
     471  if ((OpCode == EFI_MTFTP4_OPCODE_RRQ) ||
    472472      (OpCode == EFI_MTFTP4_OPCODE_DIR) ||
    473473      (OpCode == EFI_MTFTP4_OPCODE_WRQ)) {
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.h

    r48674 r58466  
    11/** @file
    22  Support routines for MTFTP.
    3  
     3
    44Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    3131
    3232/**
    33   Initialize the block range for either RRQ or WRQ. 
    34  
    35   RRQ and WRQ have different requirements for Start and End. 
    36   For example, during start up, WRQ initializes its whole valid block range 
    37   to [0, 0xffff]. This is bacause the server will send us a ACK0 to inform us 
    38   to start the upload. When the client received ACK0, it will remove 0 from the 
     33  Initialize the block range for either RRQ or WRQ.
     34
     35  RRQ and WRQ have different requirements for Start and End.
     36  For example, during start up, WRQ initializes its whole valid block range
     37  to [0, 0xffff]. This is bacause the server will send us a ACK0 to inform us
     38  to start the upload. When the client received ACK0, it will remove 0 from the
    3939  range, get the next block number, which is 1, then upload the BLOCK1. For RRQ
    40   without option negotiation, the server will directly send us the BLOCK1 in 
    41   response to the client's RRQ. When received BLOCK1, the client will remove 
    42   it from the block range and send an ACK. It also works if there is option 
     40  without option negotiation, the server will directly send us the BLOCK1 in
     41  response to the client's RRQ. When received BLOCK1, the client will remove
     42  it from the block range and send an ACK. It also works if there is option
    4343  negotiation.
    4444
     
    6363  @param  Head                  The block range head
    6464
    65   @return The first valid block number, -1 if the block range is empty. 
     65  @return The first valid block number, -1 if the block range is empty.
    6666
    6767**/
     
    7272
    7373/**
    74   Set the last block number of the block range list. 
    75  
     74  Set the last block number of the block range list.
     75
    7676  It will remove all the blocks after the Last. MTFTP initialize the block range
    77   to the maximum possible range, such as [0, 0xffff] for WRQ. When it gets the 
     77  to the maximum possible range, such as [0, 0xffff] for WRQ. When it gets the
    7878  last block number, it will call this function to set the last block number.
    7979
     
    9494  @param  Num                   The block number to remove
    9595  @param  Completed             Wether Num is the last block number
    96   @param  TotalBlock            The continuous block number in all 
     96  @param  TotalBlock            The continuous block number in all
    9797
    9898  @retval EFI_NOT_FOUND         The block number isn't in the block range list
     
    121121
    122122/**
    123   Send the packet for the instance. 
    124  
    125   It will first save a reference to the packet for later retransmission. 
    126   Then determine the destination port, listen port for requests, and connected 
     123  Send the packet for the instance.
     124
     125  It will first save a reference to the packet for later retransmission.
     126  Then determine the destination port, listen port for requests, and connected
    127127  port for others. At last, send the packet out.
    128128
     
    159159
    160160  @param  Instance              The MTFTP session
    161   @param  ErrCode               The error code 
     161  @param  ErrCode               The error code
    162162  @param  ErrInfo               The error message
    163163
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Wrq.c

    r58459 r58466  
    11/** @file
    22  Routines to process Wrq (upload).
    3  
     3
    44Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    121121
    122122/**
    123   Function to handle received ACK packet. 
    124  
    125   If the ACK number matches the expected block number, and there are more 
     123  Function to handle received ACK packet.
     124
     125  If the ACK number matches the expected block number, and there are more
    126126  data pending, send the next block. Otherwise tell the caller that we are done.
    127127
     
    147147  INTN                      Expected;
    148148  UINT64                    TotalBlock;
    149  
     149
    150150  *Completed  = FALSE;
    151151  AckNum      = NTOHS (Packet->Ack.Block[0]);
     
    172172
    173173  if (Expected < 0) {
    174  
     174
    175175    //
    176176    // The block range is empty. It may either because the the last
     
    199199
    200200/**
    201   Check whether the received OACK is valid. 
    202  
     201  Check whether the received OACK is valid.
     202
    203203  The OACK is valid only if:
    204204  1. It only include options requested by us
     
    241241
    242242/**
    243   Function to handle the MTFTP OACK packet. 
    244  
     243  Function to handle the MTFTP OACK packet.
     244
    245245  It parses the packet's options, and update the internal states of the session.
    246246
     
    455455    Status = EFI_TFTP_ERROR;
    456456    break;
    457    
     457
    458458  default:
    459459    break;
     
    489489/**
    490490  Start the MTFTP session for upload.
    491  
    492   It will first init some states, then send the WRQ request packet, 
     491
     492  It will first init some states, then send the WRQ request packet,
    493493  and start receiving the packet.
    494494
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/SnpDxe/ComponentName.c

    r58459 r58466  
    33
    44Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
    5 This program and the accompanying materials are licensed 
    6 and made available under the terms and conditions of the BSD License which 
    7 accompanies this distribution. The full text of the license may be found at 
    8 http://opensource.org/licenses/bsd-license.php 
     5This program and the accompanying materials are licensed
     6and made available under the terms and conditions of the BSD License which
     7accompanies this distribution. The full text of the license may be found at
     8http://opensource.org/licenses/bsd-license.php
    99
    1010THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     
    239239  @param  Snp[in]                   A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL.
    240240
    241  
     241
    242242  @retval EFI_SUCCESS               Update the ControllerNameTable of this instance successfully.
    243243  @retval EFI_INVALID_PARAMETER     The input parameter is invalid.
    244  
     244
    245245**/
    246246EFI_STATUS
     
    286286    gSimpleNetworkControllerNameTable = NULL;
    287287  }
    288  
     288
    289289  Status = AddUnicodeString2 (
    290290             "eng",
     
    297297    return Status;
    298298  }
    299  
     299
    300300  return AddUnicodeString2 (
    301301           "en",
     
    318318  managing the controller specified by ControllerHandle and ChildHandle,
    319319  then EFI_UNSUPPORTED is returned.  If the driver specified by This does not
    320   support the language specified by Language, then EFI_UNSUPPORTED is returned. 
    321   Currently not implemented. 
     320  support the language specified by Language, then EFI_UNSUPPORTED is returned.
     321  Currently not implemented.
    322322
    323323  @param  This[in]              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
     
    388388  EFI_STATUS                    Status;
    389389  EFI_SIMPLE_NETWORK_PROTOCOL   *Snp;
    390  
     390
    391391  if (ChildHandle != NULL) {
    392392    return EFI_UNSUPPORTED;
     
    405405  }
    406406
    407   // 
     407  //
    408408  // Retrieve an instance of a produced protocol from ControllerHandle
    409   // 
     409  //
    410410  Status = gBS->OpenProtocol (
    411411                  ControllerHandle,
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/SnpDxe/Initialize.c

    r48674 r58466  
    33
    44Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>
    5 This program and the accompanying materials are licensed 
    6 and made available under the terms and conditions of the BSD License which 
    7 accompanies this distribution. The full text of the license may be found at 
    8 http://opensource.org/licenses/bsd-license.php 
     5This program and the accompanying materials are licensed
     6and made available under the terms and conditions of the BSD License which
     7accompanies this distribution. The full text of the license may be found at
     8http://opensource.org/licenses/bsd-license.php
    99
    1010THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     
    2020
    2121  @param  Snp                   Pointer to snp driver structure.
    22   @param  CableDetectFlag       Do/don't detect the cable (depending on what 
     22  @param  CableDetectFlag       Do/don't detect the cable (depending on what
    2323                                undi supports).
    24  
     24
    2525  @retval EFI_SUCCESS           UNDI is initialized successfully.
    2626  @retval EFI_DEVICE_ERROR      UNDI could not be initialized.
     
    130130
    131131/**
    132   Resets a network adapter and allocates the transmit and receive buffers 
    133   required by the network interface; optionally, also requests allocation of 
     132  Resets a network adapter and allocates the transmit and receive buffers
     133  required by the network interface; optionally, also requests allocation of
    134134  additional transmit and receive buffers.
    135135
     
    143143  @param ExtraRxBufferSize  The size, in bytes, of the extra receive buffer space
    144144                            that the driver should allocate for the network interface.
    145                             Some network interfaces will not be able to use the 
    146                             extra buffer, and the caller will not know if it is 
     145                            Some network interfaces will not be able to use the
     146                            extra buffer, and the caller will not know if it is
    147147                            actually being used.
    148148  @param ExtraTxBufferSize  The size, in bytes, of the extra transmit buffer space
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/SnpDxe/Mcast_ip_to_mac.c

    r48674 r58466  
    22                Implementation of converting an multicast IP address to multicast HW MAC
    33                address.
    4  
     4
    55Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.<BR>
    6 This program and the accompanying materials are licensed 
    7 and made available under the terms and conditions of the BSD License which 
    8 accompanies this distribution. The full text of the license may be found at 
    9 http://opensource.org/licenses/bsd-license.php 
     6This program and the accompanying materials are licensed
     7and made available under the terms and conditions of the BSD License which
     8accompanies this distribution. The full text of the license may be found at
     9http://opensource.org/licenses/bsd-license.php
    1010
    1111THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     
    2424  @param  MAC   Pointer to hold the return MAC address.
    2525
    26   @retval EFI_SUCCESS           The multicast IP address was mapped to the 
     26  @retval EFI_SUCCESS           The multicast IP address was mapped to the
    2727                                multicast HW MAC address.
    28   @retval EFI_INVALID_PARAMETER Invalid UNDI command. 
    29   @retval EFI_UNSUPPORTED       Command is not supported by UNDI. 
    30   @retval EFI_DEVICE_ERROR      Fail to execute UNDI command. 
     28  @retval EFI_INVALID_PARAMETER Invalid UNDI command.
     29  @retval EFI_UNSUPPORTED       Command is not supported by UNDI.
     30  @retval EFI_DEVICE_ERROR      Fail to execute UNDI command.
    3131
    3232**/
     
    104104/**
    105105  Converts a multicast IP address to a multicast HW MAC address.
    106  
    107   This function converts a multicast IP address to a multicast HW MAC address 
     106
     107  This function converts a multicast IP address to a multicast HW MAC address
    108108  for all packet transactions. If the mapping is accepted, then EFI_SUCCESS will
    109109  be returned.
     
    111111  @param This A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance.
    112112  @param IPv6 Set to TRUE if the multicast IP address is IPv6 [RFC 2460].
    113               Set to FALSE if the multicast IP address is IPv4 [RFC 791]. 
    114   @param IP   The multicast IP address that is to be converted to a multicast 
     113              Set to FALSE if the multicast IP address is IPv4 [RFC 791].
     114  @param IP   The multicast IP address that is to be converted to a multicast
    115115              HW MAC address.
    116116  @param MAC  The multicast HW MAC address that is to be generated from IP.
     
    118118  @retval EFI_SUCCESS           The multicast IP address was mapped to the
    119119                                multicast HW MAC address.
    120   @retval EFI_NOT_STARTED       The Simple Network Protocol interface has not 
     120  @retval EFI_NOT_STARTED       The Simple Network Protocol interface has not
    121121                                been started by calling Start().
    122122  @retval EFI_INVALID_PARAMETER IP is NULL.
    123123  @retval EFI_INVALID_PARAMETER MAC is NULL.
    124   @retval EFI_INVALID_PARAMETER IP does not point to a valid IPv4 or IPv6 
     124  @retval EFI_INVALID_PARAMETER IP does not point to a valid IPv4 or IPv6
    125125                                multicast address.
    126   @retval EFI_DEVICE_ERROR      The Simple Network Protocol interface has not 
     126  @retval EFI_DEVICE_ERROR      The Simple Network Protocol interface has not
    127127                                been initialized by calling Initialize().
    128   @retval EFI_UNSUPPORTED       IPv6 is TRUE and the implementation does not 
     128  @retval EFI_UNSUPPORTED       IPv6 is TRUE and the implementation does not
    129129                                support IPv6 multicast to MAC address conversion.
    130130
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/SnpDxe/Nvdata.c

    r48674 r58466  
    22        Implementation of reading and writing operations on the NVRAM device
    33        attached to a network interface.
    4  
     4
    55Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>
    6 This program and the accompanying materials are licensed 
    7 and made available under the terms and conditions of the BSD License which 
    8 accompanies this distribution. The full text of the license may be found at 
    9 http://opensource.org/licenses/bsd-license.php 
     6This program and the accompanying materials are licensed
     7and made available under the terms and conditions of the BSD License which
     8accompanies this distribution. The full text of the license may be found at
     9http://opensource.org/licenses/bsd-license.php
    1010
    1111THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     
    9898
    9999/**
    100   Performs read and write operations on the NVRAM device attached to a network 
     100  Performs read and write operations on the NVRAM device attached to a network
    101101  interface.
    102  
    103   This function performs read and write operations on the NVRAM device attached 
     102
     103  This function performs read and write operations on the NVRAM device attached
    104104  to a network interface. If ReadWrite is TRUE, a read operation is performed.
    105   If ReadWrite is FALSE, a write operation is performed. Offset specifies the 
    106   byte offset at which to start either operation. Offset must be a multiple of 
    107   NvRamAccessSize , and it must have a value between zero and NvRamSize. 
     105  If ReadWrite is FALSE, a write operation is performed. Offset specifies the
     106  byte offset at which to start either operation. Offset must be a multiple of
     107  NvRamAccessSize , and it must have a value between zero and NvRamSize.
    108108  BufferSize specifies the length of the read or write operation. BufferSize must
    109109  also be a multiple of NvRamAccessSize, and Offset + BufferSize must not exceed
    110   NvRamSize. 
    111   If any of the above conditions is not met, then EFI_INVALID_PARAMETER will be 
    112   returned. 
    113   If all the conditions are met and the operation is "read," the NVRAM device 
    114   attached to the network interface will be read into Buffer and EFI_SUCCESS 
     110  NvRamSize.
     111  If any of the above conditions is not met, then EFI_INVALID_PARAMETER will be
     112  returned.
     113  If all the conditions are met and the operation is "read," the NVRAM device
     114  attached to the network interface will be read into Buffer and EFI_SUCCESS
    115115  will be returned. If this is a write operation, the contents of Buffer will be
    116   used to update the contents of the NVRAM device attached to the network 
     116  used to update the contents of the NVRAM device attached to the network
    117117  interface and EFI_SUCCESS will be returned.
    118  
     118
    119119  It does the basic checking on the input parameters and retrieves snp structure
    120120  and then calls the read_nvdata() call which does the actual reading
     
    122122  @param This       A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance.
    123123  @param ReadWrite  TRUE for read operations, FALSE for write operations.
    124   @param Offset     Byte offset in the NVRAM device at which to start the read or 
    125                     write operation. This must be a multiple of NvRamAccessSize 
    126                     and less than NvRamSize. (See EFI_SIMPLE_NETWORK_MODE) 
    127   @param BufferSize The number of bytes to read or write from the NVRAM device. 
     124  @param Offset     Byte offset in the NVRAM device at which to start the read or
     125                    write operation. This must be a multiple of NvRamAccessSize
     126                    and less than NvRamSize. (See EFI_SIMPLE_NETWORK_MODE)
     127  @param BufferSize The number of bytes to read or write from the NVRAM device.
    128128                    This must also be a multiple of NvramAccessSize.
    129129  @param Buffer     A pointer to the data buffer.
     
    132132  @retval EFI_NOT_STARTED       The network interface has not been started.
    133133  @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
    134                                 * The This parameter is NULL 
    135                                 * The This parameter does not point to a valid 
     134                                * The This parameter is NULL
     135                                * The This parameter does not point to a valid
    136136                                  EFI_SIMPLE_NETWORK_PROTOCOL  structure
    137                                 * The Offset parameter is not a multiple of 
     137                                * The Offset parameter is not a multiple of
    138138                                  EFI_SIMPLE_NETWORK_MODE.NvRamAccessSize
    139                                 * The Offset parameter is not less than 
     139                                * The Offset parameter is not less than
    140140                                  EFI_SIMPLE_NETWORK_MODE.NvRamSize
    141                                 * The BufferSize parameter is not a multiple of 
     141                                * The BufferSize parameter is not a multiple of
    142142                                  EFI_SIMPLE_NETWORK_MODE.NvRamAccessSize
    143143                                * The Buffer parameter is NULL
    144   @retval EFI_DEVICE_ERROR      The command could not be sent to the network 
     144  @retval EFI_DEVICE_ERROR      The command could not be sent to the network
    145145                                interface.
    146146  @retval EFI_UNSUPPORTED       This function is not supported by the network
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/SnpDxe/Receive_filters.c

    r48674 r58466  
    44
    55Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.<BR>
    6 This program and the accompanying materials are licensed and made available under the 
    7 terms and conditions of the BSD License which accompanies this distribution. The 
    8 full text of the license may be found at 
    9 http://opensource.org/licenses/bsd-license.php 
     6This program and the accompanying materials are licensed and made available under the
     7terms and conditions of the BSD License which accompanies this distribution. The
     8full text of the license may be found at
     9http://opensource.org/licenses/bsd-license.php
    1010
    1111THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     
    2525  @param  MCastAddressCount  Multicast address count for a new multicast address
    2626                             list.
    27   @param  MCastAddressList   List of new multicast addresses. 
    28    
     27  @param  MCastAddressList   List of new multicast addresses.
     28
    2929  @retval EFI_SUCCESS           The multicast receive filter list was updated.
    3030  @retval EFI_INVALID_PARAMETER Invalid UNDI command.
     
    116116  @param  Snp             Pointer to snp driver structure
    117117  @param  DisableFlags    Bit mask for disabling the receive filters
    118   @param  ResetMCastList  Boolean flag to reset/delete the multicast filter 
     118  @param  ResetMCastList  Boolean flag to reset/delete the multicast filter
    119119                          list.
    120120
    121121  @retval EFI_SUCCESS           The multicast receive filter list was updated.
    122122  @retval EFI_DEVICE_ERROR      Fail to execute UNDI command.
    123    
    124 **/ 
     123
     124**/
    125125EFI_STATUS
    126126PxeRecvFilterDisable (
     
    195195
    196196  @retval EFI_SUCCESS           The receive filter was read.
    197   @retval EFI_DEVICE_ERROR      Fail to execute UNDI command. 
    198    
     197  @retval EFI_DEVICE_ERROR      Fail to execute UNDI command.
     198
    199199**/
    200200EFI_STATUS
     
    292292/**
    293293  Manages the multicast receive filters of a network interface.
    294  
    295   This function is used enable and disable the hardware and software receive 
     294
     295  This function is used enable and disable the hardware and software receive
    296296  filters for the underlying network device.
    297   The receive filter change is broken down into three steps: 
    298   * The filter mask bits that are set (ON) in the Enable parameter are added to 
    299     the current receive filter settings. 
     297  The receive filter change is broken down into three steps:
     298  * The filter mask bits that are set (ON) in the Enable parameter are added to
     299    the current receive filter settings.
    300300  * The filter mask bits that are set (ON) in the Disable parameter are subtracted
    301301    from the updated receive filter settings.
    302302  * If the resulting receive filter setting is not supported by the hardware a
    303303    more liberal setting is selected.
    304   If the same bits are set in the Enable and Disable parameters, then the bits 
     304  If the same bits are set in the Enable and Disable parameters, then the bits
    305305  in the Disable parameter takes precedence.
    306   If the ResetMCastFilter parameter is TRUE, then the multicast address list 
    307   filter is disabled (irregardless of what other multicast bits are set in the 
    308   Enable and Disable parameters). The SNP->Mode->MCastFilterCount field is set 
     306  If the ResetMCastFilter parameter is TRUE, then the multicast address list
     307  filter is disabled (irregardless of what other multicast bits are set in the
     308  Enable and Disable parameters). The SNP->Mode->MCastFilterCount field is set
    309309  to zero. The Snp->Mode->MCastFilter contents are undefined.
    310   After enabling or disabling receive filter settings, software should verify 
    311   the new settings by checking the Snp->Mode->ReceiveFilterSettings, 
     310  After enabling or disabling receive filter settings, software should verify
     311  the new settings by checking the Snp->Mode->ReceiveFilterSettings,
    312312  Snp->Mode->MCastFilterCount and Snp->Mode->MCastFilter fields.
    313   Note: Some network drivers and/or devices will automatically promote receive 
     313  Note: Some network drivers and/or devices will automatically promote receive
    314314    filter settings if the requested setting can not be honored. For example, if
    315     a request for four multicast addresses is made and the underlying hardware 
    316     only supports two multicast addresses the driver might set the promiscuous 
     315    a request for four multicast addresses is made and the underlying hardware
     316    only supports two multicast addresses the driver might set the promiscuous
    317317    or promiscuous multicast receive filters instead. The receiving software is
    318     responsible for discarding any extra packets that get through the hardware 
     318    responsible for discarding any extra packets that get through the hardware
    319319    receive filters.
    320     Note: Note: To disable all receive filter hardware, the network driver must 
     320    Note: Note: To disable all receive filter hardware, the network driver must
    321321      be Shutdown() and Stopped(). Calling ReceiveFilters() with Disable set to
    322       Snp->Mode->ReceiveFilterSettings will make it so no more packets are 
    323       returned by the Receive() function, but the receive hardware may still be 
     322      Snp->Mode->ReceiveFilterSettings will make it so no more packets are
     323      returned by the Receive() function, but the receive hardware may still be
    324324      moving packets into system memory before inspecting and discarding them.
    325       Unexpected system errors, reboots and hangs can occur if an OS is loaded 
     325      Unexpected system errors, reboots and hangs can occur if an OS is loaded
    326326      and the network devices are not Shutdown() and Stopped().
    327   If ResetMCastFilter is TRUE, then the multicast receive filter list on the 
     327  If ResetMCastFilter is TRUE, then the multicast receive filter list on the
    328328  network interface will be reset to the default multicast receive filter list.
    329   If ResetMCastFilter is FALSE, and this network interface allows the multicast 
    330   receive filter list to be modified, then the MCastFilterCnt and MCastFilter 
    331   are used to update the current multicast receive filter list. The modified 
    332   receive filter list settings can be found in the MCastFilter field of 
     329  If ResetMCastFilter is FALSE, and this network interface allows the multicast
     330  receive filter list to be modified, then the MCastFilterCnt and MCastFilter
     331  are used to update the current multicast receive filter list. The modified
     332  receive filter list settings can be found in the MCastFilter field of
    333333  EFI_SIMPLE_NETWORK_MODE. If the network interface does not allow the multicast
    334334  receive filter list to be modified, then EFI_INVALID_PARAMETER will be returned.
    335335  If the driver has not been initialized, EFI_DEVICE_ERROR will be returned.
    336   If the receive filter mask and multicast receive filter list have been 
     336  If the receive filter mask and multicast receive filter list have been
    337337  successfully updated on the network interface, EFI_SUCCESS will be returned.
    338338
     
    341341                          interface.
    342342  @param Disable          A bit mask of receive filters to disable on the network
    343                           interface. For backward compatibility with EFI 1.1 
     343                          interface. For backward compatibility with EFI 1.1
    344344                          platforms, the EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST bit
    345345                          must be set when the ResetMCastFilter parameter is TRUE.
    346   @param ResetMCastFilter Set to TRUE to reset the contents of the multicast 
    347                           receive filters on the network interface to their 
    348                           default values. 
     346  @param ResetMCastFilter Set to TRUE to reset the contents of the multicast
     347                          receive filters on the network interface to their
     348                          default values.
    349349  @param MCastFilterCnt   Number of multicast HW MAC addresses in the new MCastFilter
    350                           list. This value must be less than or equal to the 
    351                           MCastFilterCnt field of EFI_SIMPLE_NETWORK_MODE. 
     350                          list. This value must be less than or equal to the
     351                          MCastFilterCnt field of EFI_SIMPLE_NETWORK_MODE.
    352352                          This field is optional if ResetMCastFilter is TRUE.
    353353  @param MCastFilter      A pointer to a list of new multicast receive filter HW
    354                           MAC addresses. This list will replace any existing 
    355                           multicast HW MAC address list. This field is optional 
     354                          MAC addresses. This list will replace any existing
     355                          multicast HW MAC address list. This field is optional
    356356                          if ResetMCastFilter is TRUE.
    357    
     357
    358358  @retval EFI_SUCCESS            The multicast receive filter list was updated.
    359359  @retval EFI_NOT_STARTED        The network interface has not been started.
     
    364364                                 * There are bits set in Disable that are not set
    365365                                   in Snp->Mode->ReceiveFilterMask
    366                                  * Multicast is being enabled (the 
    367                                    EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST bit is 
    368                                    set in Enable, it is not set in Disable, and 
     366                                 * Multicast is being enabled (the
     367                                   EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST bit is
     368                                   set in Enable, it is not set in Disable, and
    369369                                   ResetMCastFilter is FALSE) and MCastFilterCount
    370370                                   is zero
     
    378378                                 * The network interface has been started but has
    379379                                   not been initialized
    380                                  * An unexpected error was returned by the 
     380                                 * An unexpected error was returned by the
    381381                                   underlying network driver or device
    382382  @retval EFI_UNSUPPORTED        This function is not supported by the network
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/SnpDxe/Reset.c

    r48674 r58466  
    11/** @file
    22    Implementation of resetting a network adapter.
    3  
     3
    44Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.<BR>
    5 This program and the accompanying materials are licensed and made available under the 
    6 terms and conditions of the BSD License which accompanies this distribution. The 
    7 full text of the license may be found at 
    8 http://opensource.org/licenses/bsd-license.php 
     5This program and the accompanying materials are licensed and made available under the
     6terms and conditions of the BSD License which accompanies this distribution. The
     7full text of the license may be found at
     8http://opensource.org/licenses/bsd-license.php
    99
    1010THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     
    7171
    7272  This function resets a network adapter and reinitializes it with the parameters
    73   that were provided in the previous call to Initialize(). The transmit and 
     73  that were provided in the previous call to Initialize(). The transmit and
    7474  receive queues are emptied and all pending interrupts are cleared.
    75   Receive filters, the station address, the statistics, and the multicast-IP-to-HW 
    76   MAC addresses are not reset by this call. If the network interface was 
    77   successfully reset, then EFI_SUCCESS will be returned. If the driver has not 
     75  Receive filters, the station address, the statistics, and the multicast-IP-to-HW
     76  MAC addresses are not reset by this call. If the network interface was
     77  successfully reset, then EFI_SUCCESS will be returned. If the driver has not
    7878  been initialized, EFI_DEVICE_ERROR will be returned.
    7979
    8080  @param This                 A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance.
    81   @param ExtendedVerification Indicates that the driver may perform a more 
    82                               exhaustive verification operation of the device 
     81  @param ExtendedVerification Indicates that the driver may perform a more
     82                              exhaustive verification operation of the device
    8383                              during reset.
    8484
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/SnpDxe/Shutdown.c

    r48674 r58466  
    11/** @file
    22    Implementation of shuting down a network adapter.
    3  
     3
    44Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.<BR>
    5 This program and the accompanying materials are licensed 
    6 and made available under the terms and conditions of the BSD License which 
    7 accompanies this distribution. The full text of the license may be found at 
    8 http://opensource.org/licenses/bsd-license.php 
     5This program and the accompanying materials are licensed
     6and made available under the terms and conditions of the BSD License which
     7accompanies this distribution. The full text of the license may be found at
     8http://opensource.org/licenses/bsd-license.php
    99
    1010THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     
    7575
    7676/**
    77   Resets a network adapter and leaves it in a state that is safe for another 
    78   driver to initialize. 
    79  
     77  Resets a network adapter and leaves it in a state that is safe for another
     78  driver to initialize.
     79
    8080  This function releases the memory buffers assigned in the Initialize() call.
    8181  Pending transmits and receives are lost, and interrupts are cleared and disabled.
    82   After this call, only the Initialize() and Stop() calls may be used. If the 
     82  After this call, only the Initialize() and Stop() calls may be used. If the
    8383  network interface was successfully shutdown, then EFI_SUCCESS will be returned.
    8484  If the driver has not been initialized, EFI_DEVICE_ERROR will be returned.
     
    8888  @retval EFI_SUCCESS           The network interface was shutdown.
    8989  @retval EFI_NOT_STARTED       The network interface has not been started.
    90   @retval EFI_INVALID_PARAMETER This parameter was NULL or did not point to a valid 
     90  @retval EFI_INVALID_PARAMETER This parameter was NULL or did not point to a valid
    9191                                EFI_SIMPLE_NETWORK_PROTOCOL structure.
    9292  @retval EFI_DEVICE_ERROR      The command could not be sent to the network interface.
     
    129129    goto ON_EXIT;
    130130  }
    131  
     131
    132132  Status                          = PxeShutdown (Snp);
    133133
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/SnpDxe/Snp.c

    r58459 r58466  
    274274  EFI_PCI_IO_PROTOCOL                       *PciIo;
    275275  EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR         *BarDesc;
    276  
     276
    277277  DEBUG ((EFI_D_NET, "\nSnpNotifyNetworkInterfaceIdentifier()  "));
    278278
     
    402402  Snp->TxRxBufferSize     = 0;
    403403  Snp->TxRxBuffer         = NULL;
    404  
     404
    405405  if (Nii->Revision >= EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION) {
    406406        Snp->IfNum = Nii->IfNum;
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf

    r58459 r58466  
    22#  This module produces EFI SNP Protocol.
    33#
    4 #  This module produces Simple Network Protocol upon EFI Network Interface 
     4#  This module produces Simple Network Protocol upon EFI Network Interface
    55#  Identifier Protocol, to provide a packet level interface to a network adapter.
    66#
    77#  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
    8 #  This program and the accompanying materials are licensed 
    9 #  and made available under the terms and conditions of the BSD License which 
    10 #  accompanies this distribution. The full text of the license may be found at 
    11 #  http://opensource.org/licenses/bsd-license.php 
     8#  This program and the accompanying materials are licensed
     9#  and made available under the terms and conditions of the BSD License which
     10#  accompanies this distribution. The full text of the license may be found at
     11#  http://opensource.org/licenses/bsd-license.php
    1212#
    1313#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     
    3131#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC
    3232#
    33 #  DRIVER_BINDING                =  mSimpleNetworkDriverBinding                       
     33#  DRIVER_BINDING                =  mSimpleNetworkDriverBinding
    3434#  COMPONENT_NAME                =  gSimpleNetworkComponentName
    3535#  COMPONENT_NAME2               =  gSimpleNetworkComponentName2
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/SnpDxe/Start.c

    r48674 r58466  
    11/** @file
    22    Implementation of starting a network adapter.
    3  
     3
    44Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.<BR>
    5 This program and the accompanying materials are licensed 
    6 and made available under the terms and conditions of the BSD License which 
    7 accompanies this distribution. The full text of the license may be found at 
    8 http://opensource.org/licenses/bsd-license.php 
     5This program and the accompanying materials are licensed
     6and made available under the terms and conditions of the BSD License which
     7accompanies this distribution. The full text of the license may be found at
     8http://opensource.org/licenses/bsd-license.php
    99
    1010THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     
    2323  @retval EFI_SUCCESS            UNDI is started successfully.
    2424  @retval EFI_DEVICE_ERROR       UNDI could not be started.
    25  
     25
    2626**/
    2727EFI_STATUS
     
    101101/**
    102102  Change the state of a network interface from "stopped" to "started."
    103  
     103
    104104  This function starts a network interface. If the network interface successfully
    105105  starts, then EFI_SUCCESS will be returned.
     
    109109  @retval EFI_SUCCESS            The network interface was started.
    110110  @retval EFI_ALREADY_STARTED    The network interface is already in the started state.
    111   @retval EFI_INVALID_PARAMETER  This parameter was NULL or did not point to a valid 
     111  @retval EFI_INVALID_PARAMETER  This parameter was NULL or did not point to a valid
    112112                                 EFI_SIMPLE_NETWORK_PROTOCOL structure.
    113113  @retval EFI_DEVICE_ERROR       The command could not be sent to the network interface.
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/SnpDxe/Station_address.c

    r58459 r58466  
    11/** @file
    22    Implementation of reading the MAC address of a network adapter.
    3  
     3
    44Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
    5 This program and the accompanying materials are licensed 
    6 and made available under the terms and conditions of the BSD License which 
    7 accompanies this distribution. The full text of the license may be found at 
    8 http://opensource.org/licenses/bsd-license.php 
     5This program and the accompanying materials are licensed
     6and made available under the terms and conditions of the BSD License which
     7accompanies this distribution. The full text of the license may be found at
     8http://opensource.org/licenses/bsd-license.php
    99
    1010THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     
    1717
    1818/**
    19   Call UNDI to read the MAC address of the NIC and update the mode structure 
    20   with the address. 
     19  Call UNDI to read the MAC address of the NIC and update the mode structure
     20  with the address.
    2121
    2222  @param  Snp         Pointer to snp driver structure.
    23    
     23
    2424  @retval EFI_SUCCESS       The MAC address of the NIC is read successfully.
    2525  @retval EFI_DEVICE_ERROR  Failed to read the MAC address of the NIC.
     
    167167/**
    168168  Modifies or resets the current station address, if supported.
    169  
    170   This function modifies or resets the current station address of a network 
     169
     170  This function modifies or resets the current station address of a network
    171171  interface, if supported. If Reset is TRUE, then the current station address is
    172   set to the network interface's permanent address. If Reset is FALSE, and the 
    173   network interface allows its station address to be modified, then the current 
    174   station address is changed to the address specified by New. If the network 
    175   interface does not allow its station address to be modified, then 
     172  set to the network interface's permanent address. If Reset is FALSE, and the
     173  network interface allows its station address to be modified, then the current
     174  station address is changed to the address specified by New. If the network
     175  interface does not allow its station address to be modified, then
    176176  EFI_INVALID_PARAMETER will be returned. If the station address is successfully
    177177  updated on the network interface, EFI_SUCCESS will be returned. If the driver
     
    179179
    180180  @param This  A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance.
    181   @param Reset Flag used to reset the station address to the network interface's 
     181  @param Reset Flag used to reset the station address to the network interface's
    182182               permanent address.
    183183  @param New   New station address to be used for the network interface.
     
    185185
    186186  @retval EFI_SUCCESS           The network interface's station address was updated.
    187   @retval EFI_NOT_STARTED       The Simple Network Protocol interface has not been 
     187  @retval EFI_NOT_STARTED       The Simple Network Protocol interface has not been
    188188                                started by calling Start().
    189189  @retval EFI_INVALID_PARAMETER The New station address was not accepted by the NIC.
    190190  @retval EFI_INVALID_PARAMETER Reset is FALSE and New is NULL.
    191   @retval EFI_DEVICE_ERROR      The Simple Network Protocol interface has not 
     191  @retval EFI_DEVICE_ERROR      The Simple Network Protocol interface has not
    192192                                been initialized by calling Initialize().
    193   @retval EFI_DEVICE_ERROR      An error occurred attempting to set the new 
     193  @retval EFI_DEVICE_ERROR      An error occurred attempting to set the new
    194194                                station address.
    195   @retval EFI_UNSUPPORTED       The NIC does not support changing the network 
     195  @retval EFI_UNSUPPORTED       The NIC does not support changing the network
    196196                                interface's station address.
    197197
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/SnpDxe/Stop.c

    r48674 r58466  
    11/** @file
    22    Implementation of stopping a network interface.
    3  
     3
    44Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.<BR>
    5 This program and the accompanying materials are licensed 
    6 and made available under the terms and conditions of the BSD License which 
    7 accompanies this distribution. The full text of the license may be found at 
    8 http://opensource.org/licenses/bsd-license.php 
     5This program and the accompanying materials are licensed
     6and made available under the terms and conditions of the BSD License which
     7accompanies this distribution. The full text of the license may be found at
     8http://opensource.org/licenses/bsd-license.php
    99
    1010THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     
    2020
    2121  @param  Snp   Pointer to snp driver structure
    22    
     22
    2323  @retval EFI_SUCCESS            The network interface was stopped.
    2424  @retval EFI_DEVICE_ERROR       SNP is not initialized.
     
    6868/**
    6969  Changes the state of a network interface from "started" to "stopped."
    70  
     70
    7171  This function stops a network interface. This call is only valid if the network
    7272  interface is in the started state. If the network interface was successfully
    7373  stopped, then EFI_SUCCESS will be returned.
    74  
    75   @param  This                    A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL 
     74
     75  @param  This                    A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL
    7676                                  instance.
    77  
    78  
     77
     78
    7979  @retval EFI_SUCCESS             The network interface was stopped.
    8080  @retval EFI_NOT_STARTED         The network interface has not been started.
    81   @retval EFI_INVALID_PARAMETER   This parameter was NULL or did not point to a 
     81  @retval EFI_INVALID_PARAMETER   This parameter was NULL or did not point to a
    8282                                  valid EFI_SIMPLE_NETWORK_PROTOCOL structure.
    83   @retval EFI_DEVICE_ERROR        The command could not be sent to the network 
     83  @retval EFI_DEVICE_ERROR        The command could not be sent to the network
    8484                                  interface.
    85   @retval EFI_UNSUPPORTED         This function is not supported by the network 
     85  @retval EFI_UNSUPPORTED         This function is not supported by the network
    8686                                  interface.
    8787
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/SnpDxe/Transmit.c

    r48674 r58466  
    11/** @file
    22    Implementation of transmitting a packet.
    3  
     3
    44Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.<BR>
    5 This program and the accompanying materials are licensed 
    6 and made available under the terms and conditions of the BSD License which 
    7 accompanies this distribution. The full text of the license may be found at 
    8 http://opensource.org/licenses/bsd-license.php 
     5This program and the accompanying materials are licensed
     6and made available under the terms and conditions of the BSD License which
     7accompanies this distribution. The full text of the license may be found at
     8http://opensource.org/licenses/bsd-license.php
    99
    1010THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     
    217217/**
    218218  Places a packet in the transmit queue of a network interface.
    219  
     219
    220220  This function places the packet specified by Header and Buffer on the transmit
    221   queue. If HeaderSize is nonzero and HeaderSize is not equal to 
    222   This->Mode->MediaHeaderSize, then EFI_INVALID_PARAMETER will be returned. If 
     221  queue. If HeaderSize is nonzero and HeaderSize is not equal to
     222  This->Mode->MediaHeaderSize, then EFI_INVALID_PARAMETER will be returned. If
    223223  BufferSize is less than This->Mode->MediaHeaderSize, then EFI_BUFFER_TOO_SMALL
    224   will be returned. If Buffer is NULL, then EFI_INVALID_PARAMETER will be 
     224  will be returned. If Buffer is NULL, then EFI_INVALID_PARAMETER will be
    225225  returned. If HeaderSize is nonzero and DestAddr or Protocol is NULL, then
    226226  EFI_INVALID_PARAMETER will be returned. If the transmit engine of the network
    227   interface is busy, then EFI_NOT_READY will be returned. If this packet can be 
    228   accepted by the transmit engine of the network interface, the packet contents 
    229   specified by Buffer will be placed on the transmit queue of the network 
    230   interface, and EFI_SUCCESS will be returned. GetStatus() can be used to 
    231   determine when the packet has actually been transmitted. The contents of the 
    232   Buffer must not be modified until the packet has actually been transmitted. 
     227  interface is busy, then EFI_NOT_READY will be returned. If this packet can be
     228  accepted by the transmit engine of the network interface, the packet contents
     229  specified by Buffer will be placed on the transmit queue of the network
     230  interface, and EFI_SUCCESS will be returned. GetStatus() can be used to
     231  determine when the packet has actually been transmitted. The contents of the
     232  Buffer must not be modified until the packet has actually been transmitted.
    233233  The Transmit() function performs nonblocking I/O. A caller who wants to perform
    234   blocking I/O, should call Transmit(), and then GetStatus() until the 
     234  blocking I/O, should call Transmit(), and then GetStatus() until the
    235235  transmitted buffer shows up in the recycled transmit buffer.
    236236  If the driver has not been initialized, EFI_DEVICE_ERROR will be returned.
    237237
    238238  @param This       A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance.
    239   @param HeaderSize The size, in bytes, of the media header to be filled in by the 
     239  @param HeaderSize The size, in bytes, of the media header to be filled in by the
    240240                    Transmit() function. If HeaderSize is nonzero, then it must
    241241                    be equal to This->Mode->MediaHeaderSize and the DestAddr and
     
    243243  @param BufferSize The size, in bytes, of the entire packet (media header and
    244244                    data) to be transmitted through the network interface.
    245   @param Buffer     A pointer to the packet (media header followed by data) to be 
    246                     transmitted. This parameter cannot be NULL. If HeaderSize is 
     245  @param Buffer     A pointer to the packet (media header followed by data) to be
     246                    transmitted. This parameter cannot be NULL. If HeaderSize is
    247247                    zero, then the media header in Buffer must already be filled
    248                     in by the caller. If HeaderSize is nonzero, then the media 
     248                    in by the caller. If HeaderSize is nonzero, then the media
    249249                    header will be filled in by the Transmit() function.
    250   @param SrcAddr    The source HW MAC address. If HeaderSize is zero, then this 
    251                     parameter is ignored. If HeaderSize is nonzero and SrcAddr 
    252                     is NULL, then This->Mode->CurrentAddress is used for the 
     250  @param SrcAddr    The source HW MAC address. If HeaderSize is zero, then this
     251                    parameter is ignored. If HeaderSize is nonzero and SrcAddr
     252                    is NULL, then This->Mode->CurrentAddress is used for the
    253253                    source HW MAC address.
    254   @param DestAddr   The destination HW MAC address. If HeaderSize is zero, then 
     254  @param DestAddr   The destination HW MAC address. If HeaderSize is zero, then
    255255                    this parameter is ignored.
    256   @param Protocol   The type of header to build. If HeaderSize is zero, then this 
    257                     parameter is ignored. See RFC 1700, section "Ether Types," 
     256  @param Protocol   The type of header to build. If HeaderSize is zero, then this
     257                    parameter is ignored. See RFC 1700, section "Ether Types,"
    258258                    for examples.
    259259
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/SnpDxe/WaitForPacket.c

    r48674 r58466  
    33
    44Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>
    5 This program and the accompanying materials are licensed 
    6 and made available under the terms and conditions of the BSD License which 
    7 accompanies this distribution. The full text of the license may be found at 
    8 http://opensource.org/licenses/bsd-license.php 
     5This program and the accompanying materials are licensed
     6and made available under the terms and conditions of the BSD License which
     7accompanies this distribution. The full text of the license may be found at
     8http://opensource.org/licenses/bsd-license.php
    99
    1010THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/ComponentName.c

    r58459 r58466  
    235235  @param  Tcp4[in]                   A pointer to the EFI_TCP4_PROTOCOL.
    236236
    237  
     237
    238238  @retval EFI_SUCCESS                Update the ControllerNameTable of this instance successfully.
    239239  @retval EFI_INVALID_PARAMETER      The input parameter is invalid.
    240  
     240
    241241**/
    242242EFI_STATUS
     
    280280    gTcpControllerNameTable = NULL;
    281281  }
    282  
     282
    283283  Status = AddUnicodeString2 (
    284284             "eng",
     
    291291    return Status;
    292292  }
    293  
     293
    294294  return AddUnicodeString2 (
    295295           "en",
     
    388388    return EFI_UNSUPPORTED;
    389389  }
    390  
    391   // 
    392   // Make sure this driver produced ChildHandle 
    393   // 
     390
     391  //
     392  // Make sure this driver produced ChildHandle
     393  //
    394394  Status = EfiTestChildHandle (
    395395             ControllerHandle,
     
    401401  }
    402402
    403   // 
     403  //
    404404  // Retrieve an instance of a produced protocol from ChildHandle
    405   // 
     405  //
    406406  Status = gBS->OpenProtocol (
    407407                  ChildHandle,
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/SockImpl.c

    r58459 r58466  
    3434  IN     UINT32         BufLen
    3535  );
    36  
     36
    3737/**
    3838  Process the send token.
     
    5050
    5151  @param Event             The Event this notify function registered to, ignored.
    52  
     52
    5353**/
    5454VOID
     
    323323  @param  Sock                  Pointer to the socket.
    324324  @param  PendingTokenList      Pointer to the token list to be flushed.
    325  
     325
    326326**/
    327327VOID
     
    353353
    354354/**
    355   Wake up the connection token while the connection is successfully established, 
     355  Wake up the connection token while the connection is successfully established,
    356356  then try to process any pending send token.
    357357
     
    934934
    935935/**
    936   Called by the low layer protocol to indicate the socket a connection is 
    937   established. 
    938  
    939   This function just changes the socket's state to SO_CONNECTED 
     936  Called by the low layer protocol to indicate the socket a connection is
     937  established.
     938
     939  This function just changes the socket's state to SO_CONNECTED
    940940  and signals the token used for connection establishment.
    941941
     
    965965/**
    966966  Called by the low layer protocol to indicate the connection is closed.
    967  
    968   This function flushes the socket, sets the state to SO_CLOSED and signals 
     967
     968  This function flushes the socket, sets the state to SO_CLOSED and signals
    969969  the close token.
    970970
    971971  @param  Sock                  Pointer to the socket associated with the closed
    972972                                connection.
    973                                
     973
    974974**/
    975975VOID
     
    995995/**
    996996  Called by low layer protocol to indicate that some data is sent or processed.
    997    
    998   This function trims the sent data in the socket send buffer, signals the data 
     997
     998  This function trims the sent data in the socket send buffer, signals the data
    999999  token if proper.
    10001000
     
    10851085/**
    10861086  Called by the low layer protocol to deliver received data to socket layer.
    1087  
    1088   This function will append the data to the socket receive buffer, set ther 
     1087
     1088  This function will append the data to the socket receive buffer, set ther
    10891089  urgent data length and then check if any receive token can be signaled.
    10901090
     
    11911191
    11921192/**
    1193   Called by the low layer protocol to indicate that there will be no more data 
     1193  Called by the low layer protocol to indicate that there will be no more data
    11941194  from the communication peer.
    1195  
    1196   This function set the socket's state to SO_NO_MORE_DATA and signal all queued 
     1195
     1196  This function set the socket's state to SO_NO_MORE_DATA and signal all queued
    11971197  IO tokens with the error status EFI_CONNECTION_FIN.
    11981198
     
    12581258                                one.
    12591259
    1260   @return Pointer to the buffer block next to SockEntry. NULL if SockEntry is 
     1260  @return Pointer to the buffer block next to SockEntry. NULL if SockEntry is
    12611261          the tail or head entry.
    12621262
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/SockImpl.h

    r48674 r58466  
    2020/**
    2121  Signal a event with the given status.
    22  
     22
    2323  @param Token        The token's event is to be signaled.
    2424  @param TokenStatus  The status to be sent with the event.
    25  
     25
    2626**/
    2727#define SIGNAL_TOKEN(Token, TokenStatus) \
     
    3636
    3737  @param Event  The Event this notify function registered to, ignored.
    38  
     38
    3939**/
    4040VOID
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/SockInterface.c

    r58459 r58466  
    2323  @param  Event                The event to be checked.
    2424
    25   @retval  TRUE                The specific Event exists in the List. 
     25  @retval  TRUE                The specific Event exists in the List.
    2626  @retval  FALSE               The specific Event is not in the List.
    2727
     
    5959  @param  Event                The event to be checked.
    6060
    61   @retval  TRUE                The Event exists in related socket's lists. 
     61  @retval  TRUE                The Event exists in related socket's lists.
    6262  @retval  FALSE               The Event is not in related socket's lists.
    6363
     
    200200
    201201  @param  SockInitData         Inital data to setting the socket.
    202  
     202
    203203  @return Pointer to the newly created socket. If NULL, error condition occured.
    204204
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/Socket.h

    r58459 r58466  
    8686/**
    8787  Set socket SO_NO_MORE_DATA flag.
    88  
     88
    8989  @param Sock               Pointer to the socket
    90  
     90
    9191**/
    9292#define SOCK_NO_MORE_DATA(Sock)     ((Sock)->Flag |= SO_NO_MORE_DATA)
     
    9494/**
    9595  Check whether the socket is unconfigured.
    96  
    97   @param  Sock               Pointer to the socket
    98  
     96
     97  @param  Sock               Pointer to the socket
     98
    9999  @retval True               The socket is unconfigued
    100100  @retval False              The socket is not unconfigued
    101  
     101
    102102**/
    103103#define SOCK_IS_UNCONFIGURED(Sock)  ((Sock)->ConfigureState == SO_UNCONFIGURED)
     
    105105/**
    106106  Check whether the socket is configured.
    107  
    108   @param  Sock               Pointer to the socket
    109  
     107
     108  @param  Sock               Pointer to the socket
     109
    110110  @retval True               The socket is configued
    111111  @retval False              The socket is not configued
    112  
     112
    113113**/
    114114#define SOCK_IS_CONFIGURED(Sock) \
     
    118118/**
    119119  Check whether the socket is configured to active mode.
    120  
    121   @param  Sock               Pointer to the socket
    122  
     120
     121  @param  Sock               Pointer to the socket
     122
    123123  @retval True               The socket is configued to active mode
    124124  @retval False              The socket is not configued to active mode
    125  
     125
    126126**/
    127127#define SOCK_IS_CONFIGURED_ACTIVE(Sock) \
     
    130130/**
    131131  Check whether the socket is configured to passive mode.
    132  
    133   @param  Sock               Pointer to the socket
    134  
     132
     133  @param  Sock               Pointer to the socket
     134
    135135  @retval True               The socket is configued to passive mode
    136136  @retval False              The socket is not configued to passive mode
    137  
     137
    138138**/
    139139#define SOCK_IS_CONNECTED_PASSIVE(Sock) \
     
    142142/**
    143143  Check whether the socket is mapped.
    144  
    145   @param  Sock               Pointer to the socket
    146  
     144
     145  @param  Sock               Pointer to the socket
     146
    147147  @retval True               The socket is no mapping
    148148  @retval False              The socket is mapped
    149  
     149
    150150**/
    151151#define SOCK_IS_NO_MAPPING(Sock) \
     
    154154/**
    155155  Check whether the socket is closed.
    156  
    157   @param  Sock               Pointer to the socket
    158  
     156
     157  @param  Sock               Pointer to the socket
     158
    159159  @retval True               The socket is closed
    160160  @retval False              The socket is not closed
    161  
     161
    162162**/
    163163#define SOCK_IS_CLOSED(Sock)          ((Sock)->State == SO_CLOSED)
     
    165165/**
    166166  Check whether the socket is listening.
    167  
    168   @param  Sock               Pointer to the socket
    169  
     167
     168  @param  Sock               Pointer to the socket
     169
    170170  @retval True               The socket is listening
    171171  @retval False              The socket is not listening
    172  
     172
    173173**/
    174174#define SOCK_IS_LISTENING(Sock)       ((Sock)->State == SO_LISTENING)
     
    176176/**
    177177  Check whether the socket is connecting.
    178  
    179   @param  Sock               Pointer to the socket
    180  
     178
     179  @param  Sock               Pointer to the socket
     180
    181181  @retval True               The socket is connecting
    182182  @retval False              The socket is not connecting
    183  
     183
    184184**/
    185185#define SOCK_IS_CONNECTING(Sock)      ((Sock)->State == SO_CONNECTING)
     
    187187/**
    188188  Check whether the socket has connected.
    189  
    190   @param  Sock               Pointer to the socket
    191  
     189
     190  @param  Sock               Pointer to the socket
     191
    192192  @retval True               The socket has connected
    193193  @retval False              The socket has not connected
    194  
     194
    195195**/
    196196#define SOCK_IS_CONNECTED(Sock)       ((Sock)->State == SO_CONNECTED)
     
    198198/**
    199199  Check whether the socket is disconnecting.
    200  
    201   @param  Sock               Pointer to the socket
    202  
     200
     201  @param  Sock               Pointer to the socket
     202
    203203  @retval True               The socket is disconnecting
    204204  @retval False              The socket is not disconnecting
    205  
     205
    206206**/
    207207#define SOCK_IS_DISCONNECTING(Sock)   ((Sock)->State == SO_DISCONNECTING)
     
    209209/**
    210210  Check whether the socket is no more data.
    211  
    212   @param  Sock               Pointer to the socket
    213  
     211
     212  @param  Sock               Pointer to the socket
     213
    214214  @retval True               The socket is no more data
    215215  @retval False              The socket still has data
    216  
     216
    217217**/
    218218#define SOCK_IS_NO_MORE_DATA(Sock)    (0 != ((Sock)->Flag & SO_NO_MORE_DATA))
     
    220220/**
    221221  Set the size of the receive buffer.
    222  
     222
    223223  @param  Sock               Pointer to the socket
    224224  @param  Size               The size to set
     
    229229/**
    230230  Get the size of the receive buffer.
    231  
    232   @param  Sock               Pointer to the socket
    233  
     231
     232  @param  Sock               Pointer to the socket
     233
    234234  @return The receive buffer size
    235235
     
    239239/**
    240240  Get the size of the receive data.
    241  
    242   @param  Sock               Pointer to the socket
    243  
     241
     242  @param  Sock               Pointer to the socket
     243
    244244  @return The received data size
    245245
     
    249249/**
    250250  Set the size of the send buffer.
    251  
     251
    252252  @param  Sock               Pointer to the socket
    253253  @param  Size               The size to set
     
    258258/**
    259259  Get the size of the send buffer.
    260  
    261   @param  Sock               Pointer to the socket
    262  
     260
     261  @param  Sock               Pointer to the socket
     262
    263263  @return The send buffer size
    264264
     
    268268/**
    269269  Get the size of the send data.
    270  
    271   @param  Sock               Pointer to the socket
    272  
     270
     271  @param  Sock               Pointer to the socket
     272
    273273  @return The send data size
    274274
     
    278278/**
    279279  Set the backlog value of the socket.
    280  
     280
    281281  @param  Sock               Pointer to the socket
    282282  @param  Value              The value to set
     
    287287/**
    288288  Get the backlog value of the socket.
    289  
    290   @param  Sock               Pointer to the socket
    291  
     289
     290  @param  Sock               Pointer to the socket
     291
    292292  @return The backlog value
    293293
     
    297297/**
    298298  Set the socket with error state.
    299  
     299
    300300  @param  Sock               Pointer to the socket
    301301  @param  Error              The error state
     
    343343
    344344///
    345 ///  The request issued from socket layer to protocol layer. 
     345///  The request issued from socket layer to protocol layer.
    346346///
    347347#define SOCK_ATTACH     0    ///< Attach current socket to a new PCB
     
    380380/**
    381381  The handler of protocol for request from socket.
    382  
     382
    383383  @param Socket              The socket issuing the request to protocol
    384384  @param Request             The request issued by socket
    385385  @param RequestData         The request related data
    386  
     386
    387387  @retval EFI_SUCCESS        The socket request is completed successfully.
    388388  @retval other              The error status returned by the corresponding TCP
    389389                             layer function.
    390                              
     390
    391391**/
    392392typedef
     
    397397  IN VOID         *RequestData
    398398  );
    399  
    400  
     399
     400
    401401//
    402402// Socket provided oprerations for low layer protocol
     
    421421
    422422/**
    423   Called by the low layer protocol to indicate the socket a connection is 
    424   established. 
    425  
    426   This function just changes the socket's state to SO_CONNECTED 
     423  Called by the low layer protocol to indicate the socket a connection is
     424  established.
     425
     426  This function just changes the socket's state to SO_CONNECTED
    427427  and signals the token used for connection establishment.
    428428
    429429  @param  Sock                  Pointer to the socket associated with the
    430430                                established connection.
    431                                
     431
    432432**/
    433433VOID
     
    438438/**
    439439  Called by the low layer protocol to indicate the connection is closed.
    440  
    441   This function flushes the socket, sets the state to SO_CLOSED and signals 
     440
     441  This function flushes the socket, sets the state to SO_CLOSED and signals
    442442  the close token.
    443443
    444444  @param  Sock                  Pointer to the socket associated with the closed
    445445                                connection.
    446                                
     446
    447447**/
    448448VOID
     
    453453/**
    454454  Called by low layer protocol to indicate that some data is sent or processed.
    455    
    456   This function trims the sent data in the socket send buffer, signals the data 
     455
     456  This function trims the sent data in the socket send buffer, signals the data
    457457  token if proper.
    458458
     
    491491  Called by the low layer protocol to indicate that there
    492492  will be no more data from the communication peer.
    493  
     493
    494494  This function set the socket's state to SO_NO_MORE_DATA and
    495495  signal all queued IO tokens with the error status EFI_CONNECTION_FIN.
     
    505505/**
    506506  Called by the low layer protocol to deliver received data to socket layer.
    507  
    508   This function will append the data to the socket receive buffer, set ther 
     507
     508  This function will append the data to the socket receive buffer, set ther
    509509  urgent data length and then check if any receive token can be signaled.
    510510
     
    574574  IN VOID    *Context
    575575  );
    576  
    577 ///
    578 /// Proto type of the destroy callback 
     576
     577///
     578/// Proto type of the destroy callback
    579579///
    580580typedef
     
    619619///
    620620///  The union type of TCP and UDP protocol.
    621 /// 
     621///
    622622typedef union _NET_PROTOCOL {
    623623  EFI_TCP4_PROTOCOL TcpProtocol;   ///< Tcp protocol
     
    638638  EFI_DEVICE_PATH_PROTOCOL  *ParentDevicePath;
    639639  EFI_DEVICE_PATH_PROTOCOL  *DevicePath;
    640   LIST_ENTRY                Link; 
     640  LIST_ENTRY                Link;
    641641  UINT8                 ConfigureState;
    642642  SOCK_TYPE             Type;
     
    656656  SOCKET          *Parent;        ///< listening parent that accept the connection
    657657  LIST_ENTRY      ConnectionList; ///< the connections maintained by this socket
    658  
     658
    659659  //
    660660  // The queue to buffer application's asynchronous token
     
    715715
    716716  @param  SockInitData         Inital data to setting the socket.
    717  
     717
    718718  @return Pointer to the newly created socket. If NULL, error condition occured.
    719719
     
    974974                                one.
    975975
    976   @return Pointer to the buffer block next to SockEntry. NULL if SockEntry is 
     976  @return Pointer to the buffer block next to SockEntry. NULL if SockEntry is
    977977          the tail or head entry.
    978978
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c

    r58459 r58466  
    342342         Sk->SockHandle
    343343         );
    344  
     344
    345345  IpIoRemoveIp (ProtoData->TcpService->IpIo, Tcb->IpInfo);
    346346
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.c

    r58459 r58466  
    117117/**
    118118  Stop and destroy the heartbeat timer for TCP driver.
    119  
     119
    120120**/
    121121VOID
     
    139139/**
    140140  Callback function which provided by user to remove one node in NetDestroyLinkList process.
    141  
     141
    142142  @param[in]    Entry           The entry to be removed.
    143143  @param[in]    Context         Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
     
    222222/**
    223223  Tests to see if this driver supports a given controller.
    224  
    225   If a child device is provided, it further tests to see if this driver supports 
     224
     225  If a child device is provided, it further tests to see if this driver supports
    226226  creating a handle for the specified child device.
    227227
    228228  @param  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
    229   @param  ControllerHandle     The handle of the controller to test. This handle 
    230                                must support a protocol interface that supplies 
     229  @param  ControllerHandle     The handle of the controller to test. This handle
     230                               must support a protocol interface that supplies
    231231                               an I/O abstraction to the driver.
    232   @param  RemainingDevicePath  A pointer to the remaining portion of a device path. 
     232  @param  RemainingDevicePath  A pointer to the remaining portion of a device path.
    233233                               This parameter is ignored by device drivers, and is optional for bus drivers.
    234234
    235235
    236236  @retval EFI_SUCCESS          The device specified by ControllerHandle and
    237                                RemainingDevicePath is supported by the driver 
     237                               RemainingDevicePath is supported by the driver
    238238                               specified by This.
    239239  @retval EFI_ALREADY_STARTED  The device specified by ControllerHandle and
    240                                RemainingDevicePath is already being managed by 
     240                               RemainingDevicePath is already being managed by
    241241                               the driver specified by This.
    242242  @retval EFI_ACCESS_DENIED    The device specified by ControllerHandle and
    243                                RemainingDevicePath is already being managed by a 
    244                                different driver or an application that requires 
     243                               RemainingDevicePath is already being managed by a
     244                               different driver or an application that requires
    245245                               exclusive access.
    246246  @retval EFI_UNSUPPORTED      The device specified by ControllerHandle and
    247                                RemainingDevicePath is not supported by the driver 
     247                               RemainingDevicePath is not supported by the driver
    248248                               specified by This.
    249                                
     249
    250250**/
    251251EFI_STATUS
     
    291291
    292292/**
    293   Start this driver on ControllerHandle. 
    294  
    295   The Start() function is designed to be invoked from the EFI boot service 
    296   ConnectController(). As a result, much of the error checking on the parameters 
    297   to Start() has been moved into this common boot service. It is legal to call 
    298   Start() from other locations, but the following calling restrictions must be 
     293  Start this driver on ControllerHandle.
     294
     295  The Start() function is designed to be invoked from the EFI boot service
     296  ConnectController(). As a result, much of the error checking on the parameters
     297  to Start() has been moved into this common boot service. It is legal to call
     298  Start() from other locations, but the following calling restrictions must be
    299299  followed or the system behavior will not be deterministic.
    300300  1. ControllerHandle must be a valid EFI_HANDLE.
    301   2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally 
     301  2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally
    302302     aligned EFI_DEVICE_PATH_PROTOCOL.
    303   3. Prior to calling Start(), the Supported() function for the driver specified 
    304      by This must have been called with the same calling parameters, and Supported() 
     303  3. Prior to calling Start(), the Supported() function for the driver specified
     304     by This must have been called with the same calling parameters, and Supported()
    305305     must have returned EFI_SUCCESS.
    306306
    307307  @param  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
    308   @param  ControllerHandle     The handle of the controller to start. This handle 
    309                                must support a protocol interface that supplies 
     308  @param  ControllerHandle     The handle of the controller to start. This handle
     309                               must support a protocol interface that supplies
    310310                               an I/O abstraction to the driver.
    311   @param  RemainingDevicePath  A pointer to the remaining portion of a device path. 
    312                                This parameter is ignored by device drivers, and is 
     311  @param  RemainingDevicePath  A pointer to the remaining portion of a device path.
     312                               This parameter is ignored by device drivers, and is
    313313                               optional for bus drivers.
    314314
    315315  @retval EFI_SUCCESS          The device was started.
    316316  @retval EFI_ALREADY_STARTED  The device could not be started due to a device error.
    317   @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack 
     317  @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack
    318318                               of resources.
    319319
     
    436436/**
    437437  Stop this driver on ControllerHandle.
    438  
    439   The Stop() function is designed to be invoked from the EFI boot service 
    440   DisconnectController(). As a result, much of the error checking on the parameters 
    441   to Stop() has been moved into this common boot service. It is legal to call Stop() 
    442   from other locations, but the following calling restrictions must be followed 
     438
     439  The Stop() function is designed to be invoked from the EFI boot service
     440  DisconnectController(). As a result, much of the error checking on the parameters
     441  to Stop() has been moved into this common boot service. It is legal to call Stop()
     442  from other locations, but the following calling restrictions must be followed
    443443  or the system behavior will not be deterministic.
    444   1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call 
     444  1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call
    445445     to this same driver's Start() function.
    446446  2. The first NumberOfChildren handles of ChildHandleBuffer must all be a valid
    447      EFI_HANDLE. In addition, all of these handles must have been created in this 
    448      driver's Start() function, and the Start() function must have called OpenProtocol() 
     447     EFI_HANDLE. In addition, all of these handles must have been created in this
     448     driver's Start() function, and the Start() function must have called OpenProtocol()
    449449     on ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
    450  
     450
    451451  @param  This              A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
    452   @param  ControllerHandle  A handle to the device being stopped. The handle must 
    453                             support a bus specific I/O protocol for the driver 
     452  @param  ControllerHandle  A handle to the device being stopped. The handle must
     453                            support a bus specific I/O protocol for the driver
    454454                            to use to stop the device.
    455455  @param  NumberOfChildren  The number of child device handles in ChildHandleBuffer.
    456   @param  ChildHandleBuffer An array of child handles to be freed. May be NULL if 
     456  @param  ChildHandleBuffer An array of child handles to be freed. May be NULL if
    457457                            NumberOfChildren is 0.
    458458
     
    506506
    507507  if (NumberOfChildren != 0) {
    508     List = &TcpServiceData->SocketList; 
     508    List = &TcpServiceData->SocketList;
    509509    Context.ServiceBinding = ServiceBinding;
    510510    Context.NumberOfChildren = NumberOfChildren;
     
    542542      gTcpControllerNameTable = NULL;
    543543    }
    544    
     544
    545545    //
    546546    // Release the TCP service data
     
    555555
    556556/**
    557   Open Ip4 and device path protocols for a created socket, and insert it in 
     557  Open Ip4 and device path protocols for a created socket, and insert it in
    558558  socket list.
    559  
     559
    560560  @param  This                Pointer to the socket just created
    561561  @param  Context             Context of the socket
    562  
     562
    563563  @retval EFI_SUCCESS         This protocol is installed successfully.
    564564  @retval other               Some error occured.
    565  
     565
    566566**/
    567567EFI_STATUS
     
    621621
    622622/**
    623   Close Ip4 and device path protocols for a socket, and remove it from socket list. 
    624    
     623  Close Ip4 and device path protocols for a socket, and remove it from socket list.
     624
    625625  @param  This                Pointer to the socket to be removed
    626626  @param  Context             Context of the socket
    627  
     627
    628628**/
    629629VOID
     
    655655/**
    656656  Creates a child handle and installs a protocol.
    657  
    658   The CreateChild() function installs a protocol on ChildHandle. If ChildHandle 
    659   is a pointer to NULL, then a new handle is created and returned in ChildHandle. 
    660   If ChildHandle is not a pointer to NULL, then the protocol installs on the existing 
     657
     658  The CreateChild() function installs a protocol on ChildHandle. If ChildHandle
     659  is a pointer to NULL, then a new handle is created and returned in ChildHandle.
     660  If ChildHandle is not a pointer to NULL, then the protocol installs on the existing
    661661  ChildHandle.
    662662
    663663  @param  This        Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
    664   @param  ChildHandle Pointer to the handle of the child to create. If it is NULL, then 
    665                       a new handle is created. If it is a pointer to an existing UEFI 
     664  @param  ChildHandle Pointer to the handle of the child to create. If it is NULL, then
     665                      a new handle is created. If it is a pointer to an existing UEFI
    666666                      handle, then the protocol is added to the existing UEFI handle.
    667667
     
    723723/**
    724724  Destroys a child handle with a protocol installed on it.
    725  
    726   The DestroyChild() function does the opposite of CreateChild(). It removes a protocol 
    727   that was installed by CreateChild() from ChildHandle. If the removed protocol is the 
     725
     726  The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
     727  that was installed by CreateChild() from ChildHandle. If the removed protocol is the
    728728  last protocol on ChildHandle, then ChildHandle is destroyed.
    729729
     
    732732
    733733  @retval EFI_SUCCES            The protocol was removed from ChildHandle.
    734   @retval EFI_UNSUPPORTED       ChildHandle does not support the protocol that is 
     734  @retval EFI_UNSUPPORTED       ChildHandle does not support the protocol that is
    735735                                being removed.
    736736  @retval EFI_INVALID_PARAMETER Child handle is NULL.
     
    738738                                because its services are being used.
    739739  @retval other                 The child handle was not destroyed.
    740  
     740
    741741**/
    742742EFI_STATUS
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.h

    r58459 r58466  
    3131  TCP4_DRIVER_SIGNATURE \
    3232  )
    33  
     33
    3434///
    3535/// TCP heartbeat tick timer.
     
    149149/**
    150150  Tests to see if this driver supports a given controller.
    151  
    152   If a child device is provided, it further tests to see if this driver supports 
     151
     152  If a child device is provided, it further tests to see if this driver supports
    153153  creating a handle for the specified child device.
    154154
    155155  @param  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
    156   @param  ControllerHandle     The handle of the controller to test. This handle 
    157                                must support a protocol interface that supplies 
     156  @param  ControllerHandle     The handle of the controller to test. This handle
     157                               must support a protocol interface that supplies
    158158                               an I/O abstraction to the driver.
    159   @param  RemainingDevicePath  A pointer to the remaining portion of a device path. 
     159  @param  RemainingDevicePath  A pointer to the remaining portion of a device path.
    160160                               This parameter is ignored by device drivers, and is optional for bus drivers.
    161161
    162162
    163163  @retval EFI_SUCCESS          The device specified by ControllerHandle and
    164                                RemainingDevicePath is supported by the driver 
     164                               RemainingDevicePath is supported by the driver
    165165                               specified by This.
    166166  @retval EFI_ALREADY_STARTED  The device specified by ControllerHandle and
    167                                RemainingDevicePath is already being managed by 
     167                               RemainingDevicePath is already being managed by
    168168                               the driver specified by This.
    169169  @retval EFI_ACCESS_DENIED    The device specified by ControllerHandle and
    170                                RemainingDevicePath is already being managed by a 
    171                                different driver or an application that requires 
     170                               RemainingDevicePath is already being managed by a
     171                               different driver or an application that requires
    172172                               exclusive access.
    173173  @retval EFI_UNSUPPORTED      The device specified by ControllerHandle and
    174                                RemainingDevicePath is not supported by the driver 
     174                               RemainingDevicePath is not supported by the driver
    175175                               specified by This.
    176                                
     176
    177177**/
    178178EFI_STATUS
     
    185185
    186186/**
    187   Start this driver on ControllerHandle. 
    188  
    189   The Start() function is designed to be invoked from the EFI boot service 
    190   ConnectController(). As a result, much of the error checking on the parameters 
    191   to Start() has been moved into this common boot service. It is legal to call 
    192   Start() from other locations, but the following calling restrictions must be 
     187  Start this driver on ControllerHandle.
     188
     189  The Start() function is designed to be invoked from the EFI boot service
     190  ConnectController(). As a result, much of the error checking on the parameters
     191  to Start() has been moved into this common boot service. It is legal to call
     192  Start() from other locations, but the following calling restrictions must be
    193193  followed or the system behavior will not be deterministic.
    194194  1. ControllerHandle must be a valid EFI_HANDLE.
    195   2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally 
     195  2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally
    196196     aligned EFI_DEVICE_PATH_PROTOCOL.
    197   3. Prior to calling Start(), the Supported() function for the driver specified 
    198      by This must have been called with the same calling parameters, and Supported() 
     197  3. Prior to calling Start(), the Supported() function for the driver specified
     198     by This must have been called with the same calling parameters, and Supported()
    199199     must have returned EFI_SUCCESS.
    200200
    201201  @param  This                 A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
    202   @param  ControllerHandle     The handle of the controller to start. This handle 
    203                                must support a protocol interface that supplies 
     202  @param  ControllerHandle     The handle of the controller to start. This handle
     203                               must support a protocol interface that supplies
    204204                               an I/O abstraction to the driver.
    205   @param  RemainingDevicePath  A pointer to the remaining portion of a device path. 
    206                                This parameter is ignored by device drivers, and is 
     205  @param  RemainingDevicePath  A pointer to the remaining portion of a device path.
     206                               This parameter is ignored by device drivers, and is
    207207                               optional for bus drivers.
    208208
    209209  @retval EFI_SUCCESS          The device was started.
    210210  @retval EFI_ALREADY_STARTED  The device could not be started due to a device error.
    211   @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack 
     211  @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack
    212212                               of resources.
    213213
     
    223223/**
    224224  Stop this driver on ControllerHandle.
    225  
    226   The Stop() function is designed to be invoked from the EFI boot service 
    227   DisconnectController(). As a result, much of the error checking on the parameters 
    228   to Stop() has been moved into this common boot service. It is legal to call Stop() 
    229   from other locations, but the following calling restrictions must be followed 
     225
     226  The Stop() function is designed to be invoked from the EFI boot service
     227  DisconnectController(). As a result, much of the error checking on the parameters
     228  to Stop() has been moved into this common boot service. It is legal to call Stop()
     229  from other locations, but the following calling restrictions must be followed
    230230  or the system behavior will not be deterministic.
    231   1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call 
     231  1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call
    232232     to this same driver's Start() function.
    233233  2. The first NumberOfChildren handles of ChildHandleBuffer must all be a valid
    234      EFI_HANDLE. In addition, all of these handles must have been created in this 
    235      driver's Start() function, and the Start() function must have called OpenProtocol() 
     234     EFI_HANDLE. In addition, all of these handles must have been created in this
     235     driver's Start() function, and the Start() function must have called OpenProtocol()
    236236     on ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
    237  
     237
    238238  @param  This              A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
    239   @param  ControllerHandle  A handle to the device being stopped. The handle must 
    240                             support a bus specific I/O protocol for the driver 
     239  @param  ControllerHandle  A handle to the device being stopped. The handle must
     240                            support a bus specific I/O protocol for the driver
    241241                            to use to stop the device.
    242242  @param  NumberOfChildren  The number of child device handles in ChildHandleBuffer.
    243   @param  ChildHandleBuffer An array of child handles to be freed. May be NULL if 
     243  @param  ChildHandleBuffer An array of child handles to be freed. May be NULL if
    244244                            NumberOfChildren is 0.
    245245
     
    258258
    259259/**
    260   Open Ip4 and device path protocols for a created socket, and insert it in 
     260  Open Ip4 and device path protocols for a created socket, and insert it in
    261261  socket list.
    262  
     262
    263263  @param  This                Pointer to the socket just created
    264264  @param  Context             Context of the socket
    265  
     265
    266266  @retval EFI_SUCCESS         This protocol is installed successfully.
    267267  @retval other               Some error occured.
    268  
     268
    269269**/
    270270EFI_STATUS
     
    275275
    276276/**
    277   Close Ip4 and device path protocols for a socket, and remove it from socket list. 
    278    
     277  Close Ip4 and device path protocols for a socket, and remove it from socket list.
     278
    279279  @param  This                Pointer to the socket to be removed
    280280  @param  Context             Context of the socket
    281  
     281
    282282**/
    283283VOID
     
    289289/**
    290290  Creates a child handle and installs a protocol.
    291  
    292   The CreateChild() function installs a protocol on ChildHandle. If ChildHandle 
    293   is a pointer to NULL, then a new handle is created and returned in ChildHandle. 
    294   If ChildHandle is not a pointer to NULL, then the protocol installs on the existing 
     291
     292  The CreateChild() function installs a protocol on ChildHandle. If ChildHandle
     293  is a pointer to NULL, then a new handle is created and returned in ChildHandle.
     294  If ChildHandle is not a pointer to NULL, then the protocol installs on the existing
    295295  ChildHandle.
    296296
    297297  @param  This        Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
    298   @param  ChildHandle Pointer to the handle of the child to create. If it is NULL, then 
    299                       a new handle is created. If it is a pointer to an existing UEFI 
     298  @param  ChildHandle Pointer to the handle of the child to create. If it is NULL, then
     299                      a new handle is created. If it is a pointer to an existing UEFI
    300300                      handle, then the protocol is added to the existing UEFI handle.
    301301
     
    316316/**
    317317  Destroys a child handle with a protocol installed on it.
    318  
    319   The DestroyChild() function does the opposite of CreateChild(). It removes a protocol 
    320   that was installed by CreateChild() from ChildHandle. If the removed protocol is the 
     318
     319  The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
     320  that was installed by CreateChild() from ChildHandle. If the removed protocol is the
    321321  last protocol on ChildHandle, then ChildHandle is destroyed.
    322322
     
    325325
    326326  @retval EFI_SUCCES            The protocol was removed from ChildHandle.
    327   @retval EFI_UNSUPPORTED       ChildHandle does not support the protocol that is 
     327  @retval EFI_UNSUPPORTED       ChildHandle does not support the protocol that is
    328328                                being removed.
    329329  @retval EFI_INVALID_PARAMETER Child handle is NULL.
     
    331331                                because its services are being used.
    332332  @retval other                 The child handle was not destroyed.
    333  
     333
    334334**/
    335335EFI_STATUS
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf

    r58459 r58466  
    3131#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC
    3232#
    33 #  DRIVER_BINDING                =  mTcp4DriverBinding                       
     33#  DRIVER_BINDING                =  mTcp4DriverBinding
    3434#  COMPONENT_NAME                =  gTcp4ComponentName
    3535#  COMPONENT_NAME2               =  gTcp4ComponentName2
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Main.c

    r48674 r58466  
    5454/**
    5555  Get the current operational status.
    56  
    57   The GetModeData() function copies the current operational settings of this 
    58   EFI TCPv4 Protocol instance into user-supplied buffers. This function can 
    59   also be used to retrieve the operational setting of underlying drivers 
     56
     57  The GetModeData() function copies the current operational settings of this
     58  EFI TCPv4 Protocol instance into user-supplied buffers. This function can
     59  also be used to retrieve the operational setting of underlying drivers
    6060  such as IPv4, MNP, or SNP.
    6161
     
    6565  @param  Tcp4ConfigData           Pointer to the buffer to receive the current TCP
    6666                                   configuration.
    67   @param  Ip4ModeData              Pointer to the buffer to receive the current IPv4 
     67  @param  Ip4ModeData              Pointer to the buffer to receive the current IPv4
    6868                                   configuration data used by the TCPv4 instance.
    6969  @param  MnpConfigData            Pointer to the buffer to receive the current MNP
     
    113113  Initialize or brutally reset the operational parameters for
    114114  this EFI TCPv4 instance.
    115  
     115
    116116  The Configure() function does the following:
    117   * Initialize this EFI TCPv4 instance, i.e., initialize the communication end 
     117  * Initialize this EFI TCPv4 instance, i.e., initialize the communication end
    118118  setting, specify active open or passive open for an instance.
    119   * Reset this TCPv4 instance brutally, i.e., cancel all pending asynchronous 
    120   tokens, flush transmission and receiving buffer directly without informing 
     119  * Reset this TCPv4 instance brutally, i.e., cancel all pending asynchronous
     120  tokens, flush transmission and receiving buffer directly without informing
    121121  the communication peer.
    122   No other TCPv4 Protocol operation can be executed by this instance 
    123   until it is configured properly. For an active TCP4 instance, after a proper 
    124   configuration it may call Connect() to initiates the three-way handshake. 
    125   For a passive TCP4 instance, its state will transit to Tcp4StateListen after 
    126   configuration, and Accept() may be called to listen the incoming TCP connection 
    127   request. If TcpConfigData is set to NULL, the instance is reset. Resetting 
    128   process will be done brutally, the state machine will be set to Tcp4StateClosed 
    129   directly, the receive queue and transmit queue will be flushed, and no traffic is 
     122  No other TCPv4 Protocol operation can be executed by this instance
     123  until it is configured properly. For an active TCP4 instance, after a proper
     124  configuration it may call Connect() to initiates the three-way handshake.
     125  For a passive TCP4 instance, its state will transit to Tcp4StateListen after
     126  configuration, and Accept() may be called to listen the incoming TCP connection
     127  request. If TcpConfigData is set to NULL, the instance is reset. Resetting
     128  process will be done brutally, the state machine will be set to Tcp4StateClosed
     129  directly, the receive queue and transmit queue will be flushed, and no traffic is
    130130  allowed through this instance.
    131131
     
    214214/**
    215215  Add or delete routing entries.
    216  
     216
    217217  The Routes() function adds or deletes a route from the instance's routing table.
    218   The most specific route is selected by comparing the SubnetAddress with the 
     218  The most specific route is selected by comparing the SubnetAddress with the
    219219  destination IP address's arithmetical AND to the SubnetMask.
    220   The default route is added with both SubnetAddress and SubnetMask set to 0.0.0.0. 
     220  The default route is added with both SubnetAddress and SubnetMask set to 0.0.0.0.
    221221  The default route matches all destination IP addresses if there is no more specific route.
    222   Direct route is added with GatewayAddress set to 0.0.0.0. Packets are sent to 
    223   the destination host if its address can be found in the Address Resolution Protocol (ARP) 
    224   cache or it is on the local subnet. If the instance is configured to use default 
     222  Direct route is added with GatewayAddress set to 0.0.0.0. Packets are sent to
     223  the destination host if its address can be found in the Address Resolution Protocol (ARP)
     224  cache or it is on the local subnet. If the instance is configured to use default
    225225  address, a direct route to the local network will be added automatically.
    226   Each TCP instance has its own independent routing table. Instance that uses the 
    227   default IP address will have a copy of the EFI_IP4_CONFIG_PROTOCOL's routing table. 
    228   The copy will be updated automatically whenever the IP driver reconfigures its 
    229   instance. As a result, the previous modification to the instance's local copy 
    230   will be lost. The priority of checking the route table is specific with IP 
     226  Each TCP instance has its own independent routing table. Instance that uses the
     227  default IP address will have a copy of the EFI_IP4_CONFIG_PROTOCOL's routing table.
     228  The copy will be updated automatically whenever the IP driver reconfigures its
     229  instance. As a result, the previous modification to the instance's local copy
     230  will be lost. The priority of checking the route table is specific with IP
    231231  implementation and every IP implementation must comply with RFC 1122.
    232232
     
    235235                                   table; if FALSE, add the specified route to
    236236                                   routing table.
    237                                    DestinationAddress and SubnetMask are used as 
     237                                   DestinationAddress and SubnetMask are used as
    238238                                   the keywords to search route entry.
    239239  @param  SubnetAddress            The destination network.
    240240  @param  SubnetMask               The subnet mask for the destination network.
    241   @param  GatewayAddress           The gateway address for this route. 
    242                                    It must be on the same subnet with the station 
     241  @param  GatewayAddress           The gateway address for this route.
     242                                   It must be on the same subnet with the station
    243243                                   address unless a direct route is specified.
    244                                    
     244
    245245  @retval EFI_SUCCESS              The operation completed successfully.
    246246  @retval EFI_NOT_STARTED          The EFI_TCP4_PROTOCOL instance has not been
     
    288288  Initiate a nonblocking TCP connection request for an active TCP instance.
    289289
    290   The Connect() function will initiate an active open to the remote peer configured 
    291   in current TCP instance if it is configured active. If the connection succeeds 
    292   or fails due to any error, the ConnectionToken->CompletionToken.Event will be 
    293   signaled and ConnectionToken->CompletionToken.Status will be updated accordingly. 
    294   This function can only be called for the TCP instance in Tcp4StateClosed state. 
    295   The instance will transfer into Tcp4StateSynSent if the function returns EFI_SUCCESS. 
    296   If TCP three way handshake succeeds, its state will become Tcp4StateEstablished, 
     290  The Connect() function will initiate an active open to the remote peer configured
     291  in current TCP instance if it is configured active. If the connection succeeds
     292  or fails due to any error, the ConnectionToken->CompletionToken.Event will be
     293  signaled and ConnectionToken->CompletionToken.Status will be updated accordingly.
     294  This function can only be called for the TCP instance in Tcp4StateClosed state.
     295  The instance will transfer into Tcp4StateSynSent if the function returns EFI_SUCCESS.
     296  If TCP three way handshake succeeds, its state will become Tcp4StateEstablished,
    297297  otherwise, the state will return to Tcp4StateClosed.
    298  
     298
    299299  @param  This                     Pointer to the EFI_TCP4_PROTOCOL instance
    300300  @param  ConnectionToken          Pointer to the connection token to return when
    301301                                   the TCP three way handshake finishes.
    302302
    303   @retval EFI_SUCCESS              The connection request is successfully initiated 
    304                                    and the state of this TCPv4 instance has 
     303  @retval EFI_SUCCESS              The connection request is successfully initiated
     304                                   and the state of this TCPv4 instance has
    305305                                   been changed to Tcp4StateSynSent.
    306306  @retval EFI_NOT_STARTED          This EFI_TCP4_PROTOCOL instance hasn't been
     
    338338  Listen on the passive instance to accept an incoming connection request.
    339339
    340   The Accept() function initiates an asynchronous accept request to wait for an 
    341   incoming connection on the passive TCP instance. If a remote peer successfully 
    342   establishes a connection with this instance, a new TCP instance will be created 
    343   and its handle will be returned in ListenToken->NewChildHandle. The newly created 
    344   instance is configured by inheriting the passive instance's configuration and is 
     340  The Accept() function initiates an asynchronous accept request to wait for an
     341  incoming connection on the passive TCP instance. If a remote peer successfully
     342  establishes a connection with this instance, a new TCP instance will be created
     343  and its handle will be returned in ListenToken->NewChildHandle. The newly created
     344  instance is configured by inheriting the passive instance's configuration and is
    345345  ready for use upon return. The instance is in the Tcp4StateEstablished state.
    346   The ListenToken->CompletionToken.Event will be signaled when a new connection 
    347   is accepted, user aborts the listen or connection is reset. This function only 
     346  The ListenToken->CompletionToken.Event will be signaled when a new connection
     347  is accepted, user aborts the listen or connection is reset. This function only
    348348  can be called when current TCP instance is in Tcp4StateListen state.
    349349
     
    389389  Queues outgoing data into the transmit queue.
    390390
    391   The Transmit() function queues a sending request to this TCPv4 instance along 
    392   with the user data. The status of the token is updated and the event in the token 
     391  The Transmit() function queues a sending request to this TCPv4 instance along
     392  with the user data. The status of the token is updated and the event in the token
    393393  will be signaled once the data is sent out or some error occurs.
    394394
     
    406406                                   * A transmit completion token with the same
    407407                                     Token-> CompletionToken.Event was already in the
    408                                      transmission queue. 
    409                                    * The current instance is in Tcp4StateClosed state 
    410                                    * The current instance is a passive one and 
    411                                      it is in Tcp4StateListen state. 
    412                                    * User has called Close() to disconnect this 
     408                                     transmission queue.
     409                                   * The current instance is in Tcp4StateClosed state
     410                                   * The current instance is a passive one and
     411                                     it is in Tcp4StateListen state.
     412                                   * User has called Close() to disconnect this
    413413                                     connection.
    414414  @retval EFI_NOT_READY            The completion token could not be queued because
     
    459459  Place an asynchronous receive request into the receiving queue.
    460460
    461   The Receive() function places a completion token into the receive packet queue. 
    462   This function is always asynchronous. The caller must allocate the 
    463   Token->CompletionToken.Event and the FragmentBuffer used to receive data. He also 
    464   must fill the DataLength which represents the whole length of all FragmentBuffer. 
    465   When the receive operation completes, the EFI TCPv4 Protocol driver updates the 
    466   Token->CompletionToken.Status and Token->Packet.RxData fields and the 
    467   Token->CompletionToken.Event is signaled. If got data the data and its length 
    468   will be copy into the FragmentTable, in the same time the full length of received 
    469   data will be recorded in the DataLength fields. Providing a proper notification 
    470   function and context for the event will enable the user to receive the notification 
     461  The Receive() function places a completion token into the receive packet queue.
     462  This function is always asynchronous. The caller must allocate the
     463  Token->CompletionToken.Event and the FragmentBuffer used to receive data. He also
     464  must fill the DataLength which represents the whole length of all FragmentBuffer.
     465  When the receive operation completes, the EFI TCPv4 Protocol driver updates the
     466  Token->CompletionToken.Status and Token->Packet.RxData fields and the
     467  Token->CompletionToken.Event is signaled. If got data the data and its length
     468  will be copy into the FragmentTable, in the same time the full length of received
     469  data will be recorded in the DataLength fields. Providing a proper notification
     470  function and context for the event will enable the user to receive the notification
    471471  and receiving status. That notification function is guaranteed to not be re-entered.
    472472
     
    484484                                   due to a lack of system resources.
    485485  @retval EFI_DEVICE_ERROR         An unexpected system or network error occurred.
    486                                    The EFI TCPv4 Protocol instance has been reset 
     486                                   The EFI TCPv4 Protocol instance has been reset
    487487                                   to startup defaults.
    488488  @retval EFI_ACCESS_DENIED        One or more of the following conditions is TRUE:
    489489                                   * A receive completion token with the same
    490                                      Token->CompletionToken.Event was already in 
    491                                      the receive queue. 
    492                                    * The current instance is in Tcp4StateClosed state. 
    493                                    * The current instance is a passive one and it 
    494                                      is in Tcp4StateListen state. 
    495                                    * User has called Close() to disconnect this 
     490                                     Token->CompletionToken.Event was already in
     491                                     the receive queue.
     492                                   * The current instance is in Tcp4StateClosed state.
     493                                   * The current instance is a passive one and it
     494                                     is in Tcp4StateListen state.
     495                                   * User has called Close() to disconnect this
    496496                                     connection.
    497497  @retval EFI_CONNECTION_FIN       The communication peer has closed the connection
     
    541541  Disconnecting a TCP connection gracefully or reset a TCP connection.
    542542
    543   Initiate an asynchronous close token to TCP driver. After Close() is called, 
    544   any buffered transmission data will be sent by TCP driver and the current 
    545   instance will have a graceful close working flow described as RFC 793 if 
    546   AbortOnClose is set to FALSE, otherwise, a rest packet will be sent by TCP 
    547   driver to fast disconnect this connection. When the close operation completes 
    548   successfully the TCP instance is in Tcp4StateClosed state, all pending 
    549   asynchronous operation is signaled and any buffers used for TCP network traffic 
     543  Initiate an asynchronous close token to TCP driver. After Close() is called,
     544  any buffered transmission data will be sent by TCP driver and the current
     545  instance will have a graceful close working flow described as RFC 793 if
     546  AbortOnClose is set to FALSE, otherwise, a rest packet will be sent by TCP
     547  driver to fast disconnect this connection. When the close operation completes
     548  successfully the TCP instance is in Tcp4StateClosed state, all pending
     549  asynchronous operation is signaled and any buffers used for TCP network traffic
    550550  is flushed.
    551551
     
    557557  @retval EFI_NOT_STARTED          The EFI_TCP4_PROTOCOL instance hasn't been
    558558                                   configured.
    559   @retval EFI_ACCESS_DENIED        One or more of the following are TRUE: 
     559  @retval EFI_ACCESS_DENIED        One or more of the following are TRUE:
    560560                                   * Configure() has been called with TcpConfigData
    561561                                     set to NULL and this function has not returned.
     
    593593  Abort an asynchronous connection, listen, transmission or receive request.
    594594
    595   The Cancel() function aborts a pending connection, listen, transmit or receive 
    596   request. If Token is not NULL and the token is in the connection, listen, 
    597   transmission or receive queue when it is being cancelled, its Token->Status 
    598   will be set to EFI_ABORTED and then Token->Event will be signaled. If the token 
    599   is not in one of the queues, which usually means that the asynchronous operation 
    600   has completed, EFI_NOT_FOUND is returned. If Token is NULL all asynchronous token 
     595  The Cancel() function aborts a pending connection, listen, transmit or receive
     596  request. If Token is not NULL and the token is in the connection, listen,
     597  transmission or receive queue when it is being cancelled, its Token->Status
     598  will be set to EFI_ABORTED and then Token->Event will be signaled. If the token
     599  is not in one of the queues, which usually means that the asynchronous operation
     600  has completed, EFI_NOT_FOUND is returned. If Token is NULL all asynchronous token
    601601  issued by Connect(), Accept(), Transmit() and Receive()will be aborted.
    602602  NOTE: It has not been implemented currently.
    603    
     603
    604604  @param  This                     Pointer to the EFI_TCP4_PROTOCOL instance.
    605605  @param  Token                    Pointer to a token that has been issued by
     
    607607                                   NULL, all pending tokens issued by above four
    608608                                   functions will be aborted.
    609                                    
     609
    610610  @retval  EFI_SUCCESS             The asynchronous I/O request is aborted and Token->Event
    611611                                   is signaled.
     
    614614  @retval  EFI_NO_MAPPING          When using the default address, configuration
    615615                                   (DHCP, BOOTP,RARP, etc.) hasn's finished yet.
    616   @retval  EFI_NOT_FOUND           The asynchronous I/O request isn's found in the 
    617                                    transmission or receive queue. It has either 
     616  @retval  EFI_NOT_FOUND           The asynchronous I/O request isn's found in the
     617                                   transmission or receive queue. It has either
    618618                                   completed or wasn's issued by Transmit() and Receive().
    619619  @retval  EFI_UNSUPPORTED         The operation is not supported in current
    620620                                   implementation.
    621  
     621
    622622**/
    623623EFI_STATUS
     
    635635  Poll to receive incoming data and transmit outgoing segments.
    636636
    637   The Poll() function increases the rate that data is moved between the network 
    638   and application and can be called when the TCP instance is created successfully. 
    639   Its use is optional. In some implementations, the periodical timer in the MNP 
    640   driver may not poll the underlying communications device fast enough to avoid 
    641   drop packets. Drivers and applications that are experiencing packet loss should 
     637  The Poll() function increases the rate that data is moved between the network
     638  and application and can be called when the TCP instance is created successfully.
     639  Its use is optional. In some implementations, the periodical timer in the MNP
     640  driver may not poll the underlying communications device fast enough to avoid
     641  drop packets. Drivers and applications that are experiencing packet loss should
    642642  try calling the Poll() function in a high frequency.
    643643
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Main.h

    r58459 r58466  
    5454  IN VOID                    *Data    OPTIONAL
    5555  );
    56  
     56
    5757///
    5858/// TCP mode data
     
    8484/**
    8585  Get the current operational status of a TCP instance.
    86  
    87   The GetModeData() function copies the current operational settings of this 
    88   EFI TCPv4 Protocol instance into user-supplied buffers. This function can 
    89   also be used to retrieve the operational setting of underlying drivers 
     86
     87  The GetModeData() function copies the current operational settings of this
     88  EFI TCPv4 Protocol instance into user-supplied buffers. This function can
     89  also be used to retrieve the operational setting of underlying drivers
    9090  such as IPv4, MNP, or SNP.
    9191
     
    9595  @param  Tcp4ConfigData           Pointer to the buffer to receive the current TCP
    9696                                   configuration.
    97   @param  Ip4ModeData              Pointer to the buffer to receive the current IPv4 
     97  @param  Ip4ModeData              Pointer to the buffer to receive the current IPv4
    9898                                   configuration data used by the TCPv4 instance.
    9999  @param  MnpConfigData            Pointer to the buffer to receive the current MNP
     
    125125  Initialize or brutally reset the operational parameters for
    126126  this EFI TCPv4 instance.
    127  
     127
    128128  The Configure() function does the following:
    129   * Initialize this EFI TCPv4 instance, i.e., initialize the communication end 
     129  * Initialize this EFI TCPv4 instance, i.e., initialize the communication end
    130130  setting, specify active open or passive open for an instance.
    131   * Reset this TCPv4 instance brutally, i.e., cancel all pending asynchronous 
    132   tokens, flush transmission and receiving buffer directly without informing 
     131  * Reset this TCPv4 instance brutally, i.e., cancel all pending asynchronous
     132  tokens, flush transmission and receiving buffer directly without informing
    133133  the communication peer.
    134   No other TCPv4 Protocol operation can be executed by this instance 
    135   until it is configured properly. For an active TCP4 instance, after a proper 
    136   configuration it may call Connect() to initiates the three-way handshake. 
    137   For a passive TCP4 instance, its state will transit to Tcp4StateListen after 
    138   configuration, and Accept() may be called to listen the incoming TCP connection 
    139   request. If TcpConfigData is set to NULL, the instance is reset. Resetting 
    140   process will be done brutally, the state machine will be set to Tcp4StateClosed 
    141   directly, the receive queue and transmit queue will be flushed, and no traffic is 
     134  No other TCPv4 Protocol operation can be executed by this instance
     135  until it is configured properly. For an active TCP4 instance, after a proper
     136  configuration it may call Connect() to initiates the three-way handshake.
     137  For a passive TCP4 instance, its state will transit to Tcp4StateListen after
     138  configuration, and Accept() may be called to listen the incoming TCP connection
     139  request. If TcpConfigData is set to NULL, the instance is reset. Resetting
     140  process will be done brutally, the state machine will be set to Tcp4StateClosed
     141  directly, the receive queue and transmit queue will be flushed, and no traffic is
    142142  allowed through this instance.
    143143
     
    169169/**
    170170  Add or delete routing entries.
    171  
     171
    172172  The Routes() function adds or deletes a route from the instance's routing table.
    173   The most specific route is selected by comparing the SubnetAddress with the 
     173  The most specific route is selected by comparing the SubnetAddress with the
    174174  destination IP address's arithmetical AND to the SubnetMask.
    175   The default route is added with both SubnetAddress and SubnetMask set to 0.0.0.0. 
     175  The default route is added with both SubnetAddress and SubnetMask set to 0.0.0.0.
    176176  The default route matches all destination IP addresses if there is no more specific route.
    177   Direct route is added with GatewayAddress set to 0.0.0.0. Packets are sent to 
    178   the destination host if its address can be found in the Address Resolution Protocol (ARP) 
    179   cache or it is on the local subnet. If the instance is configured to use default 
     177  Direct route is added with GatewayAddress set to 0.0.0.0. Packets are sent to
     178  the destination host if its address can be found in the Address Resolution Protocol (ARP)
     179  cache or it is on the local subnet. If the instance is configured to use default
    180180  address, a direct route to the local network will be added automatically.
    181   Each TCP instance has its own independent routing table. Instance that uses the 
    182   default IP address will have a copy of the EFI_IP4_CONFIG_PROTOCOL's routing table. 
    183   The copy will be updated automatically whenever the IP driver reconfigures its 
    184   instance. As a result, the previous modification to the instance's local copy 
    185   will be lost. The priority of checking the route table is specific with IP 
     181  Each TCP instance has its own independent routing table. Instance that uses the
     182  default IP address will have a copy of the EFI_IP4_CONFIG_PROTOCOL's routing table.
     183  The copy will be updated automatically whenever the IP driver reconfigures its
     184  instance. As a result, the previous modification to the instance's local copy
     185  will be lost. The priority of checking the route table is specific with IP
    186186  implementation and every IP implementation must comply with RFC 1122.
    187187
     
    190190                                   table; if FALSE, add the specified route to
    191191                                   routing table.
    192                                    DestinationAddress and SubnetMask are used as 
     192                                   DestinationAddress and SubnetMask are used as
    193193                                   the keywords to search route entry.
    194194  @param  SubnetAddress            The destination network.
    195195  @param  SubnetMask               The subnet mask for the destination network.
    196   @param  GatewayAddress           The gateway address for this route. 
    197                                    It must be on the same subnet with the station 
     196  @param  GatewayAddress           The gateway address for this route.
     197                                   It must be on the same subnet with the station
    198198                                   address unless a direct route is specified.
    199                                    
     199
    200200  @retval EFI_SUCCESS              The operation completed successfully.
    201201  @retval EFI_NOT_STARTED          The EFI_TCP4_PROTOCOL instance has not been
     
    225225  Initiate a nonblocking TCP connection request for an active TCP instance.
    226226
    227   The Connect() function will initiate an active open to the remote peer configured 
    228   in current TCP instance if it is configured active. If the connection succeeds 
    229   or fails due to any error, the ConnectionToken->CompletionToken.Event will be 
    230   signaled and ConnectionToken->CompletionToken.Status will be updated accordingly. 
    231   This function can only be called for the TCP instance in Tcp4StateClosed state. 
    232   The instance will transfer into Tcp4StateSynSent if the function returns EFI_SUCCESS. 
    233   If TCP three way handshake succeeds, its state will become Tcp4StateEstablished, 
     227  The Connect() function will initiate an active open to the remote peer configured
     228  in current TCP instance if it is configured active. If the connection succeeds
     229  or fails due to any error, the ConnectionToken->CompletionToken.Event will be
     230  signaled and ConnectionToken->CompletionToken.Status will be updated accordingly.
     231  This function can only be called for the TCP instance in Tcp4StateClosed state.
     232  The instance will transfer into Tcp4StateSynSent if the function returns EFI_SUCCESS.
     233  If TCP three way handshake succeeds, its state will become Tcp4StateEstablished,
    234234  otherwise, the state will return to Tcp4StateClosed.
    235  
     235
    236236  @param  This                     Pointer to the EFI_TCP4_PROTOCOL instance
    237237  @param  ConnectionToken          Pointer to the connection token to return when
    238238                                   the TCP three way handshake finishes.
    239239
    240   @retval EFI_SUCCESS              The connection request is successfully initiated 
    241                                    and the state of this TCPv4 instance has 
     240  @retval EFI_SUCCESS              The connection request is successfully initiated
     241                                   and the state of this TCPv4 instance has
    242242                                   been changed to Tcp4StateSynSent.
    243243  @retval EFI_NOT_STARTED          This EFI_TCP4_PROTOCOL instance hasn't been
     
    261261  Listen on the passive instance to accept an incoming connection request.
    262262
    263   The Accept() function initiates an asynchronous accept request to wait for an 
    264   incoming connection on the passive TCP instance. If a remote peer successfully 
    265   establishes a connection with this instance, a new TCP instance will be created 
    266   and its handle will be returned in ListenToken->NewChildHandle. The newly created 
    267   instance is configured by inheriting the passive instance's configuration and is 
     263  The Accept() function initiates an asynchronous accept request to wait for an
     264  incoming connection on the passive TCP instance. If a remote peer successfully
     265  establishes a connection with this instance, a new TCP instance will be created
     266  and its handle will be returned in ListenToken->NewChildHandle. The newly created
     267  instance is configured by inheriting the passive instance's configuration and is
    268268  ready for use upon return. The instance is in the Tcp4StateEstablished state.
    269   The ListenToken->CompletionToken.Event will be signaled when a new connection 
    270   is accepted, user aborts the listen or connection is reset. This function only 
     269  The ListenToken->CompletionToken.Event will be signaled when a new connection
     270  is accepted, user aborts the listen or connection is reset. This function only
    271271  can be called when current TCP instance is in Tcp4StateListen state.
    272272
     
    298298  Queues outgoing data into the transmit queue.
    299299
    300   The Transmit() function queues a sending request to this TCPv4 instance along 
    301   with the user data. The status of the token is updated and the event in the token 
     300  The Transmit() function queues a sending request to this TCPv4 instance along
     301  with the user data. The status of the token is updated and the event in the token
    302302  will be signaled once the data is sent out or some error occurs.
    303303
     
    315315                                   * A transmit completion token with the same
    316316                                     Token-> CompletionToken.Event was already in the
    317                                      transmission queue. 
    318                                    * The current instance is in Tcp4StateClosed state 
    319                                    * The current instance is a passive one and 
    320                                      it is in Tcp4StateListen state. 
    321                                    * User has called Close() to disconnect this 
     317                                     transmission queue.
     318                                   * The current instance is in Tcp4StateClosed state
     319                                   * The current instance is a passive one and
     320                                     it is in Tcp4StateListen state.
     321                                   * User has called Close() to disconnect this
    322322                                     connection.
    323323  @retval EFI_NOT_READY            The completion token could not be queued because
     
    339339  Place an asynchronous receive request into the receiving queue.
    340340
    341   The Receive() function places a completion token into the receive packet queue. 
    342   This function is always asynchronous. The caller must allocate the 
    343   Token->CompletionToken.Event and the FragmentBuffer used to receive data. He also 
    344   must fill the DataLength which represents the whole length of all FragmentBuffer. 
    345   When the receive operation completes, the EFI TCPv4 Protocol driver updates the 
    346   Token->CompletionToken.Status and Token->Packet.RxData fields and the 
    347   Token->CompletionToken.Event is signaled. If got data the data and its length 
    348   will be copy into the FragmentTable, in the same time the full length of received 
    349   data will be recorded in the DataLength fields. Providing a proper notification 
    350   function and context for the event will enable the user to receive the notification 
     341  The Receive() function places a completion token into the receive packet queue.
     342  This function is always asynchronous. The caller must allocate the
     343  Token->CompletionToken.Event and the FragmentBuffer used to receive data. He also
     344  must fill the DataLength which represents the whole length of all FragmentBuffer.
     345  When the receive operation completes, the EFI TCPv4 Protocol driver updates the
     346  Token->CompletionToken.Status and Token->Packet.RxData fields and the
     347  Token->CompletionToken.Event is signaled. If got data the data and its length
     348  will be copy into the FragmentTable, in the same time the full length of received
     349  data will be recorded in the DataLength fields. Providing a proper notification
     350  function and context for the event will enable the user to receive the notification
    351351  and receiving status. That notification function is guaranteed to not be re-entered.
    352352
     
    364364                                   due to a lack of system resources.
    365365  @retval EFI_DEVICE_ERROR         An unexpected system or network error occurred.
    366                                    The EFI TCPv4 Protocol instance has been reset 
     366                                   The EFI TCPv4 Protocol instance has been reset
    367367                                   to startup defaults.
    368368  @retval EFI_ACCESS_DENIED        One or more of the following conditions is TRUE:
    369369                                   * A receive completion token with the same
    370                                      Token->CompletionToken.Event was already in 
    371                                      the receive queue. 
    372                                    * The current instance is in Tcp4StateClosed state. 
    373                                    * The current instance is a passive one and it 
    374                                      is in Tcp4StateListen state. 
    375                                    * User has called Close() to disconnect this 
     370                                     Token->CompletionToken.Event was already in
     371                                     the receive queue.
     372                                   * The current instance is in Tcp4StateClosed state.
     373                                   * The current instance is a passive one and it
     374                                     is in Tcp4StateListen state.
     375                                   * User has called Close() to disconnect this
    376376                                     connection.
    377377  @retval EFI_CONNECTION_FIN       The communication peer has closed the connection
     
    392392  Disconnecting a TCP connection gracefully or reset a TCP connection.
    393393
    394   Initiate an asynchronous close token to TCP driver. After Close() is called, 
    395   any buffered transmission data will be sent by TCP driver and the current 
    396   instance will have a graceful close working flow described as RFC 793 if 
    397   AbortOnClose is set to FALSE, otherwise, a rest packet will be sent by TCP 
    398   driver to fast disconnect this connection. When the close operation completes 
    399   successfully the TCP instance is in Tcp4StateClosed state, all pending 
    400   asynchronous operation is signaled and any buffers used for TCP network traffic 
     394  Initiate an asynchronous close token to TCP driver. After Close() is called,
     395  any buffered transmission data will be sent by TCP driver and the current
     396  instance will have a graceful close working flow described as RFC 793 if
     397  AbortOnClose is set to FALSE, otherwise, a rest packet will be sent by TCP
     398  driver to fast disconnect this connection. When the close operation completes
     399  successfully the TCP instance is in Tcp4StateClosed state, all pending
     400  asynchronous operation is signaled and any buffers used for TCP network traffic
    401401  is flushed.
    402402
     
    408408  @retval EFI_NOT_STARTED          The EFI_TCP4_PROTOCOL instance hasn't been
    409409                                   configured.
    410   @retval EFI_ACCESS_DENIED        One or more of the following are TRUE: 
     410  @retval EFI_ACCESS_DENIED        One or more of the following are TRUE:
    411411                                   * Configure() has been called with TcpConfigData
    412412                                     set to NULL and this function has not returned.
     
    430430  Abort an asynchronous connection, listen, transmission or receive request.
    431431
    432   The Cancel() function aborts a pending connection, listen, transmit or receive 
    433   request. If Token is not NULL and the token is in the connection, listen, 
    434   transmission or receive queue when it is being cancelled, its Token->Status 
    435   will be set to EFI_ABORTED and then Token->Event will be signaled. If the token 
    436   is not in one of the queues, which usually means that the asynchronous operation 
    437   has completed, EFI_NOT_FOUND is returned. If Token is NULL all asynchronous token 
     432  The Cancel() function aborts a pending connection, listen, transmit or receive
     433  request. If Token is not NULL and the token is in the connection, listen,
     434  transmission or receive queue when it is being cancelled, its Token->Status
     435  will be set to EFI_ABORTED and then Token->Event will be signaled. If the token
     436  is not in one of the queues, which usually means that the asynchronous operation
     437  has completed, EFI_NOT_FOUND is returned. If Token is NULL all asynchronous token
    438438  issued by Connect(), Accept(), Transmit() and Receive()will be aborted.
    439439  NOTE: It has not been implemented currently.
    440    
     440
    441441  @param  This                     Pointer to the EFI_TCP4_PROTOCOL instance.
    442442  @param  Token                    Pointer to a token that has been issued by
     
    444444                                   NULL, all pending tokens issued by above four
    445445                                   functions will be aborted.
    446                                    
     446
    447447  @retval  EFI_SUCCESS             The asynchronous I/O request is aborted and Token->Event
    448448                                   is signaled.
     
    451451  @retval  EFI_NO_MAPPING          When using the default address, configuration
    452452                                   (DHCP, BOOTP,RARP, etc.) hasn's finished yet.
    453   @retval  EFI_NOT_FOUND           The asynchronous I/O request isn's found in the 
    454                                    transmission or receive queue. It has either 
     453  @retval  EFI_NOT_FOUND           The asynchronous I/O request isn's found in the
     454                                   transmission or receive queue. It has either
    455455                                   completed or wasn's issued by Transmit() and Receive().
    456456  @retval  EFI_UNSUPPORTED         The operation is not supported in current
    457457                                   implementation.
    458  
     458
    459459**/
    460460EFI_STATUS
     
    468468  Poll to receive incoming data and transmit outgoing segments.
    469469
    470   The Poll() function increases the rate that data is moved between the network 
    471   and application and can be called when the TCP instance is created successfully. 
    472   Its use is optional. In some implementations, the periodical timer in the MNP 
    473   driver may not poll the underlying communications device fast enough to avoid 
    474   drop packets. Drivers and applications that are experiencing packet loss should 
     470  The Poll() function increases the rate that data is moved between the network
     471  and application and can be called when the TCP instance is created successfully.
     472  Its use is optional. In some implementations, the periodical timer in the MNP
     473  driver may not poll the underlying communications device fast enough to avoid
     474  drop packets. Drivers and applications that are experiencing packet loss should
    475475  try calling the Poll() function in a high frequency.
    476476
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Option.c

    r48674 r58466  
    11/** @file
    22  Routines to process TCP option.
    3    
     3
    44Copyright (c) 2005 - 2006, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    1717/**
    1818    Get a UINT16 value from buffer.
    19    
     19
    2020    @param Buf                  Pointer to input buffer.
    21    
     21
    2222    @return                     The UINT16 value get from buffer.
    2323
     
    3535/**
    3636    Get a UINT32 value from buffer.
    37    
     37
    3838    @param Buf                  Pointer to input buffer.
    39    
     39
    4040    @return                     The UINT32 value get from buffer.
    4141
     
    5353/**
    5454    Put a UINT32 value in buffer.
    55    
     55
    5656    @param Buf                  Pointer to the buffer.
    57     @param Data                 The UINT32 Date to put in buffer 
     57    @param Data                 The UINT32 Date to put in buffer
    5858
    5959**/
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Option.h

    r48674 r58466  
    11/** @file
    22  Tcp option's routine header file.
    3    
     3
    44Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Output.c

    r48674 r58466  
    11/** @file
    22  TCP output process routines.
    3    
     3
    44Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    768768  // FIN is set.
    769769  //
    770   if ((Len == 0) && 
     770  if ((Len == 0) &&
    771771      ((Flag & (TCP_FLG_SYN | TCP_FLG_FIN)) == 0)) {
    772772    return Sent;
     
    806806
    807807      DEBUG (
    808                 (EFI_D_INFO, 
     808                (EFI_D_INFO,
    809809                "TcpToSendData: send FIN "
    810         "to peer for TCB %p in state %s\n", 
    811         Tcb, 
     810        "to peer for TCB %p in state %s\n",
     811        Tcb,
    812812        mTcpStateName[Tcb->State])
    813813      );
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Proto.h

    r48674 r58466  
    5050#define TCP_FLG_ACK      0x10
    5151#define TCP_FLG_URG      0x20
    52  
     52
    5353 //
    5454 // mask for all the flags
    5555 //
    56 #define TCP_FLG_FLAG     0x3F 
     56#define TCP_FLG_FLAG     0x3F
    5757
    5858
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Timer.c

    r48674 r58466  
    11/** @file
    22  TCP timer related functions.
    3    
     3
    44Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    3838  IN OUT TCP_CB *Tcb
    3939  );
    40  
     40
    4141/**
    4242  Timeout handler for window probe timer.
     
    290290
    291291/**
    292   Update the timer status and the next expire time according to the timers 
     292  Update the timer status and the next expire time according to the timers
    293293  to expire in a specific future time slot.
    294294
     
    556556      }
    557557    }
    558    
     558
    559559    //
    560560    // If the Tcb still exist or some timer is set, update the timer
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Udp4Dxe/ComponentName.c

    r58459 r58466  
    176176
    177177GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE *gUdpControllerNameTable = NULL;
    178  
     178
    179179/**
    180180  Retrieves a Unicode string that is the user readable name of the driver.
     
    238238  @param  Udp4[in]                   A pointer to the EFI_UDP4_PROTOCOL.
    239239
    240  
     240
    241241  @retval EFI_SUCCESS                Update the ControllerNameTable of this instance successfully.
    242242  @retval EFI_INVALID_PARAMETER      The input parameter is invalid.
    243  
     243
    244244**/
    245245EFI_STATUS
     
    281281    gUdpControllerNameTable = NULL;
    282282  }
    283  
     283
    284284  Status = AddUnicodeString2 (
    285285             "eng",
     
    292292    return Status;
    293293  }
    294  
     294
    295295  return AddUnicodeString2 (
    296296           "en",
     
    389389    return EFI_UNSUPPORTED;
    390390  }
    391  
     391
    392392  //
    393393  // Make sure this driver produced ChildHandle
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Driver.c

    r58459 r58466  
    3131/**
    3232  Callback function which provided by user to remove one node in NetDestroyLinkList process.
    33  
     33
    3434  @param[in]    Entry           The entry to be removed.
    3535  @param[in]    Context         Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
     
    195195  must follow these calling restrictions. If any other agent wishes
    196196  to call Stop() it must also follow these calling restrictions.
    197  
     197
    198198  @param[in]  This              Protocol instance pointer.
    199199  @param[in]  ControllerHandle  Handle of device to stop driver on
     
    267267           NULL
    268268           );
    269  
     269
    270270    Udp4CleanService (Udp4Service);
    271271
     
    283283/**
    284284  Creates a child handle and installs a protocol.
    285  
    286   The CreateChild() function installs a protocol on ChildHandle. 
    287   If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle. 
     285
     286  The CreateChild() function installs a protocol on ChildHandle.
     287  If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
    288288  If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
    289289
    290290  @param[in] This        Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
    291291  @param[in] ChildHandle Pointer to the handle of the child to create. If it is NULL,
    292                          then a new handle is created. If it is a pointer to an existing UEFI handle, 
     292                         then a new handle is created. If it is a pointer to an existing UEFI handle,
    293293                         then the protocol is added to the existing UEFI handle.
    294294
     
    420420/**
    421421  Destroys a child handle with a protocol installed on it.
    422  
    423   The DestroyChild() function does the opposite of CreateChild(). It removes a protocol 
    424   that was installed by CreateChild() from ChildHandle. If the removed protocol is the 
     422
     423  The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
     424  that was installed by CreateChild() from ChildHandle. If the removed protocol is the
    425425  last protocol on ChildHandle, then ChildHandle is destroyed.
    426426
     
    498498         gUdp4DriverBinding.DriverBindingHandle,
    499499         Instance->ChildHandle
    500          ); 
     500         );
    501501
    502502  //
     
    548548  the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including
    549549  both device drivers and bus drivers.
    550  
     550
    551551  The entry point for Udp4 driver which installs the driver binding
    552552  and component name protocol on its ImageHandle.
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Driver.h

    r48674 r58466  
    8080  must follow these calling restrictions. If any other agent wishes
    8181  to call Stop() it must also follow these calling restrictions.
    82  
     82
    8383  @param[in]  This              Protocol instance pointer.
    8484  @param[in]  ControllerHandle  Handle of device to stop driver on
     
    102102/**
    103103  Creates a child handle and installs a protocol.
    104  
    105   The CreateChild() function installs a protocol on ChildHandle. 
    106   If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle. 
     104
     105  The CreateChild() function installs a protocol on ChildHandle.
     106  If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
    107107  If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
    108108
    109109  @param[in] This        Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
    110110  @param[in] ChildHandle Pointer to the handle of the child to create. If it is NULL,
    111                          then a new handle is created. If it is a pointer to an existing UEFI handle, 
     111                         then a new handle is created. If it is a pointer to an existing UEFI handle,
    112112                         then the protocol is added to the existing UEFI handle.
    113113
     
    128128/**
    129129  Destroys a child handle with a protocol installed on it.
    130  
    131   The DestroyChild() function does the opposite of CreateChild(). It removes a protocol 
    132   that was installed by CreateChild() from ChildHandle. If the removed protocol is the 
     130
     131  The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
     132  that was installed by CreateChild() from ChildHandle. If the removed protocol is the
    133133  last protocol on ChildHandle, then ChildHandle is destroyed.
    134134
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf

    r58459 r58466  
    3131#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC
    3232#
    33 #  DRIVER_BINDING                =  gUdp4DriverBinding                       
     33#  DRIVER_BINDING                =  gUdp4DriverBinding
    3434#  COMPONENT_NAME                =  gUdp4ComponentName
    3535#  COMPONENT_NAME2               =  gUdp4ComponentName2
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c

    r58459 r58466  
    11/** @file
    22  The implementation of the Udp4 protocol.
    3  
     3
    44Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.h

    r58459 r58466  
    11/** @file
    22  EFI UDPv4 protocol implementation.
    3    
     3
    44Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    159159  Initializes, changes, or resets the operational parameters for this instance of the EFI UDPv4
    160160  Protocol.
    161  
     161
    162162  The Configure() function is used to do the following:
    163163  * Initialize and start this instance of the EFI UDPv4 Protocol.
     
    186186                                EFI UDPv4 Protocol instance.
    187187  @retval EFI_DEVICE_ERROR      An unexpected network or system error occurred and this instance
    188                                  was not opened. 
     188                                 was not opened.
    189189
    190190**/
     
    198198/**
    199199  Joins and leaves multicast groups.
    200  
     200
    201201  The Groups() function is used to enable and disable the multicast group
    202202  filtering. If the JoinFlag is FALSE and the MulticastAddress is NULL, then all
     
    235235/**
    236236  Adds and deletes routing table entries.
    237  
     237
    238238  The Routes() function adds a route to or deletes a route from the routing table.
    239239  Routes are determined by comparing the SubnetAddress with the destination IP
     
    283283/**
    284284  Queues outgoing data packets into the transmit queue.
    285  
     285
    286286  The Transmit() function places a sending request to this instance of the EFI
    287287  UDPv4 Protocol, alongside the transmit data that was filled by the user. Whenever
     
    320320/**
    321321  Places an asynchronous receive request into the receiving queue.
    322  
     322
    323323  The Receive() function places a completion token into the receive packet queue.
    324324  This function is always asynchronous.
     
    356356/**
    357357  Aborts an asynchronous transmit or receive request.
    358  
     358
    359359  The Cancel() function is used to abort a pending transmit or receive request.
    360360  If the token is in the transmit or receive request queues, after calling this
     
    391391/**
    392392  Polls for incoming data packets and processes outgoing data packets.
    393  
     393
    394394  The Poll() function can be used by network drivers and applications to increase
    395395  the rate that data packets are moved between the communications device and the
     
    692692  VOID  *Context
    693693  );
    694  
     694
    695695#endif
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c

    r58459 r58466  
    9696  Initializes, changes, or resets the operational parameters for this instance of the EFI UDPv4
    9797  Protocol.
    98  
     98
    9999  The Configure() function is used to do the following:
    100100  * Initialize and start this instance of the EFI UDPv4 Protocol.
     
    123123                                EFI UDPv4 Protocol instance.
    124124  @retval EFI_DEVICE_ERROR      An unexpected network or system error occurred and this instance
    125                                  was not opened. 
     125                                 was not opened.
    126126
    127127**/
     
    281281    ASSERT (IsListEmpty (&Instance->DeliveredDgramQue));
    282282  }
    283  
     283
    284284ON_EXIT:
    285285
     
    292292/**
    293293  Joins and leaves multicast groups.
    294  
     294
    295295  The Groups() function is used to enable and disable the multicast group
    296296  filtering. If the JoinFlag is FALSE and the MulticastAddress is NULL, then all
     
    393393/**
    394394  Adds and deletes routing table entries.
    395  
     395
    396396  The Routes() function adds a route to or deletes a route from the routing table.
    397397  Routes are determined by comparing the SubnetAddress with the destination IP
     
    467467/**
    468468  Queues outgoing data packets into the transmit queue.
    469  
     469
    470470  The Transmit() function places a sending request to this instance of the EFI
    471471  UDPv4 Protocol, alongside the transmit data that was filled by the user. Whenever
     
    696696/**
    697697  Places an asynchronous receive request into the receiving queue.
    698  
     698
    699699  The Receive() function places a completion token into the receive packet queue.
    700700  This function is always asynchronous.
     
    796796/**
    797797  Aborts an asynchronous transmit or receive request.
    798  
     798
    799799  The Cancel() function is used to abort a pending transmit or receive request.
    800800  If the token is in the transmit or receive request queues, after calling this
     
    867867/**
    868868  Polls for incoming data packets and processes outgoing data packets.
    869  
     869
    870870  The Poll() function can be used by network drivers and applications to increase
    871871  the rate that data packets are moved between the communications device and the
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/UefiPxeBcDxe/ComponentName.c

    r58459 r58466  
    317317  EFI_HANDLE                  NicHandle;
    318318  EFI_STATUS                  Status;
    319  
     319
    320320  if (ControllerHandle == NULL || ChildHandle != NULL) {
    321321    return EFI_UNSUPPORTED;
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c

    r58459 r58466  
    158158  }
    159159  //
    160   // Second, Check if bootfilename and serverhostname is overloaded to carry DHCP options refers to rfc-2132. 
     160  // Second, Check if bootfilename and serverhostname is overloaded to carry DHCP options refers to rfc-2132.
    161161  // If yes, try to parse options from the BootFileName field, then ServerName field.
    162162  //
     
    216216  if (Options[PXEBC_DHCP4_TAG_INDEX_BOOTFILE] != NULL) {
    217217    //
    218     // RFC 2132, Section 9.5 does not strictly state Bootfile name (option 67) is null 
     218    // RFC 2132, Section 9.5 does not strictly state Bootfile name (option 67) is null
    219219    // terminated string. So force to append null terminated character at the end of string.
    220220    //
     
    15621562  VendorOpt = &Packet->PxeVendorOption;
    15631563  //
    1564   // According to the PXE specification 2.1, Table 2-1 PXE DHCP Options  (Full 
    1565   // List), we must not consider a boot prompt or boot menu if all of the 
     1564  // According to the PXE specification 2.1, Table 2-1 PXE DHCP Options  (Full
     1565  // List), we must not consider a boot prompt or boot menu if all of the
    15661566  // following hold:
    15671567  // - the PXE_DISCOVERY_CONTROL PXE tag is present inside the Vendor Options
    15681568  //   (=43) DHCP tag, and
    1569   // - the PXE_DISCOVERY_CONTROL PXE tag has bit 3 set, and 
     1569  // - the PXE_DISCOVERY_CONTROL PXE tag has bit 3 set, and
    15701570  // - a boot file name has been presented with DHCP option 67.
    15711571  //
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.h

    r58459 r58466  
    298298
    299299  This function will pad each item of dhcp4 message packet.
    300  
     300
    301301  @param  Seed    Pointer to the message instance of the DHCP4 packet.
    302302  @param  Udp4    Pointer to the EFI_UDP4_PROTOCOL instance.
     
    343343/**
    344344  Callback routine.
    345  
     345
    346346  EFI_DHCP4_CALLBACK is provided by the consumer of the EFI DHCPv4 Protocol driver
    347347  to intercept events that occurred in the configuration process. This structure
     
    389389  @param  Layer                 PxeBc option boot item layer
    390390  @param  UseBis                Use BIS or not
    391   @param  DestIp                Ip address for server     
    392   @param  IpCount               The total count of the server ip address   
     391  @param  DestIp                Ip address for server
     392  @param  IpCount               The total count of the server ip address
    393393  @param  SrvList               Server list
    394394  @param  IsDiscv               Discover the vendor or not
     
    398398  @retval EFI_OUT_OF_RESOURCES  Allocate memory pool failed.
    399399  @retval EFI_NOT_FOUND         There is no vendor option exists.
    400   @retval EFI_TIMEOUT           Send Pxe Discover time out. 
    401  
     400  @retval EFI_TIMEOUT           Send Pxe Discover time out.
     401
    402402**/
    403403EFI_STATUS
     
    420420  @param  Private          Pointer to PxeBc private data.
    421421  @param  OptList          Pointer to a DHCP option list.
    422                            
    423   @param  IsDhcpDiscover   Discover dhcp option or not.     
     422
     423  @param  IsDhcpDiscover   Discover dhcp option or not.
    424424
    425425  @return The index item number of the option list.
     
    439439  @param  OptList    Pointer to the list of the options
    440440  @param  Type       the type of option
    441   @param  Layer      the layer of the boot options 
     441  @param  Layer      the layer of the boot options
    442442  @param  OptLen     length of opotion
    443443
     
    459459  @param  OptTag     The option OpCode.
    460460
    461   @return NULL if the buffer length is 0 and OpCode is not 
     461  @return NULL if the buffer length is 0 and OpCode is not
    462462          PXEBC_DHCP4_TAG_EOP, or the pointer to the buffer.
    463463
     
    493493
    494494  @retval EFI_SUCCESS          Select boot prompt done.
    495   @retval EFI_TIMEOUT          Select boot prompt time out. 
     495  @retval EFI_TIMEOUT          Select boot prompt time out.
    496496  @retval EFI_NOT_FOUND        The proxy offer is not Pxe10.
    497497  @retval EFI_ABORTED          User cancel the operation.
    498498  @retval EFI_NOT_READY        Read the input key from the keybroad has not finish.
    499  
     499
    500500**/
    501501EFI_STATUS
     
    511511  @param  Type            The type of the menu.
    512512  @param  UseDefaultItem  Use default item or not.
    513  
     513
    514514  @retval EFI_ABORTED     User cancel operation.
    515515  @retval EFI_SUCCESS     Select the boot menu success.
    516   @retval EFI_NOT_READY   Read the input key from the keybroad has not finish.   
     516  @retval EFI_NOT_READY   Read the input key from the keybroad has not finish.
    517517
    518518**/
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDriver.h

    r48674 r58466  
    2121  restrictions for this service. ConnectController() must
    2222  follow these calling restrictions. If any other agent wishes to call
    23   Supported() it must also follow these calling restrictions. 
     23  Supported() it must also follow these calling restrictions.
    2424  PxeBc requires DHCP4 and MTFTP4 protocols.
    2525
     
    4141  IN EFI_DEVICE_PATH_PROTOCOL     * RemainingDevicePath OPTIONAL
    4242  );
    43  
     43
    4444/**
    4545  Start this driver on ControllerHandle. This service is called by the
     
    6767  IN EFI_DEVICE_PATH_PROTOCOL     * RemainingDevicePath OPTIONAL
    6868  );
    69  
     69
    7070/**
    7171  Stop this driver on ControllerHandle. This service is called by the
     
    7575  must follow these calling restrictions. If any other agent wishes
    7676  to call Stop() it must also follow these calling restrictions.
    77  
     77
    7878  @param  This              Protocol instance pointer.
    7979  @param  ControllerHandle  Handle of device to stop driver on
     
    9494  IN EFI_HANDLE                   *ChildHandleBuffer
    9595  );
    96  
     96
    9797extern EFI_COMPONENT_NAME2_PROTOCOL gPxeBcComponentName2;
    9898extern EFI_COMPONENT_NAME_PROTOCOL  gPxeBcComponentName;
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c

    r58459 r58466  
    351351  //
    352352  // Configure block size for TFTP as a default value to handle all link layers.
    353   // 
    354   Private->BlockSize   = (UINTN) (MIN (Private->Ip4MaxPacketSize, PXEBC_DEFAULT_PACKET_SIZE) - 
     353  //
     354  Private->BlockSize   = (UINTN) (MIN (Private->Ip4MaxPacketSize, PXEBC_DEFAULT_PACKET_SIZE) -
    355355                           PXEBC_DEFAULT_UDP_OVERHEAD_SIZE - PXEBC_DEFAULT_TFTP_OVERHEAD_SIZE);
    356356  //
     
    360360    Private->BlockSize   = (UINTN) PcdGet64 (PcdTftpBlockSize);
    361361  }
    362  
     362
    363363  Private->AddressIsOk = FALSE;
    364364
     
    706706      CopyMem (&Private->Ip4ConfigData.StationAddress, &Private->StationIp, sizeof (EFI_IPv4_ADDRESS));
    707707      CopyMem (&Private->Ip4ConfigData.SubnetMask, &Private->SubnetMask, sizeof (EFI_IPv4_ADDRESS));
    708  
     708
    709709      //
    710710      // Reconfigure the Ip4 instance to capture background ICMP packets with new station Ip address.
     
    712712      Private->Ip4->Cancel (Private->Ip4, &Private->IcmpErrorRcvToken);
    713713      Private->Ip4->Configure (Private->Ip4, NULL);
    714  
     714
    715715      Status = Private->Ip4->Configure (Private->Ip4, &Private->Ip4ConfigData);
    716716      if (EFI_ERROR (Status)) {
    717717        goto ON_EXIT;
    718718      }
    719  
     719
    720720      Status = Private->Ip4->Receive (Private->Ip4, &Private->IcmpErrorRcvToken);
    721721      if (EFI_ERROR (Status)) {
    722722        goto ON_EXIT;
    723       } 
     723      }
    724724    }
    725725  }
     
    728728
    729729  //
    730   // Dhcp(), Discover(), and Mtftp() set the IP filter, and return with the IP 
     730  // Dhcp(), Discover(), and Mtftp() set the IP filter, and return with the IP
    731731  // receive filter list emptied and the filter set to EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP.
    732732  //
     
    734734  IpFilter.Filters = EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP;
    735735  This->SetIpFilter (This, &IpFilter);
    736  
     736
    737737  return Status;
    738738}
     
    844844
    845845      Status = EFI_INVALID_PARAMETER;
    846       goto ON_EXIT; 
     846      goto ON_EXIT;
    847847    }
    848848
     
    868868      //
    869869      Status = EFI_INVALID_PARAMETER;
    870       goto ON_EXIT; 
     870      goto ON_EXIT;
    871871    }
    872872
     
    916916          Status = EFI_OUT_OF_RESOURCES;
    917917          goto ON_EXIT;
    918          
    919         }     
    920      
     918
     919        }
     920
    921921        CopyMem (CreatedInfo, &DefaultInfo, sizeof (DefaultInfo));
    922922        Info    = CreatedInfo;
     
    945945      if (Index != Info->IpCnt) {
    946946        Status = EFI_INVALID_PARAMETER;
    947         goto ON_EXIT;       
     947        goto ON_EXIT;
    948948      }
    949949    }
     
    985985      if (!EFI_ERROR (Status)) {
    986986        break;
    987       }               
     987      }
    988988    }
    989989
     
    10431043
    10441044  Private->Udp4Read->Configure (Private->Udp4Read, &Private->Udp4CfgData);
    1045  
    1046   //
    1047   // Dhcp(), Discover(), and Mtftp() set the IP filter, and return with the IP 
     1045
     1046  //
     1047  // Dhcp(), Discover(), and Mtftp() set the IP filter, and return with the IP
    10481048  // receive filter list emptied and the filter set to EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP.
    10491049  //
     
    10511051  IpFilter.Filters = EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP;
    10521052  This->SetIpFilter (This, &IpFilter);
    1053  
     1053
    10541054  return Status;
    10551055}
     
    12851285  Private->Udp4Read->Configure (Private->Udp4Read, &Private->Udp4CfgData);
    12861286  //
    1287   // Dhcp(), Discover(), and Mtftp() set the IP filter, and return with the IP 
     1287  // Dhcp(), Discover(), and Mtftp() set the IP filter, and return with the IP
    12881288  // receive filter list emptied and the filter set to EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP.
    12891289  //
     
    14301430    return EFI_INVALID_PARAMETER;
    14311431  }
    1432  
     1432
    14331433  ZeroMem (&Token, sizeof (EFI_UDP4_COMPLETION_TOKEN));
    14341434  ZeroMem (&Udp4Session, sizeof (EFI_UDP4_SESSION_DATA));
     
    19961996    }
    19971997  }
    1998  
     1998
    19991999  //
    20002000  // Check whether we need reconfigure the UDP instance.
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcMtftp.c

    r58459 r58466  
    11/** @file
    22  PxeBc MTFTP functions.
    3  
     3
    44Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    2626  This is a callback function when packets received/transmitted in Mtftp driver.
    2727
    28   A callback function that is provided by the caller to intercept               
     28  A callback function that is provided by the caller to intercept
    2929  the EFI_MTFTP4_OPCODE_DATA or EFI_MTFTP4_OPCODE_DATA8 packets processed in the
    30   EFI_MTFTP4_PROTOCOL.ReadFile() function, and alternatively to intercept       
    31   EFI_MTFTP4_OPCODE_OACK or EFI_MTFTP4_OPCODE_ERROR packets during a call to   
     30  EFI_MTFTP4_PROTOCOL.ReadFile() function, and alternatively to intercept
     31  EFI_MTFTP4_OPCODE_OACK or EFI_MTFTP4_OPCODE_ERROR packets during a call to
    3232  EFI_MTFTP4_PROTOCOL.ReadFile(), WriteFile() or ReadDirectory().
    33    
     33
    3434  @param  This           Pointer to Mtftp protocol instance
    3535  @param  Token          Pointer to Mtftp token
     
    3838
    3939  @retval EFI_SUCCESS    Operation sucess
    40   @retval EFI_ABORTED    Abort transfer process 
     40  @retval EFI_ABORTED    Abort transfer process
    4141
    4242**/
     
    8989/**
    9090  This function is to get size of a file by Tftp.
    91  
     91
    9292  @param  Private        Pointer to PxeBc private data
    9393  @param  Config         Pointer to Mtftp configuration data
     
    100100  @retval EFI_DEVICE_ERROR   The network device encountered an error during this operation.
    101101  @retval Other              Has not get the size of the file.
    102  
     102
    103103**/
    104104EFI_STATUS
     
    162162      Private->Mode.TftpError.ErrorCode = (UINT8) Packet->Error.ErrorCode;
    163163      AsciiStrnCpy (
    164         Private->Mode.TftpError.ErrorString, 
    165         (CHAR8 *) Packet->Error.ErrorMessage, 
     164        Private->Mode.TftpError.ErrorString,
     165        (CHAR8 *) Packet->Error.ErrorMessage,
    166166        PXE_MTFTP_ERROR_STRING_LENGTH
    167167        );
     
    227227  @retval EFI_DEVICE_ERROR   The network device encountered an error during this operation.
    228228  @retval other              Read data from file failed.
    229  
     229
    230230**/
    231231EFI_STATUS
     
    310310  @retval EFI_DEVICE_ERROR   The network device encountered an error during this operation.
    311311  @retval other              Write data into file failed.
    312  
     312
    313313**/
    314314EFI_STATUS
     
    381381  @param  DontUseBuffer  Indicate whether with a receive buffer.
    382382
    383   @retval EFI_SUCCES         Get the data from the file included in directory success. 
     383  @retval EFI_SUCCES         Get the data from the file included in directory success.
    384384  @retval EFI_DEVICE_ERROR   The network device encountered an error during this operation.
    385385  @retval other              Operation failed.
    386  
     386
    387387**/
    388388EFI_STATUS
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcMtftp.h

    r58459 r58466  
    11/** @file
    22  Mtftp routines for PxeBc.
    3    
     3
    44Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
    55This program and the accompanying materials
     
    2727/**
    2828  This function is to get size of a file by Tftp.
    29  
     29
    3030  @param  Private        Pointer to PxeBc private data
    3131  @param  Config         Pointer to Mtftp configuration data
     
    3838  @retval EFI_DEVICE_ERROR   The network device encountered an error during this operation.
    3939  @retval Other              Has not get the size of the file.
    40  
     40
    4141**/
    4242EFI_STATUS
     
    6464  @retval EFI_DEVICE_ERROR   The network device encountered an error during this operation.
    6565  @retval other              Read data from file failed.
    66  
     66
    6767**/
    6868EFI_STATUS
     
    9292  @retval EFI_DEVICE_ERROR   The network device encountered an error during this operation.
    9393  @retval other              Write data into file failed.
    94  
     94
    9595**/
    9696EFI_STATUS
     
    117117  @param  DontUseBuffer  Indicate whether with a receive buffer.
    118118
    119   @retval EFI_SUCCES         Get the data from the file included in directory success. 
     119  @retval EFI_SUCCES         Get the data from the file included in directory success.
    120120  @retval EFI_DEVICE_ERROR   The network device encountered an error during this operation.
    121121  @retval other              Operation failed.
    122  
     122
    123123**/
    124124EFI_STATUS
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.h

    r48674 r58466  
    1717
    1818/**
    19   The common notify function associated with various PxeBc events. 
     19  The common notify function associated with various PxeBc events.
    2020
    2121  @param  Event     The event signaled.
     
    3333/**
    3434  This function initialize(or configure) the Udp4Write instance.
    35  
     35
    3636  @param  Udp4       Pointer to the EFI_UDP4_PROTOCOL instance.
    3737  @param  StationIp  Pointer to the station ip address.
     
    3939  @param  Gateway    Pointer to the gateway ip address.
    4040  @param  SrcPort    Pointer to the srouce port of the station.
    41  
     41
    4242  @retval EFI_SUCCESS           The configuration settings were set, changed, or reset successfully.
    4343  @retval EFI_NO_MAPPING        When using a default address, configuration (DHCP, BOOTP,
     
    5454                                was not opened.
    5555  @retval Others                Please examine the function Udp4->Routes(Udp4, FALSE, &mZeroIp4Addr, &mZeroIp4Addr, Gateway) returns.
    56  
     56
    5757**/
    5858EFI_STATUS
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf

    r58459 r58466  
    3535#  VALID_ARCHITECTURES           = IA32 X64 IPF
    3636#
    37 #  DRIVER_BINDING                =  gPxeBcDriverBinding                       
     37#  DRIVER_BINDING                =  gPxeBcDriverBinding
    3838#  COMPONENT_NAME                =  gPxeBcComponentName
    3939#  COMPONENT_NAME2               =  gPxeBcComponentName2
     
    5252  PxeBcMtftp.h
    5353  PxeBcDriver.h
    54  
     54
    5555
    5656[Packages]
     
    8686  gEfiIp4ProtocolGuid                              ## TO_START
    8787
    88 [Pcd] 
    89   gEfiMdeModulePkgTokenSpaceGuid.PcdTftpBlockSize  ## SOMETIMES_CONSUMES 
     88[Pcd]
     89  gEfiMdeModulePkgTokenSpaceGuid.PcdTftpBlockSize  ## SOMETIMES_CONSUMES
    9090
    9191[UserExtensions.TianoCore."ExtraFiles"]
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfig.vfr

    • Property svn:eol-style set to native
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDriver.c

    r58459 r58466  
    280280      return EFI_DEVICE_ERROR;
    281281    }
    282    
     282
    283283    return UninstallVlanConfigForm (PrivateData);
    284284  }
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigImpl.c

    r58459 r58466  
    328328    }
    329329  }
    330  
     330
    331331  HiiSetBrowserData (&gVlanConfigFormSetGuid, mVlanStorageName, sizeof (VLAN_CONFIGURATION), (UINT8 *) Configuration, NULL);
    332332  FreePool (Configuration);
     
    600600  EFI_STATUS                   Status;
    601601  EFI_VLAN_CONFIG_PROTOCOL     *VlanConfig;
    602  
     602
    603603  //
    604604  // End the parent-child relationship.
  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigStrings.uni

    • Property svn:mime-type changed from application/octet-stream to text/plain;encoding=UTF-16LE
Note: See TracChangeset for help on using the changeset viewer.

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