]> git.proxmox.com Git - mirror_edk2.git/commit - MdeModulePkg/Include/Library/NetLib.h
MdeModulePkg: Update NetLib interface to support classless addressing.
authorFu Siyuan <siyuan.fu@intel.com>
Thu, 27 Oct 2016 01:22:08 +0000 (09:22 +0800)
committerFu Siyuan <siyuan.fu@intel.com>
Fri, 28 Oct 2016 06:19:46 +0000 (14:19 +0800)
commit3289dcba45e48af5c4fd329f57c49cc8e5830ed8
tree3109dce4b674a6981181aeb2db8aba438ad18653
parent6440385b17def888544c2454ffba58384b929a22
MdeModulePkg: Update NetLib interface to support classless addressing.

The classful addressing (IP class A/B/C) has been deprecated according to
RFC4632. This patch updates the NetLib NetGetIpClass() and NetIp4IsUnicast()
accordingly.

NetGetIpClass()
The function is kept for compatibility, while the caller of this function
could only check the returned value against with IP4_ADDR_CLASSD (multicast)
or IP4_ADDR_CLASSE (reserved) now. The function has been updated to note this.

NetIp4IsUnicast()
The NetMask becomes a required parameter to check the unicast address.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
MdeModulePkg/Include/Library/NetLib.h
MdeModulePkg/Library/DxeNetLib/DxeNetLib.c