Changeset 58466 in vbox for trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network
- Timestamp:
- Oct 29, 2015 4:30:44 AM (9 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 129 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware
- Property svn:mergeinfo changed
/vendor/edk2/current merged: 103769-103776
- Property svn:mergeinfo changed
-
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c
r58459 r58466 1 1 /** @file 2 2 ARP driver functions. 3 3 4 4 Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 36 36 37 37 @retval EFI_SUCCESS The arp service context is initialized. 38 38 39 39 @retval EFI_UNSUPPORTED The underlayer Snp mode type is not ethernet. 40 40 Failed to initialize the service context. … … 244 244 /** 245 245 Callback function which provided by user to remove one node in NetDestroyLinkList process. 246 246 247 247 @param[in] Entry The entry to be removed. 248 248 @param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList. … … 261 261 ARP_INSTANCE_DATA *Instance; 262 262 EFI_SERVICE_BINDING_PROTOCOL *ServiceBinding; 263 263 264 264 if (Entry == NULL || Context == NULL) { 265 265 return EFI_INVALID_PARAMETER; … … 273 273 274 274 /** 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 278 278 creating a handle for the specified child device. 279 279 280 280 @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 283 283 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, 286 286 and is optional for bus drivers. 287 287 288 288 @retval EFI_SUCCESS The device specified by ControllerHandle and 289 RemainingDevicePath is supported by the driver 289 RemainingDevicePath is supported by the driver 290 290 specified by This. 291 291 @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and 292 RemainingDevicePath is already being managed 292 RemainingDevicePath is already being managed 293 293 by the driver specified by This. 294 294 @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 297 297 requires exclusive acces. Currently not implemented. 298 298 @retval EFI_UNSUPPORTED The device specified by ControllerHandle and 299 RemainingDevicePath is not supported by the 299 RemainingDevicePath is not supported by the 300 300 driver specified by This. 301 301 … … 343 343 344 344 /** 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 351 351 will not be deterministic. 352 352 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 354 354 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. 358 358 359 359 @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 362 362 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, 365 365 and is optional for bus drivers. 366 366 … … 368 368 @retval EFI_DEVICE_ERROR The device could not be started due to a device error. 369 369 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 371 371 resources. 372 372 @retval Others The driver failded to start the device. … … 436 436 437 437 /** 438 Stop this driver on ControllerHandle. 439 438 Stop this driver on ControllerHandle. 439 440 440 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 445 445 will not be deterministic. 446 446 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this … … 450 450 Start() function, and the Start() function must have called OpenProtocol() on 451 451 ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. 452 452 453 453 @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 456 456 to use to stop the device. 457 457 @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer. 458 458 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 460 460 if NumberOfChildren is 0.Not used. 461 461 … … 543 543 /** 544 544 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 549 549 installs on the existing ChildHandle. 550 550 551 551 @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance. 552 552 @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 554 554 UEFI handle, then the protocol is added to the existing UEFI handle. 555 555 … … 671 671 /** 672 672 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 676 676 last protocol on ChildHandle, then ChildHandle is destroyed. 677 677 … … 680 680 681 681 @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 683 683 being removed. 684 684 @retval EFI_INVALID_PARAMETER Child handle is NULL. … … 794 794 @param[in] SystemTable The system table. 795 795 796 @retval EFI_SUCCESS if the driver binding and component name protocols 796 @retval EFI_SUCCESS if the driver binding and component name protocols 797 797 are successfully 798 798 @retval Others Failed to install the protocols. -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.h
r48674 r58466 1 1 /** @file 2 2 ARP driver header file. 3 3 4 4 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 40 40 // 41 41 /** 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 45 45 creating a handle for the specified child device. 46 46 47 47 @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 50 50 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, 53 53 and is optional for bus drivers. 54 54 55 55 @retval EFI_SUCCESS The device specified by ControllerHandle and 56 RemainingDevicePath is supported by the driver 56 RemainingDevicePath is supported by the driver 57 57 specified by This. 58 58 @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and 59 RemainingDevicePath is already being managed 59 RemainingDevicePath is already being managed 60 60 by the driver specified by This. 61 61 @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 64 64 requires exclusive acces. Currently not implemented. 65 65 @retval EFI_UNSUPPORTED The device specified by ControllerHandle and 66 RemainingDevicePath is not supported by the 66 RemainingDevicePath is not supported by the 67 67 driver specified by This. 68 68 … … 77 77 78 78 /** 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 85 85 will not be deterministic. 86 86 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 88 88 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. 92 92 93 93 @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 96 96 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, 99 99 and is optional for bus drivers. 100 100 … … 102 102 @retval EFI_DEVICE_ERROR The device could not be started due to a device error. 103 103 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 105 105 resources. 106 106 @retval Others The driver failded to start the device. … … 116 116 117 117 /** 118 Stop this driver on ControllerHandle. 119 118 Stop this driver on ControllerHandle. 119 120 120 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 125 125 will not be deterministic. 126 126 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this … … 130 130 Start() function, and the Start() function must have called OpenProtocol() on 131 131 ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. 132 132 133 133 @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 136 136 to use to stop the device. 137 137 @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer. 138 138 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 140 140 if NumberOfChildren is 0.Not used. 141 141 … … 155 155 /** 156 156 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 161 161 installs on the existing ChildHandle. 162 162 163 163 @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance. 164 164 @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 166 166 UEFI handle, then the protocol is added to the existing UEFI handle. 167 167 … … 182 182 /** 183 183 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 187 187 last protocol on ChildHandle, then ChildHandle is destroyed. 188 188 … … 191 191 192 192 @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 194 194 being removed. 195 195 @retval EFI_INVALID_PARAMETER Child handle is NULL. -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
r58459 r58466 32 32 # VALID_ARCHITECTURES = IA32 X64 IPF EBC 33 33 # 34 # DRIVER_BINDING = gArpDriverBinding 34 # DRIVER_BINDING = gArpDriverBinding 35 35 # COMPONENT_NAME = gArpComponentName 36 36 # COMPONENT_NAME2 = gArpComponentName2 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/ArpDxe/ArpImpl.c
r58459 r58466 1 1 /** @file 2 2 The implementation of the ARP protocol. 3 3 4 4 Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 331 331 /** 332 332 Process the already sent arp packets. 333 333 334 334 @param[in] Context Pointer to the context data registerd to the 335 335 Event. -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/ArpDxe/ArpImpl.h
r58459 r58466 95 95 /** 96 96 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 99 99 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 102 102 structure of type ARP_INSTANCE_DATA. 103 103 104 104 **/ 105 105 #define ARP_INSTANCE_DATA_FROM_THIS(a) \ … … 131 131 /** 132 132 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 135 135 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 138 138 a data structure of type ARP_SERVICE_DATA. 139 139 140 140 **/ 141 141 #define ARP_SERVICE_DATA_FROM_THIS(a) \ … … 229 229 This function is used to assign a station address to the ARP cache for this instance 230 230 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 234 234 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 238 238 the protocol type or station address to a configured ARP instance will result in errors. 239 239 … … 264 264 This function is used to insert entries into the ARP cache. 265 265 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 269 269 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 275 275 their expected network environments. 276 276 277 277 @param This Pointer to the EFI_ARP_PROTOCOL instance. 278 278 @param DenyFlag Set to TRUE if this entry is a deny entry. Set to … … 320 320 This function searches the ARP cache for matching entries and allocates a buffer into 321 321 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 324 324 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 328 328 affected by Refresh. 329 329 330 330 @param This Pointer to the EFI_ARP_PROTOCOL instance. 331 331 @param BySwAddress Set to TRUE to look for matching software protocol … … 440 440 This function aborts the previous ARP request (identified by This, TargetSwAddress 441 441 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 447 447 instance will be cancelled and their corresponding events will be signaled. 448 448 449 449 @param This Pointer to the EFI_ARP_PROTOCOL instance. 450 450 @param TargetSwAddress Pointer to the protocol address in previous … … 674 674 /** 675 675 Process the already sent arp packets. 676 676 677 677 @param[in] Context Pointer to the context data registerd to the 678 678 Event. -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/ArpDxe/ArpMain.c
r48674 r58466 1 1 /** @file 2 2 Implementation of EFI Address Resolution Protocol (ARP) Protocol interface functions. 3 3 4 4 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 19 19 This function is used to assign a station address to the ARP cache for this instance 20 20 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 24 24 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 28 28 the protocol type or station address to a configured ARP instance will result in errors. 29 29 … … 84 84 This function is used to insert entries into the ARP cache. 85 85 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 89 89 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 95 95 their expected network environments. 96 96 97 97 @param This Pointer to the EFI_ARP_PROTOCOL instance. 98 98 @param DenyFlag Set to TRUE if this entry is a deny entry. Set to … … 282 282 This function searches the ARP cache for matching entries and allocates a buffer into 283 283 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 286 286 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 290 290 affected by Refresh. 291 291 292 292 @param This Pointer to the EFI_ARP_PROTOCOL instance. 293 293 @param BySwAddress Set to TRUE to look for matching software protocol … … 679 679 This function aborts the previous ARP request (identified by This, TargetSwAddress 680 680 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 686 686 instance will be cancelled and their corresponding events will be signaled. 687 687 688 688 @param This Pointer to the EFI_ARP_PROTOCOL instance. 689 689 @param TargetSwAddress Pointer to the protocol address in previous -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/ArpDxe/ComponentName.c
r58459 r58466 188 188 return EFI_UNSUPPORTED; 189 189 } 190 191 // 192 // Make sure this driver produced ChildHandle 193 // 190 191 // 192 // Make sure this driver produced ChildHandle 193 // 194 194 Status = EfiTestChildHandle ( 195 195 ControllerHandle, … … 201 201 } 202 202 203 // 204 // Retrieve an instance of a produced protocol from ChildHandle 205 // 203 // 204 // Retrieve an instance of a produced protocol from ChildHandle 205 // 206 206 Status = gBS->OpenProtocol ( 207 207 ChildHandle, -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Dhcp4Dxe/ComponentName.c
r58459 r58466 250 250 @param Dhcp4[in] A pointer to the EFI_DHCP4_PROTOCOL. 251 251 252 252 253 253 @retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully. 254 254 @retval EFI_INVALID_PARAMETER The input parameter is invalid. 255 255 @retval EFI_DEVICE_ERROR DHCP is in unknown state. 256 256 257 257 **/ 258 258 EFI_STATUS … … 275 275 return Status; 276 276 } 277 277 278 278 if (gDhcpControllerNameTable != NULL) { 279 279 FreeUnicodeStringTable (gDhcpControllerNameTable); 280 280 gDhcpControllerNameTable = NULL; 281 281 } 282 282 283 283 if (Dhcp4ModeData.State > Dhcp4Rebooting) { 284 284 return EFI_DEVICE_ERROR; 285 285 } 286 286 287 287 Status = AddUnicodeString2 ( 288 288 "eng", … … 295 295 return Status; 296 296 } 297 297 298 298 return AddUnicodeString2 ( 299 299 "en", … … 392 392 return EFI_UNSUPPORTED; 393 393 } 394 395 // 396 // Make sure this driver produced ChildHandle 397 // 394 395 // 396 // Make sure this driver produced ChildHandle 397 // 398 398 Status = EfiTestChildHandle ( 399 399 ControllerHandle, … … 405 405 } 406 406 407 // 408 // Retrieve an instance of a produced protocol from ChildHandle 409 // 407 // 408 // Retrieve an instance of a produced protocol from ChildHandle 409 // 410 410 Status = gBS->OpenProtocol ( 411 411 ChildHandle, -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.c
r58459 r58466 356 356 /** 357 357 Callback function which provided by user to remove one node in NetDestroyLinkList process. 358 358 359 359 @param[in] Entry The entry to be removed. 360 360 @param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList. … … 446 446 // 447 447 // Destroy all the children instances before destory the service. 448 // 448 // 449 449 List = &DhcpSb->Children; 450 450 Status = NetDestroyLinkList ( … … 482 482 } 483 483 FreePool (DhcpSb); 484 484 485 485 Status = EFI_SUCCESS; 486 486 } -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.h
r58459 r58466 1 1 /** @file 2 2 Header for the DHCP4 driver. 3 3 4 4 Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 79 79 must follow these calling restrictions. If any other agent wishes 80 80 to call Stop() it must also follow these calling restrictions. 81 81 82 82 @param[in] This Protocol instance pointer. 83 83 @param[in] ControllerHandle Handle of device to stop driver on … … 101 101 /** 102 102 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. 106 106 If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle. 107 107 108 108 @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance. 109 109 @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, 111 111 then the protocol is added to the existing UEFI handle. 112 112 … … 127 127 /** 128 128 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 132 132 last protocol on ChildHandle, then ChildHandle is destroyed. 133 133 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
r58459 r58466 32 32 # VALID_ARCHITECTURES = IA32 X64 IPF EBC 33 33 # 34 # DRIVER_BINDING = gDhcp4DriverBinding 34 # DRIVER_BINDING = gDhcp4DriverBinding 35 35 # COMPONENT_NAME = gDhcp4ComponentName 36 36 # COMPONENT_NAME2 = gDhcp4ComponentName2 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.h
r58459 r58466 6 6 RFC 1534: Interoperation Between DHCP and BOOTP 7 7 RFC 3396: Encoding Long Options in DHCP. 8 8 9 9 Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR> 10 10 This program and the accompanying materials -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c
r58459 r58466 1 1 /** @file 2 2 EFI DHCP protocol implementation. 3 3 4 4 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 42 42 // 43 43 DhcpSb->ActiveChild->ElaspedTime= 0; 44 44 45 45 if (DhcpSb->DhcpState == Dhcp4Init) { 46 46 DhcpSetState (DhcpSb, Dhcp4Selecting, FALSE); … … 1405 1405 ASSERT (UdpIo != NULL); 1406 1406 NET_GET_REF (Wrap); 1407 1407 1408 1408 Status = UdpIoSendDatagram ( 1409 UdpIo, 1410 Wrap, 1411 &EndPoint, 1412 NULL, 1413 DhcpOnPacketSent, 1409 UdpIo, 1410 Wrap, 1411 &EndPoint, 1412 NULL, 1413 DhcpOnPacketSent, 1414 1414 DhcpSb 1415 1415 ); … … 1464 1464 return EFI_OUT_OF_RESOURCES; 1465 1465 } 1466 1466 1467 1467 // 1468 1468 // Broadcast the message, unless we know the server address. … … 1532 1532 Instance->ElaspedTime++; 1533 1533 } 1534 1534 1535 1535 // 1536 1536 // Check the retransmit timer … … 1554 1554 } 1555 1555 } 1556 1556 1557 1557 if (++DhcpSb->CurRetry < DhcpSb->MaxRetries) { 1558 1558 // … … 1593 1593 } 1594 1594 } 1595 1595 1596 1596 // 1597 1597 // If an address has been acquired, check whether need to … … 1625 1625 if (Instance != NULL) { 1626 1626 Instance->ElaspedTime= 0; 1627 } 1628 1627 } 1628 1629 1629 Status = DhcpSendMessage ( 1630 1630 DhcpSb, … … 1649 1649 if (Instance != NULL) { 1650 1650 Instance->ElaspedTime= 0; 1651 } 1651 } 1652 1652 1653 1653 Status = DhcpSendMessage ( -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.h
r48674 r58466 1 1 /** @file 2 2 The DHCP4 protocol implementation. 3 3 4 4 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Option.c
r48674 r58466 1 1 /** @file 2 2 Function to validate, parse, process the DHCP options. 3 3 4 4 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Option.h
r48674 r58466 1 1 /** @file 2 2 To validate, parse and process the DHCP options. 3 3 4 4 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 129 129 #define DHCP_MAX_OPTIONS 256 130 130 131 131 132 132 // 133 133 // 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 338 338 Status = gBS->InstallMultipleProtocolInterfaces ( 339 339 &mDpcHandle, 340 &gEfiDpcProtocolGuid, 340 &gEfiDpcProtocolGuid, 341 341 &mDpc, 342 342 NULL -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/ComponentName.c
r58459 r58466 34 34 35 35 GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mIScsiDriverNameTable[] = { 36 {"eng;en", L"iSCSI Driver"}, 36 {"eng;en", L"iSCSI Driver"}, 37 37 {NULL, NULL} 38 38 }; … … 49 49 by This does not support the language specified by Language, 50 50 then EFI_UNSUPPORTED is returned. 51 51 52 52 @param[in] This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. 53 53 @param[in] Language A pointer to a three character ISO 639-2 language identifier. … … 89 89 90 90 @param[in] IScsiExtScsiPassThru A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance. 91 91 92 92 @retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully. 93 93 @retval EFI_INVALID_PARAMETER The input parameter is invalid. 94 94 @retval EFI_UNSUPPORTED Can't get the corresponding NIC info from the Controller handle. 95 95 96 96 **/ 97 97 EFI_STATUS … … 111 111 return EFI_INVALID_PARAMETER; 112 112 } 113 113 114 114 Private = ISCSI_DRIVER_DATA_FROM_EXT_SCSI_PASS_THRU (IScsiExtScsiPassThru); 115 115 … … 123 123 VlanId = NetLibGetVlanId (Private->Controller); 124 124 IScsiMacAddrToStr (&MacAddress, (UINT32) HwAddressSize, VlanId, MacString); 125 125 126 126 UnicodeSPrint ( 127 127 HandleName, … … 184 184 @retval EFI_SUCCESS The Unicode string for the user readable name in the 185 185 language specified by Language for the driver 186 specified by This was returned in DriverName. 186 specified by This was returned in DriverName. 187 187 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL. 188 188 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE. … … 272 272 } 273 273 } 274 274 275 275 return LookupUnicodeString2 ( 276 276 Language, -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/ComponentName.h
r48674 r58466 35 35 by This does not support the language specified by Language, 36 36 then EFI_UNSUPPORTED is returned. 37 37 38 38 @param[in] This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. 39 39 @param[in] Language A pointer to a three characters ISO 639-2 language identifier. … … 90 90 @retval EFI_SUCCESS The Unicode string for the user readable name in the 91 91 language specified by Language for the driver 92 specified by This was returned in DriverName. 92 specified by This was returned in DriverName. 93 93 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL. 94 94 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE. … … 110 110 OUT CHAR16 **ControllerName 111 111 ); 112 112 113 113 // 114 114 // EFI iSCSI Initiator Name Protocol for IScsi driver. -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.h
r48674 r58466 30 30 /// MD5_HASHSIZE 31 31 /// 32 #define ISCSI_CHAP_RSP_LEN 16 32 #define ISCSI_CHAP_RSP_LEN 16 33 33 34 #define ISCSI_CHAP_INITIAL 0 34 #define ISCSI_CHAP_INITIAL 0 35 35 #define ISCSI_CHAP_STEP_ONE 1 36 36 #define ISCSI_CHAP_STEP_TWO 2 … … 74 74 This function checks the received iSCSI Login Response during the security 75 75 negotiation stage. 76 76 77 77 @param[in] Conn The iSCSI connection. 78 78 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c
r58459 r58466 40 40 END_DEVICE_PATH_TYPE, 41 41 END_ENTIRE_DEVICE_PATH_SUBTYPE, 42 { 42 { 43 43 (UINT8) (END_DEVICE_PATH_LENGTH), 44 44 (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8) … … 181 181 182 182 @retval EFI_SUCCESS The callback successfully handled the action. 183 @retval Others Other errors as indicated. 183 @retval Others Other errors as indicated. 184 184 **/ 185 185 EFI_STATUS … … 446 446 error. In this case, the 447 447 Progress parameter would be 448 set to NULL. 448 set to NULL. 449 449 @retval EFI_NOT_FOUND Routing data doesn't match any 450 450 known driver. Progress set to the … … 580 580 @param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. 581 581 @param[in] Configuration A null-terminated Unicode string in 582 <ConfigString> format. 582 <ConfigString> format. 583 583 @param[out] Progress A pointer to a string filled in with the 584 584 offset of the most recent '&' before the … … 590 590 591 591 @retval EFI_SUCCESS The results have been distributed or are 592 awaiting distribution. 592 awaiting distribution. 593 593 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the 594 594 parts of the results that must be … … 635 635 @param[in] QuestionId A unique value which is sent to the original 636 636 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 638 638 vary based on the opcode that enerated the callback. 639 639 @param[in] Type The type of value for the question. … … 649 649 @retval EFI_UNSUPPORTED The specified Action is not supported by the 650 650 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. 653 653 **/ 654 654 EFI_STATUS … … 712 712 } 713 713 } else if (Action == EFI_BROWSER_ACTION_CHANGED) { 714 switch (QuestionId) { 714 switch (QuestionId) { 715 715 case KEY_INITIATOR_NAME: 716 716 IScsiUnicodeStrToAsciiStr (IfrNvData->InitiatorName, IScsiName); … … 923 923 HiiSetBrowserData (&gIp4IScsiConfigGuid, mVendorStorageName, sizeof (ISCSI_CONFIG_IFR_NVDATA), (UINT8 *) IfrNvData, NULL); 924 924 } 925 925 926 926 FreePool (IfrNvData); 927 927 928 928 return Status; 929 929 } … … 1012 1012 if (EFI_ERROR (Status)) { 1013 1013 ZeroMem (&ConfigFormEntry->SessionConfigData, sizeof (ConfigFormEntry->SessionConfigData)); 1014 1014 1015 1015 // 1016 1016 // Generate OUI-format ISID based on MAC address. 1017 1017 // 1018 1018 CopyMem (ConfigFormEntry->SessionConfigData.IsId, &MacAddress, 6); 1019 ConfigFormEntry->SessionConfigData.IsId[0] = 1019 ConfigFormEntry->SessionConfigData.IsId[0] = 1020 1020 (UINT8) (ConfigFormEntry->SessionConfigData.IsId[0] & 0x3F); 1021 1021 } … … 1167 1167 ); 1168 1168 ASSERT_EFI_ERROR (Status); 1169 1169 1170 1170 // 1171 1171 // Publish our HII data … … 1194 1194 1195 1195 @param[in] DriverBindingHandle The iSCSI driverbinding handle. 1196 1196 1197 1197 @retval EFI_SUCCESS The iSCSI configuration form is unloaded. 1198 1198 @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.h
r58459 r58466 36 36 37 37 /** 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, 39 39 then this macro return a pointer to a data structure ISCSI_FORM_CALLBACK_INFO. 40 40 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. 47 47 48 48 If the data type ISCSI_FORM_CALLBACK_INFO_SIGNATURE does not contain the field 49 49 specified by Callback, then the module will not compile. 50 50 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, 52 52 then the module will not compile. 53 53 54 @param Callback Pointer to the specified field within the data 54 @param Callback Pointer to the specified field within the data 55 55 structure ISCSI_FORM_CALLBACK_INFO. 56 56 @return A pointer to the pointer to a data structure ISCSI_FORM_CALLBACK_INFO. … … 155 155 156 156 @param[in] DriverBindingHandle The iSCSI driverbinding handle. 157 157 158 158 @retval EFI_SUCCESS The iSCSI configuration form is unloaded. 159 159 @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 1 1 /** @file 2 2 Vfr file for iSCSI config. 3 3 4 4 Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 17 17 #define EFI_NETWORK_DEVICE_CLASS 0x04 18 18 19 formset 19 formset 20 20 guid = IP4_ISCSI_CONFIG_GUID, 21 21 title = STRING_TOKEN(STR_ISCSI_CONFIG_FORM_TITLE), … … 30 30 title = STRING_TOKEN(STR_ISCSI_MAIN_FORM_TITLE); 31 31 32 string varid = ISCSI_CONFIG_IFR_NVDATA.InitiatorName, 32 string varid = ISCSI_CONFIG_IFR_NVDATA.InitiatorName, 33 33 prompt = STRING_TOKEN(STR_ISCSI_CONFIG_INIT_NAME), 34 34 help = STRING_TOKEN(STR_ISCSI_CONFIG_INIT_NAME_HELP), … … 60 60 endcheckbox; 61 61 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, 64 64 prompt = STRING_TOKEN(STR_ISCSI_LOCAL_IP_ADDRESS), 65 65 help = STRING_TOKEN(STR_ISCSI_IP_ADDRESS_HELP), … … 70 70 endstring; 71 71 72 string varid = ISCSI_CONFIG_IFR_NVDATA.SubnetMask, 72 string varid = ISCSI_CONFIG_IFR_NVDATA.SubnetMask, 73 73 prompt = STRING_TOKEN(STR_ISCSI_LOCAL_MASK), 74 74 help = STRING_TOKEN(STR_ISCSI_IP_ADDRESS_HELP), … … 79 79 endstring; 80 80 81 string varid = ISCSI_CONFIG_IFR_NVDATA.Gateway, 81 string varid = ISCSI_CONFIG_IFR_NVDATA.Gateway, 82 82 prompt = STRING_TOKEN(STR_ISCSI_LOCAL_GATEWAY), 83 83 help = STRING_TOKEN(STR_ISCSI_IP_ADDRESS_HELP), … … 89 89 endif; 90 90 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; 94 94 checkbox varid = ISCSI_CONFIG_IFR_NVDATA.TargetInfoFromDhcp, 95 95 prompt = STRING_TOKEN(STR_ISCSI_ENABLE_DHCP_ON_TARGET), … … 98 98 endcheckbox; 99 99 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, 104 104 prompt = STRING_TOKEN(STR_ISCSI_TARGET_NAME), 105 105 help = STRING_TOKEN(STR_ISCSI_TARGET_NAME), … … 110 110 endstring; 111 111 112 string varid = ISCSI_CONFIG_IFR_NVDATA.TargetIp, 112 string varid = ISCSI_CONFIG_IFR_NVDATA.TargetIp, 113 113 prompt = STRING_TOKEN(STR_ISCSI_TARGET_IP_ADDRESS), 114 114 help = STRING_TOKEN(STR_ISCSI_IP_ADDRESS_HELP), … … 118 118 maxsize = IP_MAX_SIZE, 119 119 endstring; 120 121 numeric varid = ISCSI_CONFIG_IFR_NVDATA.TargetPort, 120 121 numeric varid = ISCSI_CONFIG_IFR_NVDATA.TargetPort, 122 122 prompt = STRING_TOKEN(STR_ISCSI_TARGET_PORT), 123 123 help = STRING_TOKEN(STR_ISCSI_TARGET_PORT), 124 124 flags = 0, 125 125 minimum = TARGET_PORT_MIN_NUM, 126 maximum = TARGET_PORT_MAX_NUM, 126 maximum = TARGET_PORT_MAX_NUM, 127 127 step = 0, 128 128 endnumeric; 129 130 string varid = ISCSI_CONFIG_IFR_NVDATA.BootLun, 129 130 string varid = ISCSI_CONFIG_IFR_NVDATA.BootLun, 131 131 prompt = STRING_TOKEN(STR_ISCSI_BOOT_LUN), 132 132 help = STRING_TOKEN(STR_ISCSI_BOOT_LUN_HELP), … … 138 138 endif; 139 139 140 subtitle text = STRING_TOKEN(STR_NULL); 140 subtitle text = STRING_TOKEN(STR_NULL); 141 141 142 142 oneof varid = ISCSI_CONFIG_IFR_NVDATA.CHAPType, 143 143 prompt = STRING_TOKEN(STR_CHAP_TYPE_PROMPT), 144 help = STRING_TOKEN(STR_CHAP_TYPE_HELP), 144 help = STRING_TOKEN(STR_CHAP_TYPE_HELP), 145 145 option text = STRING_TOKEN(STR_CHAP_TYPE_NONE), value = ISCSI_CHAP_NONE, flags = DEFAULT; 146 146 option text = STRING_TOKEN(STR_CHAP_TYPE_UNI), value = ISCSI_CHAP_UNI, flags = 0; … … 148 148 endoneof; 149 149 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, 153 153 prompt = STRING_TOKEN(STR_ISCSI_CHAP_NAME), 154 154 help = STRING_TOKEN(STR_ISCSI_CHAP_NAME), … … 159 159 endstring; 160 160 161 string varid = ISCSI_CONFIG_IFR_NVDATA.CHAPSecret, 161 string varid = ISCSI_CONFIG_IFR_NVDATA.CHAPSecret, 162 162 prompt = STRING_TOKEN(STR_ISCSI_CHAP_SECRET), 163 163 help = STRING_TOKEN(STR_ISCSI_CHAP_SECRET_HELP), … … 172 172 suppressif NOT ideqval ISCSI_CONFIG_IFR_NVDATA.CHAPType == ISCSI_CHAP_MUTUAL; 173 173 174 string varid = ISCSI_CONFIG_IFR_NVDATA.ReverseCHAPName, 174 string varid = ISCSI_CONFIG_IFR_NVDATA.ReverseCHAPName, 175 175 prompt = STRING_TOKEN(STR_ISCSI_REVERSE_CHAP_NAME), 176 176 help = STRING_TOKEN(STR_ISCSI_REVERSE_CHAP_NAME), … … 181 181 endstring; 182 182 183 string varid = ISCSI_CONFIG_IFR_NVDATA.ReverseCHAPSecret, 183 string varid = ISCSI_CONFIG_IFR_NVDATA.ReverseCHAPSecret, 184 184 prompt = STRING_TOKEN(STR_ISCSI_REVERSE_CHAP_SECRET), 185 185 help = STRING_TOKEN(STR_ISCSI_CHAP_SECRET_HELP), … … 192 192 endif; 193 193 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, 197 197 prompt = STRING_TOKEN(STR_ISCSI_CONFIG_ISID), 198 198 help = STRING_TOKEN(STR_ISCSI_CONFIG_ISID_HELP), … … 203 203 endstring; 204 204 205 subtitle text = STRING_TOKEN(STR_NULL); 205 subtitle text = STRING_TOKEN(STR_NULL); 206 206 207 207 text … … 210 210 flags = INTERACTIVE, 211 211 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), 215 215 help = STRING_TOKEN (STR_RETURN_MAIN_FORM), 216 216 flags = 0; -
Property svn:eol-style
set to
-
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigDxeStrings.uni
-
Property svn:mime-type
changed from
application/octet-stream
totext/plain;encoding=UTF-16LE
-
Property svn:mime-type
changed from
-
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.c
r48674 r58466 96 96 goto ON_EXIT; 97 97 } 98 98 99 99 if ((Fields[RP_FIELD_IDX_SERVERNAME].Str == NULL) || 100 100 (Fields[RP_FIELD_IDX_TARGETNAME].Str == NULL) || … … 171 171 The callback function registerd to the DHCP4 instance which is used to select 172 172 the qualified DHCP OFFER. 173 173 174 174 @param[in] This The DHCP4 protocol. 175 175 @param[in] Context The context set when configuring the DHCP4 protocol. 176 176 @param[in] CurrentState The current state of the DHCP4 protocol. 177 177 @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. 179 179 @param[out] NewPacket The packet used to replace the above Packet. 180 180 181 181 @retval EFI_SUCCESS Either the DHCP OFFER is qualified or we're not intereseted 182 182 in the Dhcp4Event. … … 338 338 /** 339 339 Parse the DHCP ACK to get the address configuration and DNS information. 340 340 341 341 @param[in] Image The handle of the driver image. 342 342 @param[in] Controller The handle of the controller; -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.h
r48674 r58466 41 41 /** 42 42 Parse the DHCP ACK to get the address configuration and DNS information. 43 43 44 44 @param[in] Image The handle of the driver image. 45 45 @param[in] Controller The handle of the controller; -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c
r58459 r58466 25 25 26 26 /** 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 35 35 bus driver. 36 36 … … 63 63 64 64 /** 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, 66 66 it further tests to see if this driver supports creating a handle for the specified child device. 67 67 68 68 @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 71 71 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. 73 73 This parameter is ignored by device drivers, and is optional for bus drivers. 74 74 … … 143 143 144 144 /** 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 150 150 restrictions must be followed or the system behavior will not be deterministic. 151 151 1. ControllerHandle must be a valid EFI_HANDLE. … … 153 153 EFI_DEVICE_PATH_PROTOCOL. 154 154 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. 156 156 157 157 @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 160 160 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. 162 162 This parameter is ignored by device drivers, and is optional for bus drivers. 163 163 … … 215 215 216 216 // 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 218 218 // keep the relationship between ControllerHandle and ChildHandle. 219 219 // … … 287 287 Private->ExtScsiPassThruHandle, 288 288 EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER 289 ); 289 ); 290 290 if (EFI_ERROR (Status)) { 291 291 gBS->UninstallMultipleProtocolInterfaces ( … … 297 297 NULL 298 298 ); 299 299 300 300 goto ON_ERROR; 301 301 } … … 316 316 317 317 /** 318 Stop this driver on ControllerHandle. 319 318 Stop this driver on ControllerHandle. 319 320 320 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, 324 324 but the following calling restrictions must be followed or the system behavior will not be deterministic. 325 325 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this … … 329 329 Start() function, and the Start() function must have called OpenProtocol() on 330 330 ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. 331 331 332 332 @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 335 335 to use to stop the device. 336 336 @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 338 338 if NumberOfChildren is 0.Not used. 339 339 … … 387 387 Private->ExtScsiPassThruHandle 388 388 ); 389 389 390 390 gBS->CloseProtocol ( 391 391 Conn->Tcp4Io.Handle, … … 509 509 goto ON_EXIT; 510 510 } 511 } 511 } 512 512 513 513 // … … 539 539 } 540 540 } 541 541 542 542 Status = gBS->HandleProtocol ( 543 543 gIScsiDriverBinding.DriverBindingHandle, … … 570 570 FreePool (DeviceHandleBuffer); 571 571 } 572 572 573 573 return Status; 574 574 } … … 577 577 This is the declaration of an EFI image entry point. This entry point is 578 578 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 580 580 publish the driver binding protocol. 581 581 … … 645 645 return Status; 646 646 } 647 647 648 648 // 649 649 // Initialize the configuration form of iSCSI. -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.h
r48674 r58466 39 39 40 40 /** 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, 42 42 it further tests to see if this driver supports creating a handle for the specified child device. 43 43 44 44 @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 47 47 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. 49 49 This parameter is ignored by device drivers, and is optional for bus drivers. 50 50 … … 71 71 72 72 /** 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, 77 77 but the following calling restrictions must be followed or the system behavior will not be deterministic. 78 78 1. ControllerHandle must be a valid EFI_HANDLE. … … 80 80 EFI_DEVICE_PATH_PROTOCOL. 81 81 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. 83 83 84 84 @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 87 87 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. 89 89 This parameter is ignored by device drivers, and is optional for bus drivers. 90 90 … … 104 104 105 105 /** 106 Stop this driver on ControllerHandle. 107 106 Stop this driver on ControllerHandle. 107 108 108 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, 112 112 but the following calling restrictions must be followed or the system behavior will not be deterministic. 113 113 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this … … 117 117 Start() function, and the Start() function must have called OpenProtocol() on 118 118 ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. 119 119 120 120 @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 123 123 to use to stop the device. 124 124 @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 126 126 if NumberOfChildren is 0.Not used. 127 127 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiExtScsiPassThru.c
r58459 r58466 16 16 17 17 /** 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 19 19 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. 21 21 22 22 @param[in] This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance. … … 43 43 could be transferred is returned in InTransferLength. For write 44 44 and bi-directional commands, OutTransferLength bytes were 45 transferred by OutDataBuffer. Currently not implemeted. 45 transferred by OutDataBuffer. Currently not implemeted. 46 46 @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. 48 48 @retval EFI_DEVICE_ERROR A device error occurred while attempting to send the SCSI Request 49 Packet. 49 Packet. 50 50 @retval EFI_INVALID_PARAMETER Target, Lun, or the contents of ScsiRequestPacket are invalid. 51 51 @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not supported … … 54 54 Packet was not sent, so no additional status information is available. 55 55 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. 57 57 **/ 58 58 EFI_STATUS … … 68 68 ISCSI_DRIVER_DATA *Private; 69 69 ISCSI_SESSION_CONFIG_NVDATA *ConfigNvData; 70 EFI_STATUS Status; 70 EFI_STATUS Status; 71 71 72 72 Private = ISCSI_DRIVER_DATA_FROM_EXT_SCSI_PASS_THRU (This); … … 97 97 98 98 /** 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 100 100 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. 104 104 105 105 @param[in] This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance. … … 311 311 Resets a SCSI channel. This operation resets all the SCSI devices connected to the SCSI channel. 312 312 Currently not implemented. 313 313 314 314 @param[in] This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance. 315 315 … … 359 359 360 360 /** 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 362 362 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. 365 365 366 366 @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 20 20 /** 21 21 Initialize the header of the iSCSI Boot Firmware Table. 22 22 23 23 @param[out] Header The header of the iSCSI Boot Firmware Table. 24 24 @param[in] OemId The OEM ID. … … 38 38 Header->Revision = EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_REVISION; 39 39 Header->Checksum = 0; 40 40 41 41 CopyMem (Header->OemId, OemId, sizeof (Header->OemId)); 42 42 CopyMem (&Header->OemTableId, OemTableId, sizeof (UINT64)); … … 45 45 /** 46 46 Initialize the control section of the iSCSI Boot Firmware Table. 47 47 48 48 @param[in] Table The ACPI table. 49 49 @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 20 20 Removes (trims) specified leading and trailing characters from a string. 21 21 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. 24 24 25 25 @param[in] CharC Character will be trimmed from str. … … 33 33 CHAR16 *Pointer1; 34 34 CHAR16 *Pointer2; 35 35 36 36 if (*Str == 0) { 37 37 return; 38 38 } 39 39 40 40 // 41 41 // Trim off the leading and trailing characters c … … 44 44 ; 45 45 } 46 46 47 47 Pointer2 = Str; 48 48 if (Pointer2 == Pointer1) { … … 52 52 } 53 53 } else { 54 while (*Pointer1 != 0) { 55 *Pointer2 = *Pointer1; 54 while (*Pointer1 != 0) { 55 *Pointer2 = *Pointer1; 56 56 Pointer1++; 57 57 Pointer2++; … … 59 59 *Pointer2 = 0; 60 60 } 61 62 61 62 63 63 for (Pointer1 = Str + StrLen(Str) - 1; Pointer1 >= Str && *Pointer1 == CharC; Pointer1--) { 64 64 ; 65 65 } 66 if (Pointer1 != Str + StrLen(Str) - 1) { 66 if (Pointer1 != Str + StrLen(Str) - 1) { 67 67 *(Pointer1 + 1) = 0; 68 68 } … … 110 110 111 111 /** 112 Convert the hexadecimal encoded LUN string into the 64-bit LUN. 112 Convert the hexadecimal encoded LUN string into the 64-bit LUN. 113 113 114 114 @param[in] Str The hexadecimal encoded LUN string. … … 128 128 UINT8 TemValue; 129 129 UINT16 Value[4]; 130 130 131 131 ZeroMem (Lun, 8); 132 132 ZeroMem (TemStr, 2); 133 133 ZeroMem ((UINT8 *) Value, sizeof (Value)); 134 SizeStr = AsciiStrLen (Str); 134 SizeStr = AsciiStrLen (Str); 135 135 IndexValue = 0; 136 136 IndexNum = 0; … … 147 147 } 148 148 } 149 149 150 150 if ((TemValue == 0) && (TemStr[0] == '-')) { 151 151 // … … 164 164 continue; 165 165 } 166 166 167 167 if (++IndexNum > 4) { 168 // 168 // 169 169 // Each Lun Str can't exceed size 4, because it will be as UINT16 value 170 170 // 171 171 return EFI_INVALID_PARAMETER; 172 172 } 173 173 174 174 // 175 175 // Combine UINT16 value … … 177 177 Value[IndexValue] = (UINT16) ((Value[IndexValue] << 4) + TemValue); 178 178 } 179 179 180 180 for (Index = 0; Index <= IndexValue; Index ++) { 181 181 *((UINT16 *) &Lun[Index * 2]) = HTONS (Value[Index]); 182 182 } 183 183 184 184 return EFI_SUCCESS; 185 185 } … … 393 393 @param[in, out] HexLength The length of the string. 394 394 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 396 396 and the length of the string is updated. 397 397 @retval EFI_BUFFER_TOO_SMALL The string is too small. … … 456 456 UINT8 Digit; 457 457 CHAR8 TemStr[2]; 458 458 459 459 ZeroMem (TemStr, sizeof (TemStr)); 460 460 … … 465 465 HexStr += 2; 466 466 } 467 467 468 468 Length = AsciiStrLen (HexStr); 469 469 … … 483 483 } 484 484 } 485 485 486 486 *BinLength = (UINT32) ((Index + 1)/2); 487 487 … … 622 622 623 623 @param[in] Controller The handle of the controller. 624 624 625 625 @retval TRUE The handle of the controller need the Dhcp protocol. 626 626 @retval FALSE The handle of the controller does not need the Dhcp protocol. 627 627 628 628 **/ 629 629 BOOLEAN … … 812 812 813 813 DPathNode->Ipv4.LocalPort = 0; 814 DPathNode->Ipv4.StaticIpAddress = 814 DPathNode->Ipv4.StaticIpAddress = 815 815 (BOOLEAN) (!Session->ConfigData.NvData.InitiatorInfoFromDhcp); 816 816 … … 862 862 is performed by evaluating if the the protocol specified by ProtocolGuid is 863 863 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. 865 865 If ProtocolGuid is NULL, then ASSERT(). 866 866 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.h
r58459 r58466 61 61 62 62 /** 63 Convert the hexadecimal encoded LUN string into the 64-bit LUN. 63 Convert the hexadecimal encoded LUN string into the 64-bit LUN. 64 64 65 65 @param[in] Str The hexadecimal encoded LUN string. … … 154 154 @param[in, out] HexLength The length of the string. 155 155 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 157 157 and the length of the string is updated. 158 158 @retval EFI_BUFFER_TOO_SMALL The string is too small. … … 226 226 227 227 @param[in] Controller The handle of the controller. 228 228 229 229 @retval TRUE The handle of the controller need the Dhcp protocol. 230 230 @retval FALSE The handle of the controller does not need the Dhcp protocol. 231 231 232 232 **/ 233 233 BOOLEAN … … 283 283 is performed by evaluating if the the protocol specified by ProtocolGuid is 284 284 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. 286 286 If ProtocolGuid is NULL, then ASSERT(). 287 287 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c
r58459 r58466 18 18 19 19 /** 20 Attach the iSCSI connection to the iSCSI session. 20 Attach the iSCSI connection to the iSCSI session. 21 21 22 22 @param[in, out] Session The iSCSI session. … … 35 35 36 36 /** 37 Detach the iSCSI connection from the session it belongs to. 37 Detach the iSCSI connection from the session it belongs to. 38 38 39 39 @param[in, out] Conn The iSCSI connection. … … 50 50 51 51 /** 52 Check the sequence number according to RFC3720. 52 Check the sequence number according to RFC3720. 53 53 54 54 @param[in, out] ExpSN The currently expected sequence number. … … 117 117 @retval EFI_SUCCESS The iSCSI connection is logged into the iSCSI target. 118 118 @retval EFI_TIMEOUT Timeout happened during the login procedure. 119 @retval Others Other errors as indicated. 119 @retval Others Other errors as indicated. 120 120 **/ 121 121 EFI_STATUS … … 382 382 383 383 @param[in] Conn The connection in the iSCSI login phase. 384 384 385 385 @retval EFI_SUCCESS The iSCSI login response PDU is received and processed. 386 386 @retval Others Other errors as indicated. … … 808 808 TargetAddress key-value list. 809 809 @param[in] Len Length of the data. 810 810 811 811 @retval EFI_SUCCESS The target address is updated. 812 812 @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. … … 1846 1846 NetbufFree (PduHeader); 1847 1847 return NULL; 1848 } 1848 } 1849 1849 Header = (ISCSI_ADDITIONAL_HEADER *) (ScsiCmd + 1); 1850 1850 … … 2502 2502 @param[in, out] Packet The request packet containing IO request, SCSI command 2503 2503 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 2506 2506 the Packet. 2507 2507 @retval EFI_DEVICE_ERROR Session state was not as required. … … 2620 2620 goto ON_EXIT; 2621 2621 } 2622 TimeoutEvent = Conn->TimeoutEvent; 2622 TimeoutEvent = Conn->TimeoutEvent; 2623 2623 } 2624 2624 // -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.h
r58459 r58466 622 622 623 623 /** 624 Attach the iSCSI connection to the iSCSI session. 624 Attach the iSCSI connection to the iSCSI session. 625 625 626 626 @param[in, out] Session The iSCSI session. … … 634 634 635 635 /** 636 Detach the iSCSI connection from the session it belongs to. 636 Detach the iSCSI connection from the session it belongs to. 637 637 638 638 @param[in, out] Conn The iSCSI connection. … … 650 650 @retval EFI_SUCCESS The iSCSI connection is logged into the iSCSI target. 651 651 @retval EFI_TIMEOUT Timeout happened during the login procedure. 652 @retval Others Other errors as indicated. 652 @retval Others Other errors as indicated. 653 653 **/ 654 654 EFI_STATUS … … 717 717 718 718 @param[in] Conn The connection in the iSCSI login phase. 719 719 720 720 @retval EFI_SUCCESS The iSCSI login response PDU is received and processed. 721 721 @retval Others Other errors as indicated. … … 786 786 TargetAddress key-value list. 787 787 @param[in] Len Length of the data. 788 788 789 789 @retval EFI_SUCCESS The target address is updated. 790 790 @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. … … 946 946 @param[in, out] Packet The request packet containing IO request, SCSI command 947 947 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 950 950 the Packet. 951 951 @retval EFI_DEVICE_ERROR Session state was not as required. … … 986 986 IN BOOLEAN Recovery 987 987 ); 988 988 989 989 /** 990 990 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 16 16 17 17 /** 18 The common notify function associated with various Tcp4Io events. 18 The common notify function associated with various Tcp4Io events. 19 19 20 20 @param[in] Event The event signaled. … … 32 32 33 33 /** 34 Create a TCP socket with the specified configuration data. 34 Create a TCP socket with the specified configuration data. 35 35 36 36 @param[in] Image The handle of the driver image. … … 38 38 @param[in] ConfigData The Tcp4 configuration data. 39 39 @param[in] Tcp4Io The Tcp4Io. 40 40 41 41 @retval EFI_SUCCESS The TCP socket is created and configured. 42 42 @retval Others Failed to create the TCP socket or configure it. … … 231 231 232 232 /** 233 Destroy the socket. 233 Destroy the socket. 234 234 235 235 @param[in] Tcp4Io The Tcp4Io which wraps the socket to be destroyeds. … … 270 270 @param[in, out] Tcp4Io The Tcp4Io wrapping the TCP socket. 271 271 @param[in] Timeout The time to wait for connection done. 272 272 273 273 @retval EFI_SUCCESS Connect to the other endpoint of the TCP socket successfully. 274 274 @retval EFI_TIMEOUT Failed to connect to the other endpoint of the TCP socket in the specified time period. … … 336 336 @param[in] Tcp4Io The Tcp4Io wrapping the TCP socket. 337 337 @param[in] Packet The packet to transmit. 338 338 339 339 @retval EFI_SUCCESS The packet is trasmitted. 340 340 @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.h
r48674 r58466 47 47 48 48 /** 49 Create a TCP socket with the specified configuration data. 49 Create a TCP socket with the specified configuration data. 50 50 51 51 @param[in] Image The handle of the driver image. … … 53 53 @param[in] ConfigData The Tcp4 configuration data. 54 54 @param[in] Tcp4Io The Tcp4Io. 55 55 56 56 @retval EFI_SUCCESS The TCP socket is created and configured. 57 57 @retval Others Failed to create the TCP socket or configure it. … … 66 66 67 67 /** 68 Destroy the socket. 68 Destroy the socket. 69 69 70 70 @param[in] Tcp4Io The Tcp4Io which wraps the socket to be destroyeds. … … 80 80 @param[in, out] Tcp4Io The Tcp4Io wrapping the TCP socket. 81 81 @param[in] Timeout The time to wait for connection done. 82 82 83 83 @retval EFI_SUCCESS Connect to the other endpoint of the TCP socket successfully. 84 84 @retval EFI_TIMEOUT Failed to connect to the other endpoint of the TCP socket in the specified time period. … … 106 106 @param[in] Tcp4Io The Tcp4Io wrapping the TCP socket. 107 107 @param[in] Packet The packet to transmit. 108 108 109 109 @retval EFI_SUCCESS The packet is trasmitted. 110 110 @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/Md5.c
r48674 r58466 58 58 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 59 59 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 68 68 }; 69 69 … … 80 80 /** 81 81 Tf1 is one basic MD5 transform function. 82 82 83 83 @param[in] A A 32-bit quantity. 84 @param[in] B A 32-bit quantity. 84 @param[in] B A 32-bit quantity. 85 85 @param[in] C A 32-bit quantity. 86 86 87 87 @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 **/ 90 UINT32 91 91 Tf1 ( 92 IN UINT32 A, 93 IN UINT32 B, 92 IN UINT32 A, 93 IN UINT32 B, 94 94 IN UINT32 C 95 95 ) … … 100 100 /** 101 101 Tf2 is one basic MD5 transform function. 102 102 103 103 @param[in] A A 32-bit quantity. 104 @param[in] B A 32-bit quantity. 104 @param[in] B A 32-bit quantity. 105 105 @param[in] C A 32-bit quantity. 106 106 107 107 @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 **/ 110 UINT32 111 111 Tf2 ( 112 IN UINT32 A, 113 IN UINT32 B, 112 IN UINT32 A, 113 IN UINT32 B, 114 114 IN UINT32 C 115 115 ) … … 120 120 /** 121 121 Tf3 is one basic MD5 transform function. 122 122 123 123 @param[in] A A 32-bit quantity. 124 @param[in] B A 32-bit quantity. 124 @param[in] B A 32-bit quantity. 125 125 @param[in] C A 32-bit quantity. 126 126 127 127 @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 **/ 130 UINT32 131 131 Tf3 ( 132 IN UINT32 A, 133 IN UINT32 B, 132 IN UINT32 A, 133 IN UINT32 B, 134 134 IN UINT32 C 135 135 ) … … 140 140 /** 141 141 Tf4 is one basic MD5 transform function. 142 142 143 143 @param[in] A A 32-bit quantity. 144 @param[in] B A 32-bit quantity. 144 @param[in] B A 32-bit quantity. 145 145 @param[in] C A 32-bit quantity. 146 146 147 147 @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 **/ 150 UINT32 151 151 Tf4 ( 152 IN UINT32 A, 153 IN UINT32 B, 152 IN UINT32 A, 153 IN UINT32 B, 154 154 IN UINT32 C 155 155 ) … … 221 221 If the length of data segment is larger than 64 bytes, then does the transform 222 222 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. 224 224 All of Md5 code generated for the sequential 64-bytes data segaments are be 225 225 accumulated in MD5Final() function. … … 242 242 CopyMem (Md5Ctx->M + Md5Ctx->Count, (VOID *)Data, Limit); 243 243 MD5Transform (Md5Ctx); 244 244 245 245 Md5Ctx->Count = 0; 246 246 Data += Limit; … … 272 272 Md5Ctx->States[1] = 0xefcdab89; 273 273 Md5Ctx->States[2] = 0x98badcfe; 274 Md5Ctx->States[3] = 0x10325476; 274 Md5Ctx->States[3] = 0x10325476; 275 275 276 276 return EFI_SUCCESS; … … 329 329 CopyMem (HashVal, (UINT8 *) Md5Ctx->States, MD5_HASHSIZE); 330 330 ZeroMem ((UINT8 *)Md5Ctx, sizeof (*Md5Ctx)); 331 331 332 332 return EFI_SUCCESS; 333 333 } -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/IScsiDxe/Md5.h
r48674 r58466 20 20 #include <Library/BaseMemoryLib.h> 21 21 #include <Library/NetLib.h> 22 22 23 23 #define MD5_HASHSIZE 16 24 24 … … 78 78 ); 79 79 80 #endif 80 #endif -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4ConfigDxe/ComponentName.c
r48674 r58466 1 1 /** @file 2 2 UEFI Component Name(2) protocol implementation for Ip4ConfigDxe driver. 3 3 4 4 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 62 62 number of languages supported by a driver is up 63 63 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. 65 65 @param DriverName[out] A pointer to the Unicode string to return. 66 66 This Unicode string is the name of the … … 135 135 Language from the point of view of the driver 136 136 specified by This. 137 137 138 138 @retval EFI_SUCCESS The Unicode string for the user readable name in 139 139 the language specified by Language for the -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c
r58459 r58466 146 146 // cable swap, a new round auto configuration will be initiated. The timer 147 147 // starts in DHCP policy only. STATIC policy stops the timer. 148 // 148 // 149 149 if (NicConfig->Source == IP4_CONFIG_SOURCE_DHCP) { 150 150 gBS->SetTimer (Instance->Timer, TimerPeriodic, TICKS_PER_SECOND); … … 152 152 gBS->SetTimer (Instance->Timer, TimerCancel, 0); 153 153 } 154 154 155 155 return Status; 156 156 } … … 692 692 /** 693 693 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 695 695 will signal the IP4 to run the auto configuration again. IP4 driver will free 696 696 old IP address related resource, such as route table and Interface, then … … 712 712 EFI_STATUS Status; 713 713 EFI_SIMPLE_NETWORK_MODE SnpModeData; 714 IP4_CONFIG_INSTANCE *Instance; 714 IP4_CONFIG_INSTANCE *Instance; 715 715 716 716 Instance = (IP4_CONFIG_INSTANCE *) Context; 717 717 718 718 OldMediaPresent = Instance->MediaPresent; 719 719 720 720 // 721 721 // Get fresh mode data from MNP, since underlying media status may change … … 733 733 // 734 734 // 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 737 737 // create route table for new IP address. 738 738 // -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.h
r58459 r58466 136 136 137 137 // 138 // Underlying media present status. 138 // Underlying media present status. 139 139 // 140 140 BOOLEAN MediaPresent; … … 514 514 /** 515 515 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 517 517 will signal the IP4 to run the auto configuration again. IP4 driver will free 518 518 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 498 498 Instance->Timer = NULL; 499 499 } 500 500 501 501 Ip4ConfigCleanConfig (Instance); 502 502 FreePool (Instance); -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDxe.vfr
-
Property svn:eol-style
set to
native
r58459 r58466 79 79 80 80 subtitle text = STRING_TOKEN(STR_NULL); 81 81 82 82 text 83 83 help = STRING_TOKEN(STR_SAVE_CHANGES), … … 85 85 flags = INTERACTIVE, 86 86 key = KEY_SAVE_CHANGES; 87 87 88 88 endform; 89 89 -
Property svn:eol-style
set to
-
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDxeStrings.uni
-
Property svn:mime-type
changed from
application/octet-stream
totext/plain;encoding=UTF-16LE
-
Property svn:mime-type
changed from
-
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/ComponentName.c
r58459 r58466 1 1 /** @file 2 2 3 3 Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR> 4 4 This program and the accompanying materials … … 238 238 @param Ip4[in] A pointer to the EFI_IP4_PROTOCOL. 239 239 240 240 241 241 @retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully. 242 242 @retval EFI_INVALID_PARAMETER The input parameter is invalid. 243 243 244 244 **/ 245 245 EFI_STATUS … … 291 291 return Status; 292 292 } 293 293 294 294 return AddUnicodeString2 ( 295 295 "en", … … 379 379 ) 380 380 { 381 EFI_STATUS Status; 381 EFI_STATUS Status; 382 382 EFI_IP4_PROTOCOL *Ip4; 383 383 384 384 // 385 385 // Only provide names for child handles. … … 389 389 } 390 390 391 // 392 // Make sure this driver produced ChildHandle 393 // 391 // 392 // Make sure this driver produced ChildHandle 393 // 394 394 Status = EfiTestChildHandle ( 395 395 ControllerHandle, … … 401 401 } 402 402 403 // 404 // Retrieve an instance of a produced protocol from ChildHandle 405 // 403 // 404 // Retrieve an instance of a produced protocol from ChildHandle 405 // 406 406 Status = gBS->OpenProtocol ( 407 407 ChildHandle, -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Common.h
r58459 r58466 1 1 /** @file 2 2 Common definition for IP4. 3 3 4 4 Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c
r58459 r58466 396 396 /** 397 397 Callback function which provided by user to remove one node in NetDestroyLinkList process. 398 398 399 399 @param[in] Entry The entry to be removed. 400 400 @param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList. … … 563 563 { 564 564 EFI_SERVICE_BINDING_PROTOCOL *ServiceBinding; 565 IP4_SERVICE *IpSb; 565 IP4_SERVICE *IpSb; 566 566 EFI_HANDLE NicHandle; 567 EFI_STATUS Status; 567 EFI_STATUS Status; 568 568 INTN State; 569 569 LIST_ENTRY *List; … … 689 689 Ip4FreeInterface (IpSb->DefaultInterface, NULL); 690 690 Ip4FreeRouteTable (IpSb->DefaultRouteTable); 691 691 692 692 IpIf = Ip4CreateInterface (IpSb->Mnp, IpSb->Controller, IpSb->Image); 693 693 if (IpIf == NULL) { … … 699 699 goto ON_ERROR;; 700 700 } 701 701 702 702 IpSb->DefaultInterface = IpIf; 703 703 InsertHeadList (&IpSb->Interfaces, &IpIf->Link); … … 727 727 ServiceBinding 728 728 ); 729 729 730 730 if (gIp4ControllerNameTable != NULL) { 731 731 FreeUnicodeStringTable (gIp4ControllerNameTable); -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.h
r58459 r58466 35 35 the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including 36 36 both device drivers and bus drivers. 37 37 38 38 The entry point for IP4 driver which install the driver 39 39 binding and component name protocol on its image. … … 115 115 must follow these calling restrictions. If any other agent wishes 116 116 to call Stop() it must also follow these calling restrictions. 117 117 118 118 @param[in] This Protocol instance pointer. 119 119 @param[in] ControllerHandle Handle of device to stop driver on … … 140 140 /** 141 141 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. 145 145 If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle. 146 146 147 147 @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance. 148 148 @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, 150 150 then the protocol is added to the existing UEFI handle. 151 151 … … 166 166 /** 167 167 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 171 171 last protocol on ChildHandle, then ChildHandle is destroyed. 172 172 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
r58459 r58466 25 25 FILE_GUID = 9FB1A1F3-3B71-4324-B39A-745CBB015FFF 26 26 MODULE_TYPE = UEFI_DRIVER 27 VERSION_STRING = 1.0 27 VERSION_STRING = 1.0 28 28 ENTRY_POINT = Ip4DriverEntryPoint 29 29 UNLOAD_IMAGE = NetLibDefaultUnload … … 34 34 # VALID_ARCHITECTURES = IA32 X64 IPF EBC 35 35 # 36 # DRIVER_BINDING = gIp4DriverBinding 36 # DRIVER_BINDING = gIp4DriverBinding 37 37 # COMPONENT_NAME = gIp4ComponentName 38 38 # COMPONENT_NAME2 = gIp4ComponentName2 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.c
r58459 r58466 73 73 Process the ICMP redirect. Find the instance then update 74 74 its route cache. 75 75 76 76 All kinds of redirect is treated as host redirect as 77 77 specified by RFC1122 3.3.1.2: … … 81 81 message;" 82 82 83 @param[in] IpSb The IP4 service binding instance that received 83 @param[in] IpSb The IP4 service binding instance that received 84 84 the packet. 85 85 @param[in] Head The IP head of the received ICMPpacket. … … 167 167 @retval EFI_INVALID_PARAMETER The packet is invalid 168 168 @retval Others Failed to process the packet. 169 169 170 170 **/ 171 171 EFI_STATUS -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.h
r48674 r58466 1 1 /** @file 2 2 Header file for ICMP protocol. 3 3 4 4 Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c
r58459 r58466 1 1 /** @file 2 2 Implement IP4 pesudo interface. 3 3 4 4 Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 69 69 @param Context The context of the callback, a point to the ARP 70 70 queue. 71 71 72 72 **/ 73 73 VOID … … 140 140 @param[in] Context Opaque parameter to the call back. 141 141 142 @retval Token The wrapped token if succeed 142 @retval Token The wrapped token if succeed 143 143 @retval NULL The wrapped token if NULL 144 144 … … 862 862 @param Context The context of the callback, a point to the ARP 863 863 queue. 864 864 865 865 **/ 866 866 VOID -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.h
r58459 r58466 1 1 /** @file 2 2 Definition for IP4 pesudo interface structure. 3 3 4 4 Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Igmp.c
r48674 r58466 1 1 /** @file 2 2 This file implements the RFC2236: IGMP v2. 3 3 4 4 Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
r58459 r58466 659 659 660 660 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, 663 663 // but some IP children may have referenced the default interface before it is configured, 664 664 // these IP instances also consume this ARP protocol so they need to open it BY_CHILD_CONTROLLER. … … 2001 2001 2002 2002 RawHdrLen = (UINT8) (RawHdrLen << 2); 2003 2003 2004 2004 CopyMem (&Head, FirstFragment, IP4_MIN_HEADLEN); 2005 2005 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.h
r58459 r58466 1 1 /** @file 2 2 Ip4 internal functions and type defintions. 3 3 4 4 Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.c
r58459 r58466 1 1 /** @file 2 2 IP4 input process. 3 3 4 4 Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 440 440 441 441 /** 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. 444 444 445 445 @param[in] Arg The wrap context … … 468 468 469 469 /** 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 471 471 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. 473 473 474 474 @param[in] IpSb The IP4 service instance. … … 477 477 @param[in, out] Options The caller supplied options. 478 478 @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, 480 480 EfiIPsecInBound or EfiIPsecOutBound. 481 481 @param[in] Context The token's wrap. … … 484 484 @retval EFI_SUCCESS The packet was bypassed and all buffers remain the same. 485 485 @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. 487 487 @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 489 489 number of input data blocks when build a fragment table. 490 490 … … 517 517 IpSecWrap = NULL; 518 518 FragmentTable = NULL; 519 TxWrap = (IP4_TXTOKEN_WRAP *) Context; 519 TxWrap = (IP4_TXTOKEN_WRAP *) Context; 520 520 FragmentCount = Packet->BlockOpNum; 521 521 522 522 ZeroMem (&ZeroHead, sizeof (IP4_HEAD)); 523 523 524 524 if (mIpSec == NULL) { 525 525 gBS->LocateProtocol (&gEfiIpSec2ProtocolGuid, NULL, (VOID **) &mIpSec); … … 535 535 // 536 536 // If IPsec is disabled, restore the original MTU 537 // 537 // 538 538 IpSb->MaxPacketSize = IpSb->OldMaxPacketSize; 539 539 goto ON_EXIT; 540 540 } else { 541 541 // 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; 545 545 } 546 546 … … 554 554 goto ON_EXIT; 555 555 } 556 556 557 557 Status = NetbufBuildExt (Packet, FragmentTable, &FragmentCount); 558 558 559 559 // 560 560 // Record the original FragmentTable and count. … … 572 572 // 573 573 Ip4NtohHead (*Head); 574 574 575 575 Status = mIpSec->ProcessExt ( 576 576 mIpSec, … … 590 590 // 591 591 Ip4NtohHead (*Head); 592 592 593 593 if (EFI_ERROR (Status)) { 594 594 FreePool (OriginalFragmentTable); … … 610 610 611 611 if (Direction == EfiIPsecOutBound && TxWrap != NULL) { 612 612 613 613 TxWrap->IpSecRecycleSignal = RecycleEvent; 614 614 TxWrap->Packet = NetbufFromExt ( … … 635 635 NetIpSecNetbufFree (*Netbuf); 636 636 *Netbuf = TxWrap->Packet; 637 637 638 638 } else { 639 639 640 640 IpSecWrap = AllocateZeroPool (sizeof (IP4_IPSEC_WRAP)); 641 641 642 642 if (IpSecWrap == NULL) { 643 643 Status = EFI_OUT_OF_RESOURCES; … … 645 645 goto ON_EXIT; 646 646 } 647 647 648 648 IpSecWrap->IpSecRecycleSignal = RecycleEvent; 649 649 IpSecWrap->Packet = Packet; 650 650 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, 656 656 IpSecWrap 657 657 ); 658 658 659 659 if (Packet == NULL) { 660 660 Packet = IpSecWrap->Packet; … … 686 686 Pre-process the IPv4 packet. First validates the IPv4 packet, and 687 687 then reassembles packet if it is necessary. 688 688 689 689 @param[in] IpSb Pointer to IP4_SERVICE. 690 690 @param[in, out] Packet Pointer to the Packet to be processed. … … 696 696 697 697 @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. 699 699 700 700 **/ … … 705 705 IN IP4_HEAD *Head, 706 706 IN UINT8 *Option, 707 IN UINT32 OptionLen, 707 IN UINT32 OptionLen, 708 708 IN UINT32 Flag 709 ) 709 ) 710 710 { 711 711 IP4_CLIP_INFO *Info; … … 720 720 return EFI_INVALID_PARAMETER; 721 721 } 722 722 723 723 HeadLen = (Head->HeadLen << 2); 724 724 TotalLen = NTOHS (Head->TotalLen); … … 769 769 // there is no option to save some CPU process. 770 770 // 771 771 772 772 if ((OptionLen > 0) && !Ip4OptionIsValid (Option, OptionLen, TRUE)) { 773 773 return EFI_INVALID_PARAMETER; … … 810 810 } 811 811 } 812 812 813 813 return EFI_SUCCESS; 814 814 } … … 842 842 UINT8 *Option; 843 843 UINT32 OptionLen; 844 844 845 845 IpSb = (IP4_SERVICE *) Context; 846 846 Option = NULL; … … 861 861 // 862 862 Status = Ip4PreProcessPacket ( 863 IpSb, 864 &Packet, 865 Head, 863 IpSb, 864 &Packet, 865 Head, 866 866 Option, 867 OptionLen, 867 OptionLen, 868 868 Flag 869 869 ); … … 890 890 goto RESTART; 891 891 } 892 892 893 893 // 894 894 // If the packet is protected by tunnel mode, parse the inner Ip Packet. … … 914 914 } 915 915 } 916 916 917 917 ASSERT (Packet != NULL); 918 918 Head = Packet->Ip.Ip4; … … 1298 1298 Head = NetbufAllocSpace (Dup, IP4_MAX_HEADLEN, NET_BUF_HEAD); 1299 1299 ASSERT (Head != NULL); 1300 1300 1301 1301 Dup->Ip.Ip4 = (IP4_HEAD *) Head; 1302 1302 … … 1345 1345 @param[in] Packet The data of the received packet. 1346 1346 @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. 1348 1348 @param[in] IpIf The interface to enqueue the packet to. 1349 1349 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.h
r58459 r58466 18 18 #define IP4_MAX_HEADLEN 60 19 19 /// 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 21 21 /// 22 22 #define IP4_MAX_IPSEC_HEADLEN 54 … … 170 170 @param[in] Packet The data of the received packet. 171 171 @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. 173 173 @param[in] IpIf The interface to enqueue the packet to. 174 174 … … 217 217 218 218 /** 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 220 220 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. 222 222 223 223 @param[in] IpSb The IP4 service instance. … … 226 226 @param[in, out] Options The caller supplied options. 227 227 @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, 229 229 EfiIPsecInBound or EfiIPsecOutBound. 230 230 @param[in] Context The token's wrap. … … 233 233 @retval EFI_SUCCESS The packet was bypassed and all buffers remain the same. 234 234 @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. 236 236 @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 238 238 number of input data blocks when build a fragment table. 239 239 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.c
r48674 r58466 1 1 /** @file 2 2 IP4 option support functions. 3 3 4 4 Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 110 110 @param[in] OptionLen The length of the original option 111 111 @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 113 113 @param[in, out] BufLen The length of the buffer 114 114 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.h
r48674 r58466 1 1 /** @file 2 2 IP4 option support routines. 3 3 4 4 Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 55 55 @param[in] OptionLen The length of the original option 56 56 @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 58 58 @param[in, out] BufLen The length of the buffer 59 59 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Output.c
r58459 r58466 1 1 /** @file 2 2 Transmit the IP4 packet. 3 3 4 4 Copyright (c) 2005 - 2013, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 270 270 RawData = FALSE; 271 271 } 272 272 273 273 // 274 274 // Call IPsec process. 275 275 // 276 276 Status = Ip4IpSecProcessPacket ( 277 IpSb, 278 &Head, 279 &Packet, 280 &Option, 281 &OptLen, 277 IpSb, 278 &Head, 279 &Packet, 280 &Option, 281 &OptLen, 282 282 EfiIPsecOutBound, 283 283 Context … … 287 287 return Status; 288 288 } 289 289 290 290 Dest = Head->Dst; 291 291 if (IP4_IS_BROADCAST (Ip4GetNetCast (Dest, IpIf)) || (Dest == IP4_ALLONE_ADDRESS)) { … … 327 327 // them. Tag each fragment other than the first one as spawn from it. 328 328 // 329 Mtu = IpSb->MaxPacketSize + sizeof (IP4_HEAD); 329 Mtu = IpSb->MaxPacketSize + sizeof (IP4_HEAD); 330 330 331 331 if (Packet->TotalSize + HeadLen > Mtu) { … … 336 336 return EFI_BAD_BUFFER_SIZE; 337 337 } 338 338 339 339 // 340 340 // 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 1 1 /** @file 2 2 EFI IP4 route table and route cache table defintions. 3 3 4 4 Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/MnpDxe/ComponentName.c
r58459 r58466 108 108 @param Mnp[in] A pointer to the EFI_MANAGED_NETWORK_PROTOCOL. 109 109 110 110 111 111 @retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully. 112 112 @retval EFI_INVALID_PARAMETER The input parameter is invalid. 113 113 114 114 **/ 115 115 EFI_STATUS … … 158 158 // Remove the last '-' 159 159 // 160 OffSet--; 160 OffSet--; 161 161 // 162 162 // Print the ProtocolType and VLAN ID for this instance. … … 178 178 return Status; 179 179 } 180 180 181 181 if (gMnpControllerNameTable != NULL) { 182 182 FreeUnicodeStringTable (gMnpControllerNameTable); 183 183 gMnpControllerNameTable = NULL; 184 184 } 185 185 186 186 Status = AddUnicodeString2 ( 187 187 "eng", … … 194 194 return Status; 195 195 } 196 196 197 197 return AddUnicodeString2 ( 198 198 "en", … … 291 291 return EFI_UNSUPPORTED; 292 292 } 293 294 // 295 // Make sure this driver is currently managing ControllerHandle 296 // 293 294 // 295 // Make sure this driver is currently managing ControllerHandle 296 // 297 297 Status = EfiTestManagedDevice ( 298 298 ControllerHandle, … … 300 300 &gEfiSimpleNetworkProtocolGuid 301 301 ); 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 // 309 309 Status = EfiTestChildHandle ( 310 310 ControllerHandle, … … 316 316 } 317 317 318 // 319 // Retrieve an instance of a produced protocol from ChildHandle 320 // 318 // 319 // Retrieve an instance of a produced protocol from ChildHandle 320 // 321 321 Status = gBS->OpenProtocol ( 322 322 ChildHandle, -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/MnpDxe/MnpConfig.c
r58459 r58466 688 688 /** 689 689 Callback function which provided by user to remove one node in NetDestroyLinkList process. 690 690 691 691 @param[in] Entry The entry to be removed. 692 692 @param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList. … … 728 728 EFI_STATUS Status; 729 729 UINTN ListLength; 730 730 731 731 List = &MnpServiceData->ChildrenList; 732 732 733 733 Status = NetDestroyLinkList ( 734 734 List, -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/MnpDxe/MnpDriver.c
r58459 r58466 29 29 /** 30 30 Callback function which provided by user to remove one node in NetDestroyLinkList process. 31 31 32 32 @param[in] Entry The entry to be removed. 33 33 @param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList. … … 45 45 { 46 46 MNP_SERVICE_DATA *MnpServiceData; 47 47 48 48 MnpServiceData = MNP_SERVICE_DATA_FROM_LINK (Entry); 49 49 return MnpDestroyServiceData (MnpServiceData); … … 52 52 /** 53 53 Callback function which provided by user to remove one node in NetDestroyLinkList process. 54 54 55 55 @param[in] Entry The entry to be removed. 56 56 @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 4 4 # This module produces EFI Managed Network Protocol upon EFI Simple Network Protocol, 5 5 # 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. 7 7 # 8 8 # Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c
r58459 r58466 134 134 // 135 135 *PktBuf = MnpDerviceData->TxBuf + NET_VLAN_TAG_LEN; 136 136 137 137 if ((TxData->DestinationAddress == NULL) && (TxData->FragmentCount == 1)) { 138 138 CopyMem ( … … 141 141 TxData->FragmentTable[0].FragmentLength 142 142 ); 143 143 144 144 *PktLen = TxData->FragmentTable[0].FragmentLength; 145 145 } else { … … 149 149 // media header space if necessary. 150 150 // 151 SnpMode = MnpDerviceData->Snp->Mode; 151 SnpMode = MnpDerviceData->Snp->Mode; 152 152 DstPos = *PktBuf; 153 153 *PktLen = 0; … … 241 241 } 242 242 243 243 244 244 if (MnpServiceData->VlanId != 0) { 245 245 // -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Mtftp4Dxe/ComponentName.c
r58459 r58466 1 1 /** @file 2 2 UEFI Component Name(2) protocol implementation for Mtftp4Dxe driver. 3 3 4 4 Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 238 238 @param Mtftp4[in] A pointer to the EFI_MTFTP4_PROTOCOL. 239 239 240 240 241 241 @retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully. 242 242 @retval EFI_INVALID_PARAMETER The input parameter is invalid. 243 243 244 244 **/ 245 245 EFI_STATUS … … 278 278 gMtftp4ControllerNameTable = NULL; 279 279 } 280 280 281 281 Status = AddUnicodeString2 ( 282 282 "eng", … … 289 289 return Status; 290 290 } 291 291 292 292 return AddUnicodeString2 ( 293 293 "en", … … 386 386 return EFI_UNSUPPORTED; 387 387 } 388 389 // 390 // Make sure this driver produced ChildHandle 391 // 388 389 // 390 // Make sure this driver produced ChildHandle 391 // 392 392 Status = EfiTestChildHandle ( 393 393 ControllerHandle, … … 399 399 } 400 400 401 // 401 // 402 402 // Retrieve an instance of a produced protocol from ChildHandle 403 // 403 // 404 404 Status = gBS->OpenProtocol ( 405 405 ChildHandle, -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.c
r58459 r58466 320 320 /** 321 321 Callback function which provided by user to remove one node in NetDestroyLinkList process. 322 322 323 323 @param[in] Entry The entry to be removed. 324 324 @param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList. … … 692 692 gMtftp4DriverBinding.DriverBindingHandle, 693 693 ChildHandle 694 ); 694 ); 695 695 } 696 696 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.h
r58459 r58466 1 1 /** @file 2 2 Mtftp drivers function header. 3 3 4 4 Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 50 50 51 51 /** 52 Start the MTFTP driver on this controller. 53 52 Start the MTFTP driver on this controller. 53 54 54 MTFTP driver will install a MTFTP SERVICE BINDING protocol on the supported 55 55 controller, which can be used to create/destroy MTFTP children. -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
r58459 r58466 31 31 # VALID_ARCHITECTURES = IA32 X64 IPF EBC 32 32 # 33 # DRIVER_BINDING = gMtftp4DriverBinding 33 # DRIVER_BINDING = gMtftp4DriverBinding 34 34 # COMPONENT_NAME = gMtftp4ComponentName 35 35 # COMPONENT_NAME2 = gMtftp4ComponentName2 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c
r58459 r58466 1 1 /** @file 2 2 Interface routine for Mtftp4. 3 3 4 4 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 96 96 97 97 /** 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 101 101 to inspect the first packet from server, then abort the session. 102 102 … … 167 167 168 168 /** 169 Check whether the override data is valid. 170 169 Check whether the override data is valid. 170 171 171 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 173 173 connected network. 174 174 … … 178 178 @retval TRUE The override data is valid 179 179 @retval FALSE The override data is invalid 180 180 181 181 **/ 182 182 BOOLEAN … … 219 219 /** 220 220 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, 224 224 the UDP is reconfigured. 225 225 … … 532 532 Reads the current operational settings. 533 533 534 The GetModeData()function reads the current operational settings of this 534 The GetModeData()function reads the current operational settings of this 535 535 EFI MTFTPv4 Protocol driver instance. 536 536 537 537 @param This Pointer to the EFI_MTFTP4_PROTOCOL instance. 538 538 @param ModeData Pointer to storage for the EFI MTFTPv4 Protocol 539 driver mode data. 539 driver mode data. 540 540 541 541 @retval EFI_SUCCESS The configuration data was successfully returned. 542 542 @retval EFI_OUT_OF_RESOURCES The required mode data could not be allocated. 543 543 @retval EFI_INVALID_PARAMETER This is NULL or ModeData is NULL. 544 544 545 545 **/ 546 546 EFI_STATUS … … 575 575 576 576 /** 577 Initializes, changes, or resets the default operational setting for this 577 Initializes, changes, or resets the default operational setting for this 578 578 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 587 587 and can be overridden in later operations. 588 588 589 589 @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 591 591 structure 592 592 593 @retval EFI_SUCCESS The EFI MTFTPv4 Protocol driver was configured 593 @retval EFI_SUCCESS The EFI MTFTPv4 Protocol driver was configured 594 594 successfully. 595 595 @retval EFI_INVALID_PARAMETER One or more following conditions are TRUE: 596 596 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 599 599 unicast address. 600 3.MtftpCofigData.UseDefaultSetting is FALSE and 600 3.MtftpCofigData.UseDefaultSetting is FALSE and 601 601 MtftpConfigData.SubnetMask is invalid. 602 4.MtftpCofigData.ServerIp is not a valid IPv4 602 4.MtftpCofigData.ServerIp is not a valid IPv4 603 603 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 607 607 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 610 610 in progress. 611 @retval EFI_NO_MAPPING When using a default address, configuration 611 @retval EFI_NO_MAPPING When using a default address, configuration 612 612 (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 615 615 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 617 617 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 620 620 configured. 621 621 … … 703 703 /** 704 704 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 708 708 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 710 710 returned and *OptionCount and *OptionList stop at the last valid option. 711 711 The OptionList is allocated by this function, and caller should free it when used. … … 713 713 @param This Pointer to the EFI_MTFTP4_PROTOCOL instance. 714 714 @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. 716 716 @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 718 718 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 720 720 any more 721 721 … … 765 765 /** 766 766 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 771 771 Protocol driver and then Token.Event is signaled (if it is not NULL). 772 772 Data can be downloaded from the MTFTPv4 server into either of the following locations: 773 773 1.A fixed buffer that is pointed to by Token.Buffer 774 774 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 777 777 Token.Buffer. 778 778 779 779 @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 781 781 parameters that are used in this operation. 782 782 783 783 @retval EFI_SUCCESS The data file has been transferred successfully. 784 784 @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 786 786 data in downloading process. 787 787 @retval EFI_ABORTED Current operation is aborted by user. … … 807 807 Sends a data file to an MTFTPv4 server. May be unsupported in some EFI implementations 808 808 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 814 814 driver updates Token.Status. 815 815 The caller can supply the data to be uploaded in the following two modes: … … 817 817 2.Through a callback function 818 818 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 823 823 the same time. The callback function will be ignored if the user provides the buffer. 824 824 825 825 @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 827 827 parameters that are used in this function 828 828 … … 839 839 6. Token.Buffer and Token.PacketNeeded are both 840 840 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 843 843 Token.OverrideData is not NULL. 844 844 @retval EFI_UNSUPPORTED One or more options in the Token.OptionList are in the 845 845 unsupported list of structure EFI_MTFTP4_MODE_DATA. 846 846 @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, 848 848 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 850 850 session. 851 851 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. … … 866 866 867 867 /** 868 Downloads a data file "directory" from an MTFTPv4 server. 868 Downloads a data file "directory" from an MTFTPv4 server. 869 869 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 874 874 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 876 876 locations: 877 877 1.A fixed buffer that is pointed to by Token.Buffer 878 878 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 880 880 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 887 887 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 892 892 (UTC; also known as Greenwich Mean Time [GMT]). 893 893 The only difference between ReadFile and ReadDirectory is the opcode used. 894 894 895 895 @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 897 897 parameters that are used in this function 898 898 … … 909 909 6. Token.Buffer and Token.PacketNeeded are both 910 910 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 913 913 Token.OverrideData is not NULL. 914 914 @retval EFI_UNSUPPORTED One or more options in the Token.OptionList are in the 915 915 unsupported list of structure EFI_MTFTP4_MODE_DATA. 916 916 @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, 918 918 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 920 920 session. 921 921 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. … … 936 936 937 937 /** 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 943 943 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 945 945 EfiMtftp4ReadFile. In its check packet callback abort the opertions. 946 946 947 947 @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() 951 951 function are used 952 952 @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" 954 954 will be used 955 955 @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. 957 957 Ignored if OptionCount is zero 958 958 @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 960 960 buffer must be freed by the caller. 961 961 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 963 963 the Buffer. 964 964 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: … … 968 968 4.One or more options in OptionList have wrong format. 969 969 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 972 972 is not NULL. 973 973 @retval EFI_UNSUPPORTED One or more options in the OptionList are in the 974 974 unsupported list of structure EFI_MTFTP4_MODE_DATA 975 975 @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, 977 977 BOOTP, RARP, etc.) has not finished yet. 978 978 @retval EFI_ACCESS_DENIED The previous operation has not completed yet. 979 979 @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 981 981 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 983 983 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 985 985 in the Buffer. 986 986 @retval EFI_TIMEOUT No responses were received from the MTFTPv4 server. … … 1049 1049 Polls for incoming data packets and processes outgoing data packets. 1050 1050 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 1053 1053 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 1058 1058 the Poll() function more often. 1059 1059 1060 1060 @param This Pointer to the EFI_MTFTP4_PROTOCOL instance 1061 1061 … … 1066 1066 @retval EFI_INVALID_PARAMETER This is NULL. 1067 1067 @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 1069 1069 queue. Consider increasing the polling rate. 1070 1070 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h
r58459 r58466 1 1 /** @file 2 2 3 3 Mtftp4 Implementation. 4 4 5 5 Mtftp4 Implementation, it supports the following RFCs: 6 6 RFC1350 - THE TFTP PROTOCOL (REVISION 2) … … 9 9 RFC2348 - TFTP Blocksize Option 10 10 RFC2349 - TFTP Timeout Interval and Transfer Size Options 11 11 12 12 Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR> 13 13 This program and the accompanying materials … … 170 170 /** 171 171 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, 174 174 and start receiving the packet. 175 175 … … 189 189 190 190 /** 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 194 194 reqeuest packet, at last, it will start receive for the downloading. 195 195 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Option.h
r48674 r58466 1 1 /** @file 2 2 Routines to process MTFTP4 options. 3 3 4 4 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 39 39 40 40 /** 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 43 43 It first calls Mtftp4FillOption to get the option number, then allocate 44 44 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 1 1 /** @file 2 2 Routines to process Rrq (download). 3 3 4 4 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 37 37 38 38 /** 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 42 42 reqeuest packet, at last, it will start receive for the downloading. 43 43 … … 167 167 // returns EFI_NOT_FOUND, the block has been saved, don't save it again. 168 168 // 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 170 170 // continuous block counter. 171 171 // … … 228 228 229 229 /** 230 Function to process the received data packets. 231 230 Function to process the received data packets. 231 232 232 It will save the block then send back an ACK if it is active. 233 233 … … 318 318 /** 319 319 Validate whether the options received in the server's OACK packet is valid. 320 320 321 321 The options are valid only if: 322 322 1. The server doesn't include options not requested by us … … 428 428 } 429 429 430 if (!Config->UseDefaultSetting && 430 if (!Config->UseDefaultSetting && 431 431 !EFI_IP4_EQUAL (&mZeroIp4Addr, &Config->GatewayIp)) { 432 432 // … … 435 435 // 436 436 Status = McastIo->Protocol.Udp4->Routes ( 437 McastIo->Protocol.Udp4, 437 McastIo->Protocol.Udp4, 438 438 FALSE, 439 439 &mZeroIp4Addr, … … 441 441 &Config->GatewayIp 442 442 ); 443 443 444 444 if (EFI_ERROR (Status)) { 445 445 McastIo->Protocol.Udp4->Configure (McastIo->Protocol.Udp4, NULL); … … 459 459 460 460 /** 461 Function to process the OACK. 462 461 Function to process the OACK. 462 463 463 It will first validate the OACK packet, then update the various negotiated parameters. 464 464 … … 591 591 return Status; 592 592 } 593 593 594 594 // 595 595 // Update the parameters used. … … 598 598 Instance->BlkSize = Reply.BlkSize; 599 599 } 600 600 601 601 if (Reply.Timeout != 0) { 602 602 Instance->Timeout = Reply.Timeout; 603 } 604 } 605 603 } 604 } 605 606 606 } else { 607 607 Instance->Master = TRUE; 608 608 609 609 if (Reply.BlkSize != 0) { 610 610 Instance->BlkSize = Reply.BlkSize; … … 615 615 } 616 616 } 617 617 618 618 // 619 619 // Send an ACK to (Expected - 1) which is 0 for unicast download, … … 762 762 Status = EFI_TFTP_ERROR; 763 763 break; 764 764 765 765 default: 766 766 break; -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c
r58459 r58466 1 1 /** @file 2 2 Support routines for Mtftp. 3 3 4 4 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 49 49 50 50 /** 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 57 57 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 61 61 negotiation. 62 62 … … 94 94 @param Head The block range head 95 95 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. 97 97 98 98 **/ … … 114 114 115 115 /** 116 Set the last block number of the block range list. 117 116 Set the last block number of the block range list. 117 118 118 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 120 120 last block number, it will call this function to set the last block number. 121 121 … … 160 160 @param Num The block number to remove 161 161 @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 163 163 164 164 @retval EFI_NOT_FOUND The block number isn't in the block range list … … 214 214 215 215 // 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 221 221 // this solution. 222 222 // 223 223 *TotalBlock = Num; 224 224 225 225 if (Range->Round > 0) { 226 226 *TotalBlock += Range->Bound + MultU64x32 ((UINTN) (Range->Round -1), (UINT32) (Range->Bound + 1)) + 1; … … 341 341 342 342 @param Instance The MTFTP session 343 @param ErrCode The error code 343 @param ErrCode The error code 344 344 @param ErrInfo The error message 345 345 … … 380 380 /** 381 381 The callback function called when the packet is transmitted. 382 382 383 383 It simply frees the packet. 384 384 … … 422 422 423 423 /** 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 428 428 port for others. At last, send the packet out. 429 429 … … 469 469 OpCode = NTOHS (*(UINT16 *)Buffer); 470 470 471 if ((OpCode == EFI_MTFTP4_OPCODE_RRQ) || 471 if ((OpCode == EFI_MTFTP4_OPCODE_RRQ) || 472 472 (OpCode == EFI_MTFTP4_OPCODE_DIR) || 473 473 (OpCode == EFI_MTFTP4_OPCODE_WRQ)) { -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.h
r48674 r58466 1 1 /** @file 2 2 Support routines for MTFTP. 3 3 4 4 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 31 31 32 32 /** 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 39 39 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 43 43 negotiation. 44 44 … … 63 63 @param Head The block range head 64 64 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. 66 66 67 67 **/ … … 72 72 73 73 /** 74 Set the last block number of the block range list. 75 74 Set the last block number of the block range list. 75 76 76 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 78 78 last block number, it will call this function to set the last block number. 79 79 … … 94 94 @param Num The block number to remove 95 95 @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 97 97 98 98 @retval EFI_NOT_FOUND The block number isn't in the block range list … … 121 121 122 122 /** 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 127 127 port for others. At last, send the packet out. 128 128 … … 159 159 160 160 @param Instance The MTFTP session 161 @param ErrCode The error code 161 @param ErrCode The error code 162 162 @param ErrInfo The error message 163 163 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Wrq.c
r58459 r58466 1 1 /** @file 2 2 Routines to process Wrq (upload). 3 3 4 4 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 121 121 122 122 /** 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 126 126 data pending, send the next block. Otherwise tell the caller that we are done. 127 127 … … 147 147 INTN Expected; 148 148 UINT64 TotalBlock; 149 149 150 150 *Completed = FALSE; 151 151 AckNum = NTOHS (Packet->Ack.Block[0]); … … 172 172 173 173 if (Expected < 0) { 174 174 175 175 // 176 176 // The block range is empty. It may either because the the last … … 199 199 200 200 /** 201 Check whether the received OACK is valid. 202 201 Check whether the received OACK is valid. 202 203 203 The OACK is valid only if: 204 204 1. It only include options requested by us … … 241 241 242 242 /** 243 Function to handle the MTFTP OACK packet. 244 243 Function to handle the MTFTP OACK packet. 244 245 245 It parses the packet's options, and update the internal states of the session. 246 246 … … 455 455 Status = EFI_TFTP_ERROR; 456 456 break; 457 457 458 458 default: 459 459 break; … … 489 489 /** 490 490 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, 493 493 and start receiving the packet. 494 494 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/SnpDxe/ComponentName.c
r58459 r58466 3 3 4 4 Copyright (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 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 9 9 10 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, … … 239 239 @param Snp[in] A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL. 240 240 241 241 242 242 @retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully. 243 243 @retval EFI_INVALID_PARAMETER The input parameter is invalid. 244 244 245 245 **/ 246 246 EFI_STATUS … … 286 286 gSimpleNetworkControllerNameTable = NULL; 287 287 } 288 288 289 289 Status = AddUnicodeString2 ( 290 290 "eng", … … 297 297 return Status; 298 298 } 299 299 300 300 return AddUnicodeString2 ( 301 301 "en", … … 318 318 managing the controller specified by ControllerHandle and ChildHandle, 319 319 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. 322 322 323 323 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or … … 388 388 EFI_STATUS Status; 389 389 EFI_SIMPLE_NETWORK_PROTOCOL *Snp; 390 390 391 391 if (ChildHandle != NULL) { 392 392 return EFI_UNSUPPORTED; … … 405 405 } 406 406 407 // 407 // 408 408 // Retrieve an instance of a produced protocol from ControllerHandle 409 // 409 // 410 410 Status = gBS->OpenProtocol ( 411 411 ControllerHandle, -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/SnpDxe/Initialize.c
r48674 r58466 3 3 4 4 Copyright (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 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 9 9 10 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, … … 20 20 21 21 @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 23 23 undi supports). 24 24 25 25 @retval EFI_SUCCESS UNDI is initialized successfully. 26 26 @retval EFI_DEVICE_ERROR UNDI could not be initialized. … … 130 130 131 131 /** 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 134 134 additional transmit and receive buffers. 135 135 … … 143 143 @param ExtraRxBufferSize The size, in bytes, of the extra receive buffer space 144 144 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 147 147 actually being used. 148 148 @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 2 2 Implementation of converting an multicast IP address to multicast HW MAC 3 3 address. 4 4 5 5 Copyright (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 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 10 10 11 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, … … 24 24 @param MAC Pointer to hold the return MAC address. 25 25 26 @retval EFI_SUCCESS The multicast IP address was mapped to the 26 @retval EFI_SUCCESS The multicast IP address was mapped to the 27 27 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. 31 31 32 32 **/ … … 104 104 /** 105 105 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 108 108 for all packet transactions. If the mapping is accepted, then EFI_SUCCESS will 109 109 be returned. … … 111 111 @param This A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance. 112 112 @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 115 115 HW MAC address. 116 116 @param MAC The multicast HW MAC address that is to be generated from IP. … … 118 118 @retval EFI_SUCCESS The multicast IP address was mapped to the 119 119 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 121 121 been started by calling Start(). 122 122 @retval EFI_INVALID_PARAMETER IP is NULL. 123 123 @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 125 125 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 127 127 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 129 129 support IPv6 multicast to MAC address conversion. 130 130 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/SnpDxe/Nvdata.c
r48674 r58466 2 2 Implementation of reading and writing operations on the NVRAM device 3 3 attached to a network interface. 4 4 5 5 Copyright (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 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 10 10 11 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, … … 98 98 99 99 /** 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 101 101 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 104 104 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. 108 108 BufferSize specifies the length of the read or write operation. BufferSize must 109 109 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 115 115 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 117 117 interface and EFI_SUCCESS will be returned. 118 118 119 119 It does the basic checking on the input parameters and retrieves snp structure 120 120 and then calls the read_nvdata() call which does the actual reading … … 122 122 @param This A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance. 123 123 @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. 128 128 This must also be a multiple of NvramAccessSize. 129 129 @param Buffer A pointer to the data buffer. … … 132 132 @retval EFI_NOT_STARTED The network interface has not been started. 133 133 @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 136 136 EFI_SIMPLE_NETWORK_PROTOCOL structure 137 * The Offset parameter is not a multiple of 137 * The Offset parameter is not a multiple of 138 138 EFI_SIMPLE_NETWORK_MODE.NvRamAccessSize 139 * The Offset parameter is not less than 139 * The Offset parameter is not less than 140 140 EFI_SIMPLE_NETWORK_MODE.NvRamSize 141 * The BufferSize parameter is not a multiple of 141 * The BufferSize parameter is not a multiple of 142 142 EFI_SIMPLE_NETWORK_MODE.NvRamAccessSize 143 143 * 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 145 145 interface. 146 146 @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 4 4 5 5 Copyright (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 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 10 10 11 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, … … 25 25 @param MCastAddressCount Multicast address count for a new multicast address 26 26 list. 27 @param MCastAddressList List of new multicast addresses. 28 27 @param MCastAddressList List of new multicast addresses. 28 29 29 @retval EFI_SUCCESS The multicast receive filter list was updated. 30 30 @retval EFI_INVALID_PARAMETER Invalid UNDI command. … … 116 116 @param Snp Pointer to snp driver structure 117 117 @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 119 119 list. 120 120 121 121 @retval EFI_SUCCESS The multicast receive filter list was updated. 122 122 @retval EFI_DEVICE_ERROR Fail to execute UNDI command. 123 124 **/ 123 124 **/ 125 125 EFI_STATUS 126 126 PxeRecvFilterDisable ( … … 195 195 196 196 @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 199 199 **/ 200 200 EFI_STATUS … … 292 292 /** 293 293 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 296 296 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. 300 300 * The filter mask bits that are set (ON) in the Disable parameter are subtracted 301 301 from the updated receive filter settings. 302 302 * If the resulting receive filter setting is not supported by the hardware a 303 303 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 305 305 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 309 309 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, 312 312 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 314 314 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 317 317 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 319 319 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 321 321 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 324 324 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 326 326 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 328 328 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 333 333 EFI_SIMPLE_NETWORK_MODE. If the network interface does not allow the multicast 334 334 receive filter list to be modified, then EFI_INVALID_PARAMETER will be returned. 335 335 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 337 337 successfully updated on the network interface, EFI_SUCCESS will be returned. 338 338 … … 341 341 interface. 342 342 @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 344 344 platforms, the EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST bit 345 345 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. 349 349 @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. 352 352 This field is optional if ResetMCastFilter is TRUE. 353 353 @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 356 356 if ResetMCastFilter is TRUE. 357 357 358 358 @retval EFI_SUCCESS The multicast receive filter list was updated. 359 359 @retval EFI_NOT_STARTED The network interface has not been started. … … 364 364 * There are bits set in Disable that are not set 365 365 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 369 369 ResetMCastFilter is FALSE) and MCastFilterCount 370 370 is zero … … 378 378 * The network interface has been started but has 379 379 not been initialized 380 * An unexpected error was returned by the 380 * An unexpected error was returned by the 381 381 underlying network driver or device 382 382 @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 1 1 /** @file 2 2 Implementation of resetting a network adapter. 3 3 4 4 Copyright (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 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 9 9 10 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, … … 71 71 72 72 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 74 74 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 78 78 been initialized, EFI_DEVICE_ERROR will be returned. 79 79 80 80 @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 83 83 during reset. 84 84 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/SnpDxe/Shutdown.c
r48674 r58466 1 1 /** @file 2 2 Implementation of shuting down a network adapter. 3 3 4 4 Copyright (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 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 9 9 10 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, … … 75 75 76 76 /** 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 80 80 This function releases the memory buffers assigned in the Initialize() call. 81 81 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 83 83 network interface was successfully shutdown, then EFI_SUCCESS will be returned. 84 84 If the driver has not been initialized, EFI_DEVICE_ERROR will be returned. … … 88 88 @retval EFI_SUCCESS The network interface was shutdown. 89 89 @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 91 91 EFI_SIMPLE_NETWORK_PROTOCOL structure. 92 92 @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. … … 129 129 goto ON_EXIT; 130 130 } 131 131 132 132 Status = PxeShutdown (Snp); 133 133 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/SnpDxe/Snp.c
r58459 r58466 274 274 EFI_PCI_IO_PROTOCOL *PciIo; 275 275 EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *BarDesc; 276 276 277 277 DEBUG ((EFI_D_NET, "\nSnpNotifyNetworkInterfaceIdentifier() ")); 278 278 … … 402 402 Snp->TxRxBufferSize = 0; 403 403 Snp->TxRxBuffer = NULL; 404 404 405 405 if (Nii->Revision >= EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION) { 406 406 Snp->IfNum = Nii->IfNum; -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf
r58459 r58466 2 2 # This module produces EFI SNP Protocol. 3 3 # 4 # This module produces Simple Network Protocol upon EFI Network Interface 4 # This module produces Simple Network Protocol upon EFI Network Interface 5 5 # Identifier Protocol, to provide a packet level interface to a network adapter. 6 6 # 7 7 # 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 12 12 # 13 13 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, … … 31 31 # VALID_ARCHITECTURES = IA32 X64 IPF EBC 32 32 # 33 # DRIVER_BINDING = mSimpleNetworkDriverBinding 33 # DRIVER_BINDING = mSimpleNetworkDriverBinding 34 34 # COMPONENT_NAME = gSimpleNetworkComponentName 35 35 # COMPONENT_NAME2 = gSimpleNetworkComponentName2 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/SnpDxe/Start.c
r48674 r58466 1 1 /** @file 2 2 Implementation of starting a network adapter. 3 3 4 4 Copyright (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 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 9 9 10 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, … … 23 23 @retval EFI_SUCCESS UNDI is started successfully. 24 24 @retval EFI_DEVICE_ERROR UNDI could not be started. 25 25 26 26 **/ 27 27 EFI_STATUS … … 101 101 /** 102 102 Change the state of a network interface from "stopped" to "started." 103 103 104 104 This function starts a network interface. If the network interface successfully 105 105 starts, then EFI_SUCCESS will be returned. … … 109 109 @retval EFI_SUCCESS The network interface was started. 110 110 @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 112 112 EFI_SIMPLE_NETWORK_PROTOCOL structure. 113 113 @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 1 1 /** @file 2 2 Implementation of reading the MAC address of a network adapter. 3 3 4 4 Copyright (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 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 9 9 10 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, … … 17 17 18 18 /** 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. 21 21 22 22 @param Snp Pointer to snp driver structure. 23 23 24 24 @retval EFI_SUCCESS The MAC address of the NIC is read successfully. 25 25 @retval EFI_DEVICE_ERROR Failed to read the MAC address of the NIC. … … 167 167 /** 168 168 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 171 171 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 176 176 EFI_INVALID_PARAMETER will be returned. If the station address is successfully 177 177 updated on the network interface, EFI_SUCCESS will be returned. If the driver … … 179 179 180 180 @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 182 182 permanent address. 183 183 @param New New station address to be used for the network interface. … … 185 185 186 186 @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 188 188 started by calling Start(). 189 189 @retval EFI_INVALID_PARAMETER The New station address was not accepted by the NIC. 190 190 @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 192 192 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 194 194 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 196 196 interface's station address. 197 197 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/SnpDxe/Stop.c
r48674 r58466 1 1 /** @file 2 2 Implementation of stopping a network interface. 3 3 4 4 Copyright (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 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 9 9 10 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, … … 20 20 21 21 @param Snp Pointer to snp driver structure 22 22 23 23 @retval EFI_SUCCESS The network interface was stopped. 24 24 @retval EFI_DEVICE_ERROR SNP is not initialized. … … 68 68 /** 69 69 Changes the state of a network interface from "started" to "stopped." 70 70 71 71 This function stops a network interface. This call is only valid if the network 72 72 interface is in the started state. If the network interface was successfully 73 73 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 76 76 instance. 77 78 77 78 79 79 @retval EFI_SUCCESS The network interface was stopped. 80 80 @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 82 82 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 84 84 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 86 86 interface. 87 87 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/SnpDxe/Transmit.c
r48674 r58466 1 1 /** @file 2 2 Implementation of transmitting a packet. 3 3 4 4 Copyright (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 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 9 9 10 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, … … 217 217 /** 218 218 Places a packet in the transmit queue of a network interface. 219 219 220 220 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 223 223 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 225 225 returned. If HeaderSize is nonzero and DestAddr or Protocol is NULL, then 226 226 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. 233 233 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 235 235 transmitted buffer shows up in the recycled transmit buffer. 236 236 If the driver has not been initialized, EFI_DEVICE_ERROR will be returned. 237 237 238 238 @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 240 240 Transmit() function. If HeaderSize is nonzero, then it must 241 241 be equal to This->Mode->MediaHeaderSize and the DestAddr and … … 243 243 @param BufferSize The size, in bytes, of the entire packet (media header and 244 244 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 247 247 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 249 249 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 253 253 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 255 255 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," 258 258 for examples. 259 259 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/SnpDxe/WaitForPacket.c
r48674 r58466 3 3 4 4 Copyright (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 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 9 9 10 10 THE 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 235 235 @param Tcp4[in] A pointer to the EFI_TCP4_PROTOCOL. 236 236 237 237 238 238 @retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully. 239 239 @retval EFI_INVALID_PARAMETER The input parameter is invalid. 240 240 241 241 **/ 242 242 EFI_STATUS … … 280 280 gTcpControllerNameTable = NULL; 281 281 } 282 282 283 283 Status = AddUnicodeString2 ( 284 284 "eng", … … 291 291 return Status; 292 292 } 293 293 294 294 return AddUnicodeString2 ( 295 295 "en", … … 388 388 return EFI_UNSUPPORTED; 389 389 } 390 391 // 392 // Make sure this driver produced ChildHandle 393 // 390 391 // 392 // Make sure this driver produced ChildHandle 393 // 394 394 Status = EfiTestChildHandle ( 395 395 ControllerHandle, … … 401 401 } 402 402 403 // 403 // 404 404 // Retrieve an instance of a produced protocol from ChildHandle 405 // 405 // 406 406 Status = gBS->OpenProtocol ( 407 407 ChildHandle, -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/SockImpl.c
r58459 r58466 34 34 IN UINT32 BufLen 35 35 ); 36 36 37 37 /** 38 38 Process the send token. … … 50 50 51 51 @param Event The Event this notify function registered to, ignored. 52 52 53 53 **/ 54 54 VOID … … 323 323 @param Sock Pointer to the socket. 324 324 @param PendingTokenList Pointer to the token list to be flushed. 325 325 326 326 **/ 327 327 VOID … … 353 353 354 354 /** 355 Wake up the connection token while the connection is successfully established, 355 Wake up the connection token while the connection is successfully established, 356 356 then try to process any pending send token. 357 357 … … 934 934 935 935 /** 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 940 940 and signals the token used for connection establishment. 941 941 … … 965 965 /** 966 966 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 969 969 the close token. 970 970 971 971 @param Sock Pointer to the socket associated with the closed 972 972 connection. 973 973 974 974 **/ 975 975 VOID … … 995 995 /** 996 996 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 999 999 token if proper. 1000 1000 … … 1085 1085 /** 1086 1086 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 1089 1089 urgent data length and then check if any receive token can be signaled. 1090 1090 … … 1191 1191 1192 1192 /** 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 1194 1194 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 1197 1197 IO tokens with the error status EFI_CONNECTION_FIN. 1198 1198 … … 1258 1258 one. 1259 1259 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 1261 1261 the tail or head entry. 1262 1262 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/SockImpl.h
r48674 r58466 20 20 /** 21 21 Signal a event with the given status. 22 22 23 23 @param Token The token's event is to be signaled. 24 24 @param TokenStatus The status to be sent with the event. 25 25 26 26 **/ 27 27 #define SIGNAL_TOKEN(Token, TokenStatus) \ … … 36 36 37 37 @param Event The Event this notify function registered to, ignored. 38 38 39 39 **/ 40 40 VOID -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/SockInterface.c
r58459 r58466 23 23 @param Event The event to be checked. 24 24 25 @retval TRUE The specific Event exists in the List. 25 @retval TRUE The specific Event exists in the List. 26 26 @retval FALSE The specific Event is not in the List. 27 27 … … 59 59 @param Event The event to be checked. 60 60 61 @retval TRUE The Event exists in related socket's lists. 61 @retval TRUE The Event exists in related socket's lists. 62 62 @retval FALSE The Event is not in related socket's lists. 63 63 … … 200 200 201 201 @param SockInitData Inital data to setting the socket. 202 202 203 203 @return Pointer to the newly created socket. If NULL, error condition occured. 204 204 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/Socket.h
r58459 r58466 86 86 /** 87 87 Set socket SO_NO_MORE_DATA flag. 88 88 89 89 @param Sock Pointer to the socket 90 90 91 91 **/ 92 92 #define SOCK_NO_MORE_DATA(Sock) ((Sock)->Flag |= SO_NO_MORE_DATA) … … 94 94 /** 95 95 Check whether the socket is unconfigured. 96 97 @param Sock Pointer to the socket 98 96 97 @param Sock Pointer to the socket 98 99 99 @retval True The socket is unconfigued 100 100 @retval False The socket is not unconfigued 101 101 102 102 **/ 103 103 #define SOCK_IS_UNCONFIGURED(Sock) ((Sock)->ConfigureState == SO_UNCONFIGURED) … … 105 105 /** 106 106 Check whether the socket is configured. 107 108 @param Sock Pointer to the socket 109 107 108 @param Sock Pointer to the socket 109 110 110 @retval True The socket is configued 111 111 @retval False The socket is not configued 112 112 113 113 **/ 114 114 #define SOCK_IS_CONFIGURED(Sock) \ … … 118 118 /** 119 119 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 123 123 @retval True The socket is configued to active mode 124 124 @retval False The socket is not configued to active mode 125 125 126 126 **/ 127 127 #define SOCK_IS_CONFIGURED_ACTIVE(Sock) \ … … 130 130 /** 131 131 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 135 135 @retval True The socket is configued to passive mode 136 136 @retval False The socket is not configued to passive mode 137 137 138 138 **/ 139 139 #define SOCK_IS_CONNECTED_PASSIVE(Sock) \ … … 142 142 /** 143 143 Check whether the socket is mapped. 144 145 @param Sock Pointer to the socket 146 144 145 @param Sock Pointer to the socket 146 147 147 @retval True The socket is no mapping 148 148 @retval False The socket is mapped 149 149 150 150 **/ 151 151 #define SOCK_IS_NO_MAPPING(Sock) \ … … 154 154 /** 155 155 Check whether the socket is closed. 156 157 @param Sock Pointer to the socket 158 156 157 @param Sock Pointer to the socket 158 159 159 @retval True The socket is closed 160 160 @retval False The socket is not closed 161 161 162 162 **/ 163 163 #define SOCK_IS_CLOSED(Sock) ((Sock)->State == SO_CLOSED) … … 165 165 /** 166 166 Check whether the socket is listening. 167 168 @param Sock Pointer to the socket 169 167 168 @param Sock Pointer to the socket 169 170 170 @retval True The socket is listening 171 171 @retval False The socket is not listening 172 172 173 173 **/ 174 174 #define SOCK_IS_LISTENING(Sock) ((Sock)->State == SO_LISTENING) … … 176 176 /** 177 177 Check whether the socket is connecting. 178 179 @param Sock Pointer to the socket 180 178 179 @param Sock Pointer to the socket 180 181 181 @retval True The socket is connecting 182 182 @retval False The socket is not connecting 183 183 184 184 **/ 185 185 #define SOCK_IS_CONNECTING(Sock) ((Sock)->State == SO_CONNECTING) … … 187 187 /** 188 188 Check whether the socket has connected. 189 190 @param Sock Pointer to the socket 191 189 190 @param Sock Pointer to the socket 191 192 192 @retval True The socket has connected 193 193 @retval False The socket has not connected 194 194 195 195 **/ 196 196 #define SOCK_IS_CONNECTED(Sock) ((Sock)->State == SO_CONNECTED) … … 198 198 /** 199 199 Check whether the socket is disconnecting. 200 201 @param Sock Pointer to the socket 202 200 201 @param Sock Pointer to the socket 202 203 203 @retval True The socket is disconnecting 204 204 @retval False The socket is not disconnecting 205 205 206 206 **/ 207 207 #define SOCK_IS_DISCONNECTING(Sock) ((Sock)->State == SO_DISCONNECTING) … … 209 209 /** 210 210 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 214 214 @retval True The socket is no more data 215 215 @retval False The socket still has data 216 216 217 217 **/ 218 218 #define SOCK_IS_NO_MORE_DATA(Sock) (0 != ((Sock)->Flag & SO_NO_MORE_DATA)) … … 220 220 /** 221 221 Set the size of the receive buffer. 222 222 223 223 @param Sock Pointer to the socket 224 224 @param Size The size to set … … 229 229 /** 230 230 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 234 234 @return The receive buffer size 235 235 … … 239 239 /** 240 240 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 244 244 @return The received data size 245 245 … … 249 249 /** 250 250 Set the size of the send buffer. 251 251 252 252 @param Sock Pointer to the socket 253 253 @param Size The size to set … … 258 258 /** 259 259 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 263 263 @return The send buffer size 264 264 … … 268 268 /** 269 269 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 273 273 @return The send data size 274 274 … … 278 278 /** 279 279 Set the backlog value of the socket. 280 280 281 281 @param Sock Pointer to the socket 282 282 @param Value The value to set … … 287 287 /** 288 288 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 292 292 @return The backlog value 293 293 … … 297 297 /** 298 298 Set the socket with error state. 299 299 300 300 @param Sock Pointer to the socket 301 301 @param Error The error state … … 343 343 344 344 /// 345 /// The request issued from socket layer to protocol layer. 345 /// The request issued from socket layer to protocol layer. 346 346 /// 347 347 #define SOCK_ATTACH 0 ///< Attach current socket to a new PCB … … 380 380 /** 381 381 The handler of protocol for request from socket. 382 382 383 383 @param Socket The socket issuing the request to protocol 384 384 @param Request The request issued by socket 385 385 @param RequestData The request related data 386 386 387 387 @retval EFI_SUCCESS The socket request is completed successfully. 388 388 @retval other The error status returned by the corresponding TCP 389 389 layer function. 390 390 391 391 **/ 392 392 typedef … … 397 397 IN VOID *RequestData 398 398 ); 399 400 399 400 401 401 // 402 402 // Socket provided oprerations for low layer protocol … … 421 421 422 422 /** 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 427 427 and signals the token used for connection establishment. 428 428 429 429 @param Sock Pointer to the socket associated with the 430 430 established connection. 431 431 432 432 **/ 433 433 VOID … … 438 438 /** 439 439 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 442 442 the close token. 443 443 444 444 @param Sock Pointer to the socket associated with the closed 445 445 connection. 446 446 447 447 **/ 448 448 VOID … … 453 453 /** 454 454 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 457 457 token if proper. 458 458 … … 491 491 Called by the low layer protocol to indicate that there 492 492 will be no more data from the communication peer. 493 493 494 494 This function set the socket's state to SO_NO_MORE_DATA and 495 495 signal all queued IO tokens with the error status EFI_CONNECTION_FIN. … … 505 505 /** 506 506 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 509 509 urgent data length and then check if any receive token can be signaled. 510 510 … … 574 574 IN VOID *Context 575 575 ); 576 577 /// 578 /// Proto type of the destroy callback 576 577 /// 578 /// Proto type of the destroy callback 579 579 /// 580 580 typedef … … 619 619 /// 620 620 /// The union type of TCP and UDP protocol. 621 /// 621 /// 622 622 typedef union _NET_PROTOCOL { 623 623 EFI_TCP4_PROTOCOL TcpProtocol; ///< Tcp protocol … … 638 638 EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath; 639 639 EFI_DEVICE_PATH_PROTOCOL *DevicePath; 640 LIST_ENTRY Link; 640 LIST_ENTRY Link; 641 641 UINT8 ConfigureState; 642 642 SOCK_TYPE Type; … … 656 656 SOCKET *Parent; ///< listening parent that accept the connection 657 657 LIST_ENTRY ConnectionList; ///< the connections maintained by this socket 658 658 659 659 // 660 660 // The queue to buffer application's asynchronous token … … 715 715 716 716 @param SockInitData Inital data to setting the socket. 717 717 718 718 @return Pointer to the newly created socket. If NULL, error condition occured. 719 719 … … 974 974 one. 975 975 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 977 977 the tail or head entry. 978 978 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c
r58459 r58466 342 342 Sk->SockHandle 343 343 ); 344 344 345 345 IpIoRemoveIp (ProtoData->TcpService->IpIo, Tcb->IpInfo); 346 346 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.c
r58459 r58466 117 117 /** 118 118 Stop and destroy the heartbeat timer for TCP driver. 119 119 120 120 **/ 121 121 VOID … … 139 139 /** 140 140 Callback function which provided by user to remove one node in NetDestroyLinkList process. 141 141 142 142 @param[in] Entry The entry to be removed. 143 143 @param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList. … … 222 222 /** 223 223 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 226 226 creating a handle for the specified child device. 227 227 228 228 @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 231 231 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. 233 233 This parameter is ignored by device drivers, and is optional for bus drivers. 234 234 235 235 236 236 @retval EFI_SUCCESS The device specified by ControllerHandle and 237 RemainingDevicePath is supported by the driver 237 RemainingDevicePath is supported by the driver 238 238 specified by This. 239 239 @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and 240 RemainingDevicePath is already being managed by 240 RemainingDevicePath is already being managed by 241 241 the driver specified by This. 242 242 @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 245 245 exclusive access. 246 246 @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 248 248 specified by This. 249 249 250 250 **/ 251 251 EFI_STATUS … … 291 291 292 292 /** 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 299 299 followed or the system behavior will not be deterministic. 300 300 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 302 302 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() 305 305 must have returned EFI_SUCCESS. 306 306 307 307 @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 310 310 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 313 313 optional for bus drivers. 314 314 315 315 @retval EFI_SUCCESS The device was started. 316 316 @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 318 318 of resources. 319 319 … … 436 436 /** 437 437 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 443 443 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 445 445 to this same driver's Start() function. 446 446 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() 449 449 on ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. 450 450 451 451 @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 454 454 to use to stop the device. 455 455 @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 457 457 NumberOfChildren is 0. 458 458 … … 506 506 507 507 if (NumberOfChildren != 0) { 508 List = &TcpServiceData->SocketList; 508 List = &TcpServiceData->SocketList; 509 509 Context.ServiceBinding = ServiceBinding; 510 510 Context.NumberOfChildren = NumberOfChildren; … … 542 542 gTcpControllerNameTable = NULL; 543 543 } 544 544 545 545 // 546 546 // Release the TCP service data … … 555 555 556 556 /** 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 558 558 socket list. 559 559 560 560 @param This Pointer to the socket just created 561 561 @param Context Context of the socket 562 562 563 563 @retval EFI_SUCCESS This protocol is installed successfully. 564 564 @retval other Some error occured. 565 565 566 566 **/ 567 567 EFI_STATUS … … 621 621 622 622 /** 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 625 625 @param This Pointer to the socket to be removed 626 626 @param Context Context of the socket 627 627 628 628 **/ 629 629 VOID … … 655 655 /** 656 656 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 661 661 ChildHandle. 662 662 663 663 @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 666 666 handle, then the protocol is added to the existing UEFI handle. 667 667 … … 723 723 /** 724 724 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 728 728 last protocol on ChildHandle, then ChildHandle is destroyed. 729 729 … … 732 732 733 733 @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 735 735 being removed. 736 736 @retval EFI_INVALID_PARAMETER Child handle is NULL. … … 738 738 because its services are being used. 739 739 @retval other The child handle was not destroyed. 740 740 741 741 **/ 742 742 EFI_STATUS -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.h
r58459 r58466 31 31 TCP4_DRIVER_SIGNATURE \ 32 32 ) 33 33 34 34 /// 35 35 /// TCP heartbeat tick timer. … … 149 149 /** 150 150 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 153 153 creating a handle for the specified child device. 154 154 155 155 @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 158 158 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. 160 160 This parameter is ignored by device drivers, and is optional for bus drivers. 161 161 162 162 163 163 @retval EFI_SUCCESS The device specified by ControllerHandle and 164 RemainingDevicePath is supported by the driver 164 RemainingDevicePath is supported by the driver 165 165 specified by This. 166 166 @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and 167 RemainingDevicePath is already being managed by 167 RemainingDevicePath is already being managed by 168 168 the driver specified by This. 169 169 @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 172 172 exclusive access. 173 173 @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 175 175 specified by This. 176 176 177 177 **/ 178 178 EFI_STATUS … … 185 185 186 186 /** 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 193 193 followed or the system behavior will not be deterministic. 194 194 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 196 196 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() 199 199 must have returned EFI_SUCCESS. 200 200 201 201 @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 204 204 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 207 207 optional for bus drivers. 208 208 209 209 @retval EFI_SUCCESS The device was started. 210 210 @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 212 212 of resources. 213 213 … … 223 223 /** 224 224 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 230 230 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 232 232 to this same driver's Start() function. 233 233 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() 236 236 on ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. 237 237 238 238 @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 241 241 to use to stop the device. 242 242 @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 244 244 NumberOfChildren is 0. 245 245 … … 258 258 259 259 /** 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 261 261 socket list. 262 262 263 263 @param This Pointer to the socket just created 264 264 @param Context Context of the socket 265 265 266 266 @retval EFI_SUCCESS This protocol is installed successfully. 267 267 @retval other Some error occured. 268 268 269 269 **/ 270 270 EFI_STATUS … … 275 275 276 276 /** 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 279 279 @param This Pointer to the socket to be removed 280 280 @param Context Context of the socket 281 281 282 282 **/ 283 283 VOID … … 289 289 /** 290 290 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 295 295 ChildHandle. 296 296 297 297 @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 300 300 handle, then the protocol is added to the existing UEFI handle. 301 301 … … 316 316 /** 317 317 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 321 321 last protocol on ChildHandle, then ChildHandle is destroyed. 322 322 … … 325 325 326 326 @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 328 328 being removed. 329 329 @retval EFI_INVALID_PARAMETER Child handle is NULL. … … 331 331 because its services are being used. 332 332 @retval other The child handle was not destroyed. 333 333 334 334 **/ 335 335 EFI_STATUS -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
r58459 r58466 31 31 # VALID_ARCHITECTURES = IA32 X64 IPF EBC 32 32 # 33 # DRIVER_BINDING = mTcp4DriverBinding 33 # DRIVER_BINDING = mTcp4DriverBinding 34 34 # COMPONENT_NAME = gTcp4ComponentName 35 35 # COMPONENT_NAME2 = gTcp4ComponentName2 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Main.c
r48674 r58466 54 54 /** 55 55 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 60 60 such as IPv4, MNP, or SNP. 61 61 … … 65 65 @param Tcp4ConfigData Pointer to the buffer to receive the current TCP 66 66 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 68 68 configuration data used by the TCPv4 instance. 69 69 @param MnpConfigData Pointer to the buffer to receive the current MNP … … 113 113 Initialize or brutally reset the operational parameters for 114 114 this EFI TCPv4 instance. 115 115 116 116 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 118 118 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 121 121 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 130 130 allowed through this instance. 131 131 … … 214 214 /** 215 215 Add or delete routing entries. 216 216 217 217 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 219 219 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. 221 221 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 225 225 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 231 231 implementation and every IP implementation must comply with RFC 1122. 232 232 … … 235 235 table; if FALSE, add the specified route to 236 236 routing table. 237 DestinationAddress and SubnetMask are used as 237 DestinationAddress and SubnetMask are used as 238 238 the keywords to search route entry. 239 239 @param SubnetAddress The destination network. 240 240 @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 243 243 address unless a direct route is specified. 244 244 245 245 @retval EFI_SUCCESS The operation completed successfully. 246 246 @retval EFI_NOT_STARTED The EFI_TCP4_PROTOCOL instance has not been … … 288 288 Initiate a nonblocking TCP connection request for an active TCP instance. 289 289 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, 297 297 otherwise, the state will return to Tcp4StateClosed. 298 298 299 299 @param This Pointer to the EFI_TCP4_PROTOCOL instance 300 300 @param ConnectionToken Pointer to the connection token to return when 301 301 the TCP three way handshake finishes. 302 302 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 305 305 been changed to Tcp4StateSynSent. 306 306 @retval EFI_NOT_STARTED This EFI_TCP4_PROTOCOL instance hasn't been … … 338 338 Listen on the passive instance to accept an incoming connection request. 339 339 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 345 345 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 348 348 can be called when current TCP instance is in Tcp4StateListen state. 349 349 … … 389 389 Queues outgoing data into the transmit queue. 390 390 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 393 393 will be signaled once the data is sent out or some error occurs. 394 394 … … 406 406 * A transmit completion token with the same 407 407 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 413 413 connection. 414 414 @retval EFI_NOT_READY The completion token could not be queued because … … 459 459 Place an asynchronous receive request into the receiving queue. 460 460 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 471 471 and receiving status. That notification function is guaranteed to not be re-entered. 472 472 … … 484 484 due to a lack of system resources. 485 485 @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 487 487 to startup defaults. 488 488 @retval EFI_ACCESS_DENIED One or more of the following conditions is TRUE: 489 489 * 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 496 496 connection. 497 497 @retval EFI_CONNECTION_FIN The communication peer has closed the connection … … 541 541 Disconnecting a TCP connection gracefully or reset a TCP connection. 542 542 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 550 550 is flushed. 551 551 … … 557 557 @retval EFI_NOT_STARTED The EFI_TCP4_PROTOCOL instance hasn't been 558 558 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: 560 560 * Configure() has been called with TcpConfigData 561 561 set to NULL and this function has not returned. … … 593 593 Abort an asynchronous connection, listen, transmission or receive request. 594 594 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 601 601 issued by Connect(), Accept(), Transmit() and Receive()will be aborted. 602 602 NOTE: It has not been implemented currently. 603 603 604 604 @param This Pointer to the EFI_TCP4_PROTOCOL instance. 605 605 @param Token Pointer to a token that has been issued by … … 607 607 NULL, all pending tokens issued by above four 608 608 functions will be aborted. 609 609 610 610 @retval EFI_SUCCESS The asynchronous I/O request is aborted and Token->Event 611 611 is signaled. … … 614 614 @retval EFI_NO_MAPPING When using the default address, configuration 615 615 (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 618 618 completed or wasn's issued by Transmit() and Receive(). 619 619 @retval EFI_UNSUPPORTED The operation is not supported in current 620 620 implementation. 621 621 622 622 **/ 623 623 EFI_STATUS … … 635 635 Poll to receive incoming data and transmit outgoing segments. 636 636 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 642 642 try calling the Poll() function in a high frequency. 643 643 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Main.h
r58459 r58466 54 54 IN VOID *Data OPTIONAL 55 55 ); 56 56 57 57 /// 58 58 /// TCP mode data … … 84 84 /** 85 85 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 90 90 such as IPv4, MNP, or SNP. 91 91 … … 95 95 @param Tcp4ConfigData Pointer to the buffer to receive the current TCP 96 96 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 98 98 configuration data used by the TCPv4 instance. 99 99 @param MnpConfigData Pointer to the buffer to receive the current MNP … … 125 125 Initialize or brutally reset the operational parameters for 126 126 this EFI TCPv4 instance. 127 127 128 128 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 130 130 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 133 133 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 142 142 allowed through this instance. 143 143 … … 169 169 /** 170 170 Add or delete routing entries. 171 171 172 172 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 174 174 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. 176 176 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 180 180 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 186 186 implementation and every IP implementation must comply with RFC 1122. 187 187 … … 190 190 table; if FALSE, add the specified route to 191 191 routing table. 192 DestinationAddress and SubnetMask are used as 192 DestinationAddress and SubnetMask are used as 193 193 the keywords to search route entry. 194 194 @param SubnetAddress The destination network. 195 195 @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 198 198 address unless a direct route is specified. 199 199 200 200 @retval EFI_SUCCESS The operation completed successfully. 201 201 @retval EFI_NOT_STARTED The EFI_TCP4_PROTOCOL instance has not been … … 225 225 Initiate a nonblocking TCP connection request for an active TCP instance. 226 226 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, 234 234 otherwise, the state will return to Tcp4StateClosed. 235 235 236 236 @param This Pointer to the EFI_TCP4_PROTOCOL instance 237 237 @param ConnectionToken Pointer to the connection token to return when 238 238 the TCP three way handshake finishes. 239 239 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 242 242 been changed to Tcp4StateSynSent. 243 243 @retval EFI_NOT_STARTED This EFI_TCP4_PROTOCOL instance hasn't been … … 261 261 Listen on the passive instance to accept an incoming connection request. 262 262 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 268 268 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 271 271 can be called when current TCP instance is in Tcp4StateListen state. 272 272 … … 298 298 Queues outgoing data into the transmit queue. 299 299 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 302 302 will be signaled once the data is sent out or some error occurs. 303 303 … … 315 315 * A transmit completion token with the same 316 316 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 322 322 connection. 323 323 @retval EFI_NOT_READY The completion token could not be queued because … … 339 339 Place an asynchronous receive request into the receiving queue. 340 340 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 351 351 and receiving status. That notification function is guaranteed to not be re-entered. 352 352 … … 364 364 due to a lack of system resources. 365 365 @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 367 367 to startup defaults. 368 368 @retval EFI_ACCESS_DENIED One or more of the following conditions is TRUE: 369 369 * 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 376 376 connection. 377 377 @retval EFI_CONNECTION_FIN The communication peer has closed the connection … … 392 392 Disconnecting a TCP connection gracefully or reset a TCP connection. 393 393 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 401 401 is flushed. 402 402 … … 408 408 @retval EFI_NOT_STARTED The EFI_TCP4_PROTOCOL instance hasn't been 409 409 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: 411 411 * Configure() has been called with TcpConfigData 412 412 set to NULL and this function has not returned. … … 430 430 Abort an asynchronous connection, listen, transmission or receive request. 431 431 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 438 438 issued by Connect(), Accept(), Transmit() and Receive()will be aborted. 439 439 NOTE: It has not been implemented currently. 440 440 441 441 @param This Pointer to the EFI_TCP4_PROTOCOL instance. 442 442 @param Token Pointer to a token that has been issued by … … 444 444 NULL, all pending tokens issued by above four 445 445 functions will be aborted. 446 446 447 447 @retval EFI_SUCCESS The asynchronous I/O request is aborted and Token->Event 448 448 is signaled. … … 451 451 @retval EFI_NO_MAPPING When using the default address, configuration 452 452 (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 455 455 completed or wasn's issued by Transmit() and Receive(). 456 456 @retval EFI_UNSUPPORTED The operation is not supported in current 457 457 implementation. 458 458 459 459 **/ 460 460 EFI_STATUS … … 468 468 Poll to receive incoming data and transmit outgoing segments. 469 469 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 475 475 try calling the Poll() function in a high frequency. 476 476 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Option.c
r48674 r58466 1 1 /** @file 2 2 Routines to process TCP option. 3 3 4 4 Copyright (c) 2005 - 2006, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 17 17 /** 18 18 Get a UINT16 value from buffer. 19 19 20 20 @param Buf Pointer to input buffer. 21 21 22 22 @return The UINT16 value get from buffer. 23 23 … … 35 35 /** 36 36 Get a UINT32 value from buffer. 37 37 38 38 @param Buf Pointer to input buffer. 39 39 40 40 @return The UINT32 value get from buffer. 41 41 … … 53 53 /** 54 54 Put a UINT32 value in buffer. 55 55 56 56 @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 58 58 59 59 **/ -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Option.h
r48674 r58466 1 1 /** @file 2 2 Tcp option's routine header file. 3 3 4 4 Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Output.c
r48674 r58466 1 1 /** @file 2 2 TCP output process routines. 3 3 4 4 Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 768 768 // FIN is set. 769 769 // 770 if ((Len == 0) && 770 if ((Len == 0) && 771 771 ((Flag & (TCP_FLG_SYN | TCP_FLG_FIN)) == 0)) { 772 772 return Sent; … … 806 806 807 807 DEBUG ( 808 (EFI_D_INFO, 808 (EFI_D_INFO, 809 809 "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, 812 812 mTcpStateName[Tcb->State]) 813 813 ); -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Proto.h
r48674 r58466 50 50 #define TCP_FLG_ACK 0x10 51 51 #define TCP_FLG_URG 0x20 52 52 53 53 // 54 54 // mask for all the flags 55 55 // 56 #define TCP_FLG_FLAG 0x3F 56 #define TCP_FLG_FLAG 0x3F 57 57 58 58 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Timer.c
r48674 r58466 1 1 /** @file 2 2 TCP timer related functions. 3 3 4 4 Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 38 38 IN OUT TCP_CB *Tcb 39 39 ); 40 40 41 41 /** 42 42 Timeout handler for window probe timer. … … 290 290 291 291 /** 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 293 293 to expire in a specific future time slot. 294 294 … … 556 556 } 557 557 } 558 558 559 559 // 560 560 // 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 176 176 177 177 GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE *gUdpControllerNameTable = NULL; 178 178 179 179 /** 180 180 Retrieves a Unicode string that is the user readable name of the driver. … … 238 238 @param Udp4[in] A pointer to the EFI_UDP4_PROTOCOL. 239 239 240 240 241 241 @retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully. 242 242 @retval EFI_INVALID_PARAMETER The input parameter is invalid. 243 243 244 244 **/ 245 245 EFI_STATUS … … 281 281 gUdpControllerNameTable = NULL; 282 282 } 283 283 284 284 Status = AddUnicodeString2 ( 285 285 "eng", … … 292 292 return Status; 293 293 } 294 294 295 295 return AddUnicodeString2 ( 296 296 "en", … … 389 389 return EFI_UNSUPPORTED; 390 390 } 391 391 392 392 // 393 393 // Make sure this driver produced ChildHandle -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Driver.c
r58459 r58466 31 31 /** 32 32 Callback function which provided by user to remove one node in NetDestroyLinkList process. 33 33 34 34 @param[in] Entry The entry to be removed. 35 35 @param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList. … … 195 195 must follow these calling restrictions. If any other agent wishes 196 196 to call Stop() it must also follow these calling restrictions. 197 197 198 198 @param[in] This Protocol instance pointer. 199 199 @param[in] ControllerHandle Handle of device to stop driver on … … 267 267 NULL 268 268 ); 269 269 270 270 Udp4CleanService (Udp4Service); 271 271 … … 283 283 /** 284 284 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. 288 288 If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle. 289 289 290 290 @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance. 291 291 @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, 293 293 then the protocol is added to the existing UEFI handle. 294 294 … … 420 420 /** 421 421 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 425 425 last protocol on ChildHandle, then ChildHandle is destroyed. 426 426 … … 498 498 gUdp4DriverBinding.DriverBindingHandle, 499 499 Instance->ChildHandle 500 ); 500 ); 501 501 502 502 // … … 548 548 the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including 549 549 both device drivers and bus drivers. 550 550 551 551 The entry point for Udp4 driver which installs the driver binding 552 552 and component name protocol on its ImageHandle. -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Driver.h
r48674 r58466 80 80 must follow these calling restrictions. If any other agent wishes 81 81 to call Stop() it must also follow these calling restrictions. 82 82 83 83 @param[in] This Protocol instance pointer. 84 84 @param[in] ControllerHandle Handle of device to stop driver on … … 102 102 /** 103 103 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. 107 107 If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle. 108 108 109 109 @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance. 110 110 @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, 112 112 then the protocol is added to the existing UEFI handle. 113 113 … … 128 128 /** 129 129 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 133 133 last protocol on ChildHandle, then ChildHandle is destroyed. 134 134 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
r58459 r58466 31 31 # VALID_ARCHITECTURES = IA32 X64 IPF EBC 32 32 # 33 # DRIVER_BINDING = gUdp4DriverBinding 33 # DRIVER_BINDING = gUdp4DriverBinding 34 34 # COMPONENT_NAME = gUdp4ComponentName 35 35 # COMPONENT_NAME2 = gUdp4ComponentName2 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c
r58459 r58466 1 1 /** @file 2 2 The implementation of the Udp4 protocol. 3 3 4 4 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.h
r58459 r58466 1 1 /** @file 2 2 EFI UDPv4 protocol implementation. 3 3 4 4 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 159 159 Initializes, changes, or resets the operational parameters for this instance of the EFI UDPv4 160 160 Protocol. 161 161 162 162 The Configure() function is used to do the following: 163 163 * Initialize and start this instance of the EFI UDPv4 Protocol. … … 186 186 EFI UDPv4 Protocol instance. 187 187 @retval EFI_DEVICE_ERROR An unexpected network or system error occurred and this instance 188 was not opened. 188 was not opened. 189 189 190 190 **/ … … 198 198 /** 199 199 Joins and leaves multicast groups. 200 200 201 201 The Groups() function is used to enable and disable the multicast group 202 202 filtering. If the JoinFlag is FALSE and the MulticastAddress is NULL, then all … … 235 235 /** 236 236 Adds and deletes routing table entries. 237 237 238 238 The Routes() function adds a route to or deletes a route from the routing table. 239 239 Routes are determined by comparing the SubnetAddress with the destination IP … … 283 283 /** 284 284 Queues outgoing data packets into the transmit queue. 285 285 286 286 The Transmit() function places a sending request to this instance of the EFI 287 287 UDPv4 Protocol, alongside the transmit data that was filled by the user. Whenever … … 320 320 /** 321 321 Places an asynchronous receive request into the receiving queue. 322 322 323 323 The Receive() function places a completion token into the receive packet queue. 324 324 This function is always asynchronous. … … 356 356 /** 357 357 Aborts an asynchronous transmit or receive request. 358 358 359 359 The Cancel() function is used to abort a pending transmit or receive request. 360 360 If the token is in the transmit or receive request queues, after calling this … … 391 391 /** 392 392 Polls for incoming data packets and processes outgoing data packets. 393 393 394 394 The Poll() function can be used by network drivers and applications to increase 395 395 the rate that data packets are moved between the communications device and the … … 692 692 VOID *Context 693 693 ); 694 694 695 695 #endif -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c
r58459 r58466 96 96 Initializes, changes, or resets the operational parameters for this instance of the EFI UDPv4 97 97 Protocol. 98 98 99 99 The Configure() function is used to do the following: 100 100 * Initialize and start this instance of the EFI UDPv4 Protocol. … … 123 123 EFI UDPv4 Protocol instance. 124 124 @retval EFI_DEVICE_ERROR An unexpected network or system error occurred and this instance 125 was not opened. 125 was not opened. 126 126 127 127 **/ … … 281 281 ASSERT (IsListEmpty (&Instance->DeliveredDgramQue)); 282 282 } 283 283 284 284 ON_EXIT: 285 285 … … 292 292 /** 293 293 Joins and leaves multicast groups. 294 294 295 295 The Groups() function is used to enable and disable the multicast group 296 296 filtering. If the JoinFlag is FALSE and the MulticastAddress is NULL, then all … … 393 393 /** 394 394 Adds and deletes routing table entries. 395 395 396 396 The Routes() function adds a route to or deletes a route from the routing table. 397 397 Routes are determined by comparing the SubnetAddress with the destination IP … … 467 467 /** 468 468 Queues outgoing data packets into the transmit queue. 469 469 470 470 The Transmit() function places a sending request to this instance of the EFI 471 471 UDPv4 Protocol, alongside the transmit data that was filled by the user. Whenever … … 696 696 /** 697 697 Places an asynchronous receive request into the receiving queue. 698 698 699 699 The Receive() function places a completion token into the receive packet queue. 700 700 This function is always asynchronous. … … 796 796 /** 797 797 Aborts an asynchronous transmit or receive request. 798 798 799 799 The Cancel() function is used to abort a pending transmit or receive request. 800 800 If the token is in the transmit or receive request queues, after calling this … … 867 867 /** 868 868 Polls for incoming data packets and processes outgoing data packets. 869 869 870 870 The Poll() function can be used by network drivers and applications to increase 871 871 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 317 317 EFI_HANDLE NicHandle; 318 318 EFI_STATUS Status; 319 319 320 320 if (ControllerHandle == NULL || ChildHandle != NULL) { 321 321 return EFI_UNSUPPORTED; -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c
r58459 r58466 158 158 } 159 159 // 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. 161 161 // If yes, try to parse options from the BootFileName field, then ServerName field. 162 162 // … … 216 216 if (Options[PXEBC_DHCP4_TAG_INDEX_BOOTFILE] != NULL) { 217 217 // 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 219 219 // terminated string. So force to append null terminated character at the end of string. 220 220 // … … 1562 1562 VendorOpt = &Packet->PxeVendorOption; 1563 1563 // 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 1566 1566 // following hold: 1567 1567 // - the PXE_DISCOVERY_CONTROL PXE tag is present inside the Vendor Options 1568 1568 // (=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 1570 1570 // - a boot file name has been presented with DHCP option 67. 1571 1571 // -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.h
r58459 r58466 298 298 299 299 This function will pad each item of dhcp4 message packet. 300 300 301 301 @param Seed Pointer to the message instance of the DHCP4 packet. 302 302 @param Udp4 Pointer to the EFI_UDP4_PROTOCOL instance. … … 343 343 /** 344 344 Callback routine. 345 345 346 346 EFI_DHCP4_CALLBACK is provided by the consumer of the EFI DHCPv4 Protocol driver 347 347 to intercept events that occurred in the configuration process. This structure … … 389 389 @param Layer PxeBc option boot item layer 390 390 @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 393 393 @param SrvList Server list 394 394 @param IsDiscv Discover the vendor or not … … 398 398 @retval EFI_OUT_OF_RESOURCES Allocate memory pool failed. 399 399 @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 402 402 **/ 403 403 EFI_STATUS … … 420 420 @param Private Pointer to PxeBc private data. 421 421 @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. 424 424 425 425 @return The index item number of the option list. … … 439 439 @param OptList Pointer to the list of the options 440 440 @param Type the type of option 441 @param Layer the layer of the boot options 441 @param Layer the layer of the boot options 442 442 @param OptLen length of opotion 443 443 … … 459 459 @param OptTag The option OpCode. 460 460 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 462 462 PXEBC_DHCP4_TAG_EOP, or the pointer to the buffer. 463 463 … … 493 493 494 494 @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. 496 496 @retval EFI_NOT_FOUND The proxy offer is not Pxe10. 497 497 @retval EFI_ABORTED User cancel the operation. 498 498 @retval EFI_NOT_READY Read the input key from the keybroad has not finish. 499 499 500 500 **/ 501 501 EFI_STATUS … … 511 511 @param Type The type of the menu. 512 512 @param UseDefaultItem Use default item or not. 513 513 514 514 @retval EFI_ABORTED User cancel operation. 515 515 @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. 517 517 518 518 **/ -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDriver.h
r48674 r58466 21 21 restrictions for this service. ConnectController() must 22 22 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. 24 24 PxeBc requires DHCP4 and MTFTP4 protocols. 25 25 … … 41 41 IN EFI_DEVICE_PATH_PROTOCOL * RemainingDevicePath OPTIONAL 42 42 ); 43 43 44 44 /** 45 45 Start this driver on ControllerHandle. This service is called by the … … 67 67 IN EFI_DEVICE_PATH_PROTOCOL * RemainingDevicePath OPTIONAL 68 68 ); 69 69 70 70 /** 71 71 Stop this driver on ControllerHandle. This service is called by the … … 75 75 must follow these calling restrictions. If any other agent wishes 76 76 to call Stop() it must also follow these calling restrictions. 77 77 78 78 @param This Protocol instance pointer. 79 79 @param ControllerHandle Handle of device to stop driver on … … 94 94 IN EFI_HANDLE *ChildHandleBuffer 95 95 ); 96 96 97 97 extern EFI_COMPONENT_NAME2_PROTOCOL gPxeBcComponentName2; 98 98 extern EFI_COMPONENT_NAME_PROTOCOL gPxeBcComponentName; -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
r58459 r58466 351 351 // 352 352 // 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) - 355 355 PXEBC_DEFAULT_UDP_OVERHEAD_SIZE - PXEBC_DEFAULT_TFTP_OVERHEAD_SIZE); 356 356 // … … 360 360 Private->BlockSize = (UINTN) PcdGet64 (PcdTftpBlockSize); 361 361 } 362 362 363 363 Private->AddressIsOk = FALSE; 364 364 … … 706 706 CopyMem (&Private->Ip4ConfigData.StationAddress, &Private->StationIp, sizeof (EFI_IPv4_ADDRESS)); 707 707 CopyMem (&Private->Ip4ConfigData.SubnetMask, &Private->SubnetMask, sizeof (EFI_IPv4_ADDRESS)); 708 708 709 709 // 710 710 // Reconfigure the Ip4 instance to capture background ICMP packets with new station Ip address. … … 712 712 Private->Ip4->Cancel (Private->Ip4, &Private->IcmpErrorRcvToken); 713 713 Private->Ip4->Configure (Private->Ip4, NULL); 714 714 715 715 Status = Private->Ip4->Configure (Private->Ip4, &Private->Ip4ConfigData); 716 716 if (EFI_ERROR (Status)) { 717 717 goto ON_EXIT; 718 718 } 719 719 720 720 Status = Private->Ip4->Receive (Private->Ip4, &Private->IcmpErrorRcvToken); 721 721 if (EFI_ERROR (Status)) { 722 722 goto ON_EXIT; 723 } 723 } 724 724 } 725 725 } … … 728 728 729 729 // 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 731 731 // receive filter list emptied and the filter set to EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP. 732 732 // … … 734 734 IpFilter.Filters = EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP; 735 735 This->SetIpFilter (This, &IpFilter); 736 736 737 737 return Status; 738 738 } … … 844 844 845 845 Status = EFI_INVALID_PARAMETER; 846 goto ON_EXIT; 846 goto ON_EXIT; 847 847 } 848 848 … … 868 868 // 869 869 Status = EFI_INVALID_PARAMETER; 870 goto ON_EXIT; 870 goto ON_EXIT; 871 871 } 872 872 … … 916 916 Status = EFI_OUT_OF_RESOURCES; 917 917 goto ON_EXIT; 918 919 } 920 918 919 } 920 921 921 CopyMem (CreatedInfo, &DefaultInfo, sizeof (DefaultInfo)); 922 922 Info = CreatedInfo; … … 945 945 if (Index != Info->IpCnt) { 946 946 Status = EFI_INVALID_PARAMETER; 947 goto ON_EXIT; 947 goto ON_EXIT; 948 948 } 949 949 } … … 985 985 if (!EFI_ERROR (Status)) { 986 986 break; 987 } 987 } 988 988 } 989 989 … … 1043 1043 1044 1044 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 1048 1048 // receive filter list emptied and the filter set to EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP. 1049 1049 // … … 1051 1051 IpFilter.Filters = EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP; 1052 1052 This->SetIpFilter (This, &IpFilter); 1053 1053 1054 1054 return Status; 1055 1055 } … … 1285 1285 Private->Udp4Read->Configure (Private->Udp4Read, &Private->Udp4CfgData); 1286 1286 // 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 1288 1288 // receive filter list emptied and the filter set to EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP. 1289 1289 // … … 1430 1430 return EFI_INVALID_PARAMETER; 1431 1431 } 1432 1432 1433 1433 ZeroMem (&Token, sizeof (EFI_UDP4_COMPLETION_TOKEN)); 1434 1434 ZeroMem (&Udp4Session, sizeof (EFI_UDP4_SESSION_DATA)); … … 1996 1996 } 1997 1997 } 1998 1998 1999 1999 // 2000 2000 // Check whether we need reconfigure the UDP instance. -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcMtftp.c
r58459 r58466 1 1 /** @file 2 2 PxeBc MTFTP functions. 3 3 4 4 Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 26 26 This is a callback function when packets received/transmitted in Mtftp driver. 27 27 28 A callback function that is provided by the caller to intercept 28 A callback function that is provided by the caller to intercept 29 29 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 32 32 EFI_MTFTP4_PROTOCOL.ReadFile(), WriteFile() or ReadDirectory(). 33 33 34 34 @param This Pointer to Mtftp protocol instance 35 35 @param Token Pointer to Mtftp token … … 38 38 39 39 @retval EFI_SUCCESS Operation sucess 40 @retval EFI_ABORTED Abort transfer process 40 @retval EFI_ABORTED Abort transfer process 41 41 42 42 **/ … … 89 89 /** 90 90 This function is to get size of a file by Tftp. 91 91 92 92 @param Private Pointer to PxeBc private data 93 93 @param Config Pointer to Mtftp configuration data … … 100 100 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. 101 101 @retval Other Has not get the size of the file. 102 102 103 103 **/ 104 104 EFI_STATUS … … 162 162 Private->Mode.TftpError.ErrorCode = (UINT8) Packet->Error.ErrorCode; 163 163 AsciiStrnCpy ( 164 Private->Mode.TftpError.ErrorString, 165 (CHAR8 *) Packet->Error.ErrorMessage, 164 Private->Mode.TftpError.ErrorString, 165 (CHAR8 *) Packet->Error.ErrorMessage, 166 166 PXE_MTFTP_ERROR_STRING_LENGTH 167 167 ); … … 227 227 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. 228 228 @retval other Read data from file failed. 229 229 230 230 **/ 231 231 EFI_STATUS … … 310 310 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. 311 311 @retval other Write data into file failed. 312 312 313 313 **/ 314 314 EFI_STATUS … … 381 381 @param DontUseBuffer Indicate whether with a receive buffer. 382 382 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. 384 384 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. 385 385 @retval other Operation failed. 386 386 387 387 **/ 388 388 EFI_STATUS -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcMtftp.h
r58459 r58466 1 1 /** @file 2 2 Mtftp routines for PxeBc. 3 3 4 4 Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 27 27 /** 28 28 This function is to get size of a file by Tftp. 29 29 30 30 @param Private Pointer to PxeBc private data 31 31 @param Config Pointer to Mtftp configuration data … … 38 38 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. 39 39 @retval Other Has not get the size of the file. 40 40 41 41 **/ 42 42 EFI_STATUS … … 64 64 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. 65 65 @retval other Read data from file failed. 66 66 67 67 **/ 68 68 EFI_STATUS … … 92 92 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. 93 93 @retval other Write data into file failed. 94 94 95 95 **/ 96 96 EFI_STATUS … … 117 117 @param DontUseBuffer Indicate whether with a receive buffer. 118 118 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. 120 120 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. 121 121 @retval other Operation failed. 122 122 123 123 **/ 124 124 EFI_STATUS -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.h
r48674 r58466 17 17 18 18 /** 19 The common notify function associated with various PxeBc events. 19 The common notify function associated with various PxeBc events. 20 20 21 21 @param Event The event signaled. … … 33 33 /** 34 34 This function initialize(or configure) the Udp4Write instance. 35 35 36 36 @param Udp4 Pointer to the EFI_UDP4_PROTOCOL instance. 37 37 @param StationIp Pointer to the station ip address. … … 39 39 @param Gateway Pointer to the gateway ip address. 40 40 @param SrcPort Pointer to the srouce port of the station. 41 41 42 42 @retval EFI_SUCCESS The configuration settings were set, changed, or reset successfully. 43 43 @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP, … … 54 54 was not opened. 55 55 @retval Others Please examine the function Udp4->Routes(Udp4, FALSE, &mZeroIp4Addr, &mZeroIp4Addr, Gateway) returns. 56 56 57 57 **/ 58 58 EFI_STATUS -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
r58459 r58466 35 35 # VALID_ARCHITECTURES = IA32 X64 IPF 36 36 # 37 # DRIVER_BINDING = gPxeBcDriverBinding 37 # DRIVER_BINDING = gPxeBcDriverBinding 38 38 # COMPONENT_NAME = gPxeBcComponentName 39 39 # COMPONENT_NAME2 = gPxeBcComponentName2 … … 52 52 PxeBcMtftp.h 53 53 PxeBcDriver.h 54 54 55 55 56 56 [Packages] … … 86 86 gEfiIp4ProtocolGuid ## TO_START 87 87 88 [Pcd] 89 gEfiMdeModulePkgTokenSpaceGuid.PcdTftpBlockSize ## SOMETIMES_CONSUMES 88 [Pcd] 89 gEfiMdeModulePkgTokenSpaceGuid.PcdTftpBlockSize ## SOMETIMES_CONSUMES 90 90 91 91 [UserExtensions.TianoCore."ExtraFiles"] -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfig.vfr
-
Property svn:eol-style
set to
native
-
Property svn:eol-style
set to
-
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDriver.c
r58459 r58466 280 280 return EFI_DEVICE_ERROR; 281 281 } 282 282 283 283 return UninstallVlanConfigForm (PrivateData); 284 284 } -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigImpl.c
r58459 r58466 328 328 } 329 329 } 330 330 331 331 HiiSetBrowserData (&gVlanConfigFormSetGuid, mVlanStorageName, sizeof (VLAN_CONFIGURATION), (UINT8 *) Configuration, NULL); 332 332 FreePool (Configuration); … … 600 600 EFI_STATUS Status; 601 601 EFI_VLAN_CONFIG_PROTOCOL *VlanConfig; 602 602 603 603 // 604 604 // 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
totext/plain;encoding=UTF-16LE
-
Property svn:mime-type
changed from
Note:
See TracChangeset
for help on using the changeset viewer.