/* Add a group address to the array of group addresses. The caller should make sure that no duplicated address existed in the array. Although the function doesn't assume the byte order of the both Source and Addr, the network byte order is used by the caller. */
IP4_ADDR* Ip4CombineGroups(IN IP4_ADDR *Source, IN UINT32 Count, IN IP4_ADDR Addr)
/* Add a group address to the array of group addresses. The caller should make sure that no duplicated address existed in the array. Although the function doesn't assume the byte order of the both Source and Addr, the network byte order is used by the caller. */
IP4_ADDR* Ip4CombineGroups(IN IP4_ADDR *Source, IN UINT32 Count, IN IP4_ADDR Addr)
{
  IP4_ADDR  *Groups;
  Groups = AllocatePool (sizeof (IP4_ADDR) * (Count + 1));
  if (Groups == NULL) {
    return NULL;
  }
  CopyMem (Groups, Source, Count * sizeof (IP4_ADDR));
  Groups[Count] = Addr;
  return Groups;
}