/* Return the length of the mask, the correct value is from 0 to 32. If the mask is invalid, return the invalid length 33, which is IP4_MASK_NUM. NetMask is in the host byte order. */
INTN EFIAPI NetGetMaskLength(IN IP4_ADDR NetMask)
/* Return the length of the mask, the correct value is from 0 to 32. If the mask is invalid, return the invalid length 33, which is IP4_MASK_NUM. NetMask is in the host byte order. */
INTN EFIAPI NetGetMaskLength(IN IP4_ADDR NetMask)
{
  INTN  Index;
  for (Index = 0; Index <= IP4_MASK_MAX; Index++) {
    if (NetMask == gIp4AllMasks[Index]) {
      break;
    }
  }
  return Index;
}