31 if (IpAddr == IpIf->Ip) {
32 return IP4_LOCAL_HOST;
33 }
else if (IpAddr == IpIf->SubnetBrdcast) {
34 return IP4_SUBNET_BROADCAST;
35 }
else if (IpAddr == IpIf->NetBrdcast) {
36 return IP4_NET_BROADCAST;
72 if (IpSb->MnpConfigData.EnablePromiscuousReceive) {
73 Type = IP4_PROMISCUOUS;
79 NET_LIST_FOR_EACH (Entry, &IpSb->Interfaces) {
86 if (!IpIf->Configured || IP4_IS_BROADCAST (
Ip4GetNetCast (Src, IpIf))) {
101 if (Dst == IP4_ALLONE_ADDRESS) {
105 return IP4_LOCAL_BROADCAST;
107 }
else if (IP4_IS_MULTICAST (Dst) && (
Ip4FindGroup (&IpSb->IgmpCtrl, Dst) !=
NULL)) {
108 return IP4_MULTICAST;
132 NET_LIST_FOR_EACH (Entry, &IpSb->Interfaces) {
135 if (IpIf->Configured && (IpIf->Ip == Ip)) {
161 NET_LIST_FOR_EACH (Entry, &IpSb->Interfaces) {
164 if (IpIf->Configured && IP4_NET_EQUAL (Ip, IpIf->Ip, IpIf->SubnetMask)) {
192 NET_LIST_FOR_EACH (Entry, &IpSb->Interfaces) {
195 if (IpIf->Configured && (IpIf->Ip == Ip) && (IpIf->SubnetMask == Netmask)) {
220 IN IP4_ADDR Multicast,
226 EFI_IP4 (EfiIp.v4) = HTONL (Multicast);
227 return Mnp->McastIpToMac (Mnp,
FALSE, &EfiIp, Mac);
245 Head->TotalLen = NTOHS (Head->TotalLen);
246 Head->Id = NTOHS (Head->Id);
247 Head->Fragment = NTOHS (Head->Fragment);
248 Head->Src = NTOHL (Head->Src);
249 Head->Dst = NTOHL (Head->Dst);
275 if (Netmask == IP4_ALLZERO_ADDRESS) {
276 return (BOOLEAN)(Ip == IP4_ALLZERO_ADDRESS);
INTN Ip4GetHostCast(IN IP4_SERVICE *IpSb, IN IP4_ADDR Dst, IN IP4_ADDR Src)
IP4_INTERFACE * Ip4FindInterface(IN IP4_SERVICE *IpSb, IN IP4_ADDR Ip)
INTN Ip4GetNetCast(IN IP4_ADDR IpAddr, IN IP4_INTERFACE *IpIf)
IP4_HEAD * Ip4NtohHead(IN IP4_HEAD *Head)
IP4_INTERFACE * Ip4FindStationAddress(IN IP4_SERVICE *IpSb, IN IP4_ADDR Ip, IN IP4_ADDR Netmask)
BOOLEAN Ip4StationAddressValid(IN IP4_ADDR Ip, IN IP4_ADDR Netmask)
IP4_INTERFACE * Ip4FindNet(IN IP4_SERVICE *IpSb, IN IP4_ADDR Ip)
EFI_STATUS Ip4GetMulticastMac(IN EFI_MANAGED_NETWORK_PROTOCOL *Mnp, IN IP4_ADDR Multicast, OUT EFI_MAC_ADDRESS *Mac)
IGMP_GROUP * Ip4FindGroup(IN IGMP_SERVICE_DATA *IgmpCtrl, IN IP4_ADDR Address)
BOOLEAN EFIAPI NetIp4IsUnicast(IN IP4_ADDR Ip, IN IP4_ADDR NetMask)
INTN EFIAPI NetGetIpClass(IN IP4_ADDR Addr)
INTN EFIAPI NetGetMaskLength(IN IP4_ADDR NetMask)