return TRUE;\r
}\r
\r
+/**\r
+ Check whether the incoming IPv6 address is a valid unicast address.\r
+\r
+ If the address is a multicast address has binary 0xFF at the start, it is not\r
+ a valid unicast address. If the address is unspecified ::, it is not a valid\r
+ unicast address to be assigned to any node. If the address is loopback address\r
+ ::1, it is also not a valid unicast address to be assigned to any physical\r
+ interface. \r
+\r
+ @param[in] Ip6 The IPv6 address to check against.\r
+\r
+ @return TRUE if Ip6 is a valid unicast address on the network, otherwise FALSE.\r
+\r
+**/ \r
+BOOLEAN\r
+Ip6IsValidUnicast (\r
+ IN EFI_IPv6_ADDRESS *Ip6\r
+ ) \r
+{\r
+ UINT8 t;\r
+ UINT8 i;\r
+ \r
+ if (Ip6->Addr[0] == 0xFF) {\r
+ return FALSE;\r
+ }\r
+\r
+ for (i = 0; i < 15; i++) {\r
+ if (Ip6->Addr[i] != 0) {\r
+ return TRUE;\r
+ }\r
+ }\r
+\r
+ t = Ip6->Addr[i];\r
+\r
+ if (t == 0x0 || t == 0x1) {\r
+ return FALSE;\r
+ }\r
+\r
+ return TRUE; \r
+}\r
\r
/**\r
Initialize a random seed using current time.\r