/* Allocate a route entry then initialize it with the Destination/PrefixLength and Gateway. */
IP6_ROUTE_ENTRY* Ip6CreateRouteEntry(IN EFI_IPv6_ADDRESS *Destination OPTIONAL, IN UINT8 PrefixLength, IN EFI_IPv6_ADDRESS *GatewayAddress OPTIONAL)
/* Allocate a route entry then initialize it with the Destination/PrefixLength and Gateway. */
IP6_ROUTE_ENTRY* Ip6CreateRouteEntry(IN EFI_IPv6_ADDRESS *Destination OPTIONAL, IN UINT8 PrefixLength, IN EFI_IPv6_ADDRESS *GatewayAddress OPTIONAL)
{
  IP6_ROUTE_ENTRY  *RtEntry;
  RtEntry = AllocateZeroPool (sizeof (IP6_ROUTE_ENTRY));
  if (RtEntry == NULL) {
    return NULL;
  }
  RtEntry->RefCnt       = 1;
  RtEntry->Flag         = 0;
  RtEntry->PrefixLength = PrefixLength;
  if (Destination != NULL) {
    IP6_COPY_ADDRESS (&RtEntry->Destination, Destination);
  }
  if (GatewayAddress != NULL) {
    IP6_COPY_ADDRESS (&RtEntry->NextHop, GatewayAddress);
  }
  return RtEntry;
}