VirtualBox

Ignore:
Timestamp:
Oct 29, 2015 4:30:44 AM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
103777
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:
2 edited

Legend:

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

  • trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c

    r48674 r58466  
    7878  {FALSE, TRUE}, // ICMP6_ERR_UNREACH_HOST
    7979  {TRUE,  TRUE}, // ICMP6_ERR_UNREACH_PROTOCOL
    80   {TRUE,  TRUE}, // ICMP6_ERR_UNREACH_PORT   
     80  {TRUE,  TRUE}, // ICMP6_ERR_UNREACH_PORT
    8181  {TRUE,  TRUE}, // ICMP6_ERR_PACKAGE_TOOBIG
    8282  {FALSE, TRUE}, // ICMP6_ERR_TIMXCEED_HOPLIMIT
    8383  {FALSE, TRUE}, // ICMP6_ERR_TIMXCEED_REASS
    84   {FALSE, TRUE}, // ICMP6_ERR_PARAMPROB_HEADER   
     84  {FALSE, TRUE}, // ICMP6_ERR_PARAMPROB_HEADER
    8585  {FALSE, TRUE}, // ICMP6_ERR_PARAMPROB_NEXHEADER
    8686  {FALSE, TRUE}  // ICMP6_ERR_PARAMPROB_IPV6OPTION
     
    255255
    256256/**
    257   This function handles ICMPv4 packets. It is the worker function of 
     257  This function handles ICMPv4 packets. It is the worker function of
    258258  IpIoIcmpHandler.
    259259
     
    380380  IpIo->PktRcvdNotify (EFI_ICMP_ERROR, IcmpErr, Session, Pkt, IpIo->RcvdContext);
    381381
    382   return EFI_SUCCESS; 
    383 }
    384 
    385 /**
    386   This function handles ICMPv6 packets. It is the worker function of 
     382  return EFI_SUCCESS;
     383}
     384
     385/**
     386  This function handles ICMPv6 packets. It is the worker function of
    387387  IpIoIcmpHandler.
    388388
     
    428428  //
    429429  // Analyze the ICMPv6 Error in this ICMPv6 packet
    430   // 
     430  //
    431431  switch (Type) {
    432432  case ICMP_V6_DEST_UNREACHABLE:
     
    487487
    488488     return EFI_ABORTED;
    489    } 
     489   }
    490490
    491491  //
     
    498498  PayLoadHdr = (UINT8 *) ((UINT8 *) IcmpHdr + sizeof (IP6_ICMP_ERROR_HEAD));
    499499  Flag       = TRUE;
    500  
     500
    501501  do {
    502502    switch (NextHeader) {
     
    536536
    537537  TrimBytes = (UINT32) (PayLoadHdr - (UINT8 *) IcmpHdr);
    538  
     538
    539539  NetbufTrim (Pkt, TrimBytes, TRUE);
    540540
     
    625625{
    626626  IP_IO_SEND_ENTRY          *SndEntry;
    627   EFI_EVENT                 Event; 
     627  EFI_EVENT                 Event;
    628628  EFI_STATUS                Status;
    629629  NET_FRAGMENT              *ExtFragment;
     
    675675
    676676  //
    677   // Build a fragment table to contain the fragments in the packet. 
     677  // Build a fragment table to contain the fragments in the packet.
    678678  //
    679679  if (IpIo->IpVersion == IP_VERSION_4) {
     
    732732    Ip6TxData->ExtHdrsLength = 0;
    733733    Ip6TxData->ExtHdrs       = NULL;
    734    
     734
    735735    //
    736736    // Set the fields of SndToken
     
    779779/**
    780780  Destroy the SndEntry.
    781  
     781
    782782  This function pairs with IpIoCreateSndEntry().
    783783
     
    10641064      goto CleanUp;
    10651065    }
    1066    
     1066
    10671067    //
    10681068    // Create a netbuffer representing IPv6 packet
     
    10841084    //
    10851085    CopyMem (
    1086       &Session.Source, 
     1086      &Session.Source,
    10871087      &RxData->Ip6RxData.Header->SourceAddress,
    10881088      sizeof(EFI_IPv6_ADDRESS)
    10891089      );
    10901090    CopyMem (
    1091       &Session.Dest, 
    1092       &RxData->Ip6RxData.Header->DestinationAddress, 
     1091      &Session.Dest,
     1092      &RxData->Ip6RxData.Header->DestinationAddress,
    10931093      sizeof(EFI_IPv6_ADDRESS)
    10941094      );
     
    10961096    Session.IpHdrLen     = RxData->Ip6RxData.HeaderLength;
    10971097    Session.IpVersion    = IP_VERSION_6;
    1098   } 
     1098  }
    10991099
    11001100  if (EFI_SUCCESS == Status) {
     
    11181118    gBS->SignalEvent (RxData->Ip4RxData.RecycleSignal);
    11191119  } else {
    1120     gBS->SignalEvent (RxData->Ip6RxData.RecycleSignal); 
     1120    gBS->SignalEvent (RxData->Ip6RxData.RecycleSignal);
    11211121  }
    11221122
     
    11531153/**
    11541154  Create a new IP_IO instance.
    1155  
     1155
    11561156  This function uses IP4/IP6 service binding protocol in Controller to create
    11571157  an IP4/IP6 child (aka IP4/IP6 instance).
     
    11621162                                binding protocol installed.
    11631163  @param[in]  IpVersion         The version of the IP protocol to use, either
    1164                                 IPv4 or IPv6.                           
     1164                                IPv4 or IPv6.
    11651165
    11661166  @return Pointer to a newly created IP_IO instance, or NULL if failed.
     
    12171217             Image,
    12181218             &IpIo->ChildHandle,
    1219              IpVersion,             
     1219             IpVersion,
    12201220             (VOID **)&(IpIo->Ip)
    12211221             );
     
    12401240/**
    12411241  Open an IP_IO instance for use.
    1242  
     1242
    12431243  This function is called after IpIoCreate(). It is used for configuring the IP
    12441244  instance and register the callbacks and their context data for sending and
     
    12521252  @retval          EFI_SUCCESS        The IP_IO instance opened with OpenData
    12531253                                      successfully.
    1254   @retval          EFI_ACCESS_DENIED  The IP_IO instance is configured, avoid to 
     1254  @retval          EFI_ACCESS_DENIED  The IP_IO instance is configured, avoid to
    12551255                                      reopen it.
    12561256  @retval          Others             Error condition occurred.
     
    12861286
    12871287    Status = IpIo->Ip.Ip6->Configure (
    1288                              IpIo->Ip.Ip6, 
     1288                             IpIo->Ip.Ip6,
    12891289                             &OpenData->IpConfigData.Ip6CfgData
    12901290                             );
     
    13591359/**
    13601360  Stop an IP_IO instance.
    1361  
     1361
    13621362  This function is paired with IpIoOpen(). The IP_IO will be unconfigured and all
    13631363  the pending send/receive tokens will be canceled.
     
    14361436/**
    14371437  Destroy an IP_IO instance.
    1438  
     1438
    14391439  This function is paired with IpIoCreate(). The IP_IO will be closed first.
    14401440  Resource will be freed afterwards. See IpIoCloseProtocolDestroyIpChild().
     
    14761476/**
    14771477  Send out an IP packet.
    1478  
     1478
    14791479  This function is called after IpIoOpen(). The data to be sent are wrapped in
    14801480  Pkt. The IP instance wrapped in IpIo is used for sending by default but can be
     
    16011601/**
    16021602  Add a new IP instance for sending data.
    1603  
     1603
    16041604  The function is used to add the IP_IO to the IP_IO sending list. The caller
    16051605  can later use IpIoFindSender() to get the IP_IO and call IpIoSend() to send
     
    17601760      if (((EFI_IP4_CONFIG_DATA *) IpConfigData)->UseDefaultAddress) {
    17611761        Ip.Ip4->GetModeData (
    1762                   Ip.Ip4, 
    1763                   &Ip4ModeData, 
    1764                   NULL, 
     1762                  Ip.Ip4,
     1763                  &Ip4ModeData,
     1764                  NULL,
    17651765                  NULL
    17661766                  );
     
    17711771
    17721772      CopyMem (
    1773         &IpInfo->Addr.Addr, 
    1774         &((EFI_IP4_CONFIG_DATA *) IpConfigData)->StationAddress, 
     1773        &IpInfo->Addr.Addr,
     1774        &((EFI_IP4_CONFIG_DATA *) IpConfigData)->StationAddress,
    17751775        sizeof (IP4_ADDR)
    17761776        );
    17771777      CopyMem (
    1778         &IpInfo->PreMask.SubnetMask, 
     1778        &IpInfo->PreMask.SubnetMask,
    17791779        &((EFI_IP4_CONFIG_DATA *) IpConfigData)->SubnetMask,
    17801780        sizeof (IP4_ADDR)
     
    18301830        Status = EFI_NO_MAPPING;
    18311831        goto OnExit;
    1832       } 
     1832      }
    18331833
    18341834      CopyMem (
    1835         &IpInfo->Addr, 
    1836         &Ip6ModeData.ConfigData.StationAddress, 
     1835        &IpInfo->Addr,
     1836        &Ip6ModeData.ConfigData.StationAddress,
    18371837        sizeof (EFI_IPv6_ADDRESS)
    18381838        );
     
    18451845        Ip.Ip6->Configure (Ip.Ip6, NULL);
    18461846      }
    1847     } 
     1847    }
    18481848  } else {
    18491849    //
     
    18631863  Destroy an IP instance maintained in IpIo->IpList for
    18641864  sending purpose.
    1865  
     1865
    18661866  This function pairs with IpIoAddIp(). The IpInfo is previously created by
    18671867  IpIoAddIp(). The IP_IO_IP_INFO::RefCnt is decremented and the IP instance
     
    19351935  Find the first IP protocol maintained in IpIo whose local
    19361936  address is the same as Src.
    1937  
     1937
    19381938  This function is called when the caller needs the IpIo to send data to the
    19391939  specified Src. The IpIo was added previously by IpIoAddIp().
     
    19611961  IP_IO_IP_INFO   *IpInfo;
    19621962
    1963   ASSERT ((IpVersion == IP_VERSION_4) || (IpVersion == IP_VERSION_6)); 
     1963  ASSERT ((IpVersion == IP_VERSION_4) || (IpVersion == IP_VERSION_6));
    19641964
    19651965  NET_LIST_FOR_EACH (IpIoEntry, &mActiveIpIoList) {
     
    19831983        if (EFI_IP6_EQUAL (&IpInfo->Addr.v6, &Src->v6)) {
    19841984          *IpIo = IpIoPtr;
    1985           return IpInfo;       
     1985          return IpInfo;
    19861986        }
    1987       }     
     1987      }
    19881988
    19891989    }
     
    19991999/**
    20002000  Get the ICMP error map information.
    2001  
     2001
    20022002  The ErrorStatus will be returned. The IsHard and Notify are optional. If they
    20032003  are not NULL, this routine will fill them.
     
    20052005  @param[in]   IcmpError             IcmpError Type.
    20062006  @param[in]   IpVersion             The version of the IP protocol to use,
    2007                                      either IPv4 or IPv6. 
     2007                                     either IPv4 or IPv6.
    20082008  @param[out]  IsHard                If TRUE, indicates that it is a hard error.
    20092009  @param[out]  Notify                If TRUE, SockError needs to be notified.
     
    20762076    case ICMP6_ERR_UNREACH_HOST:
    20772077    case ICMP6_ERR_TIMXCEED_HOPLIMIT:
    2078     case ICMP6_ERR_TIMXCEED_REASS:       
     2078    case ICMP6_ERR_TIMXCEED_REASS:
    20792079      return EFI_HOST_UNREACHABLE;
    20802080
    20812081    case ICMP6_ERR_UNREACH_PROTOCOL:
    20822082      return EFI_PROTOCOL_UNREACHABLE;
    2083      
     2083
    20842084    case ICMP6_ERR_UNREACH_PORT:
    20852085      return EFI_PORT_UNREACHABLE;
     
    21102110
    21112111  This function is called when the caller needs the IpIo to refresh the existing
    2112   IPv6 neighbor cache entries since the neighbor is considered reachable by the 
    2113   node has recently received a confirmation that packets sent recently to the 
    2114   neighbor were received by its IP layer. 
     2112  IPv6 neighbor cache entries since the neighbor is considered reachable by the
     2113  node has recently received a confirmation that packets sent recently to the
     2114  neighbor were received by its IP layer.
    21152115
    21162116  @param[in]   IpIo                  Pointer to an IP_IO instance
    21172117  @param[in]   Neighbor              The IP address of the neighbor
    21182118  @param[in]   Timeout               Time in 100-ns units that this entry will
    2119                                      remain in the neighbor cache. A value of 
    2120                                      zero means that the entry is permanent. 
    2121                                      A value of non-zero means that the entry is 
     2119                                     remain in the neighbor cache. A value of
     2120                                     zero means that the entry is permanent.
     2121                                     A value of non-zero means that the entry is
    21222122                                     dynamic and will be deleted after Timeout.
    21232123
     
    21252125  @retval      EFI_NOT_STARTED       The IpIo is not configured.
    21262126  @retval      EFI_INVALID_PARAMETER Neighbor Address is invalid.
    2127   @retval      EFI_NOT_FOUND         The neighbor cache entry is not in the 
    2128                                      neighbor table. 
     2127  @retval      EFI_NOT_FOUND         The neighbor cache entry is not in the
     2128                                     neighbor table.
    21292129  @retval      EFI_OUT_OF_RESOURCES  Failed due to resource limit.
    21302130
     
    21342134  IN IP_IO           *IpIo,
    21352135  IN EFI_IP_ADDRESS  *Neighbor,
    2136   IN UINT32          Timeout 
     2136  IN UINT32          Timeout
    21372137  )
    21382138{
Note: See TracChangeset for help on using the changeset viewer.

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