#define DNS_CLASS_HS 4\r
#define DNS_CLASS_ANY 255\r
\r
+//\r
+// Number of 100ns units time Interval for network media state detect\r
+//\r
+#define MEDIA_STATE_DETECT_TIME_INTERVAL 1000000U\r
+\r
+\r
#pragma pack(1)\r
\r
//\r
OUT BOOLEAN *MediaPresent\r
);\r
\r
+/**\r
+\r
+ Detect media state for a network device. This routine will wait for a period of time at \r
+ a specified checking interval when a certain network is under connecting until connection \r
+ process finishes or timeout. If Aip protocol is supported by low layer drivers, three kinds\r
+ of media states can be detected: EFI_SUCCESS, EFI_NOT_READY and EFI_NO_MEDIA, represents\r
+ connected state, connecting state and no media state respectively. When function detects \r
+ the current state is EFI_NOT_READY, it will loop to wait for next time's check until state \r
+ turns to be EFI_SUCCESS or EFI_NO_MEDIA. If Aip protocol is not supported, function will \r
+ call NetLibDetectMedia() and return state directly.\r
+\r
+ @param[in] ServiceHandle The handle where network service binding protocols are\r
+ installed on.\r
+ @param[in] Timeout The maximum number of 100ns units to wait when network\r
+ is connecting. Zero value means detect once and return\r
+ immediately.\r
+ @param[out] MediaState The pointer to the detected media state.\r
+\r
+ @retval EFI_SUCCESS Media detection success.\r
+ @retval EFI_INVALID_PARAMETER ServiceHandle is not a valid network device handle or \r
+ MediaState pointer is NULL.\r
+ @retval EFI_DEVICE_ERROR A device error occurred.\r
+ @retval EFI_TIMEOUT Network is connecting but timeout.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+NetLibDetectMediaWaitTimeout (\r
+ IN EFI_HANDLE ServiceHandle,\r
+ IN UINT64 Timeout,\r
+ OUT EFI_STATUS *MediaState\r
+ );\r
+\r
+\r
/**\r
Create an IPv4 device path node.\r
\r