History log of /device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
418373a1cd97abc0c0e3557f7a00105291829e6f 25-Nov-2016 Jiaxin Wu <jiaxin.wu@intel.com> MdeModulePkg/NetLib: Handle an invalid IPv6 address case

Handle an invalid IPv6 address in NetLibAsciiStrToIp6(),
like '2000:aaaa::1com'.

Cc: Zhang Lubo <lubo.zhang@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
67bb14259baaf2237b81bcbf2568517b3310b294 18-Nov-2016 Jiaxin Wu <jiaxin.wu@intel.com> MdeModulePkg/DxeNetLib: Allow the IPv4/prefix case when AsciiStrToIp4

This patch is used to allow the IPv4 with prefix case.

Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
3289dcba45e48af5c4fd329f57c49cc8e5830ed8 27-Oct-2016 Fu Siyuan <siyuan.fu@intel.com> 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>
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
3b28e7448de6ef8ed94036bffe23c67dc20a7aff 19-Oct-2016 Gary Lin <glin@suse.com> MdeModulePkg/Library: Fix typos in comments and variables

- servity -> severity
- TURE -> TRUE
- contiue -> continue
- Pepresentation -> Representation
- suported -> supported
- opints -> points
- sucessfully -> successfully
- hexidecimal -> hexadecimal
- Pacakge -> Package
- Libary -> Library
- successull -> successfully
- reseting -> resetting
- Retrive -> Retrieve
- dirver -> driver
- availible -> available
- chracter -> character
- seperator -> separator

Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
d82d59edb0ec23e6ef708e04a5553ac32f1eb12e 19-Aug-2016 Zhang Lubo <lubo.zhang@intel.com> MdeModulePkg:Fix bug in function AsciiStrToIp4.

If a FQDN contains 3 dots '.' like "a.b.c.com", the AsciiStrToIp4
will return success as the HostName has a valid IP address. So we
need to check if it is a decimal character before using AsciiStrDecimalToUintn.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
b68ccac17c7e6340ab7b3654ea51c86ad6b4201d 15-Jun-2016 Star Zeng <star.zeng@intel.com> MdeModulePkg: Replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr

It is the follow up of 3ab41b7a325ca11a12b42f5ad1661c4b6791cb49
to replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr with
UnicodeStrToAsciiStrS/AsciiStrToUnicodeStrS.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
364f4efa444150df3f074f563374dce1e153adc6 08-Apr-2016 Zhang Lubo <lubo.zhang@intel.com> MdeModulePkg: Add new macros and refine codes

Add 2 macros inNetLib.h
#define IP4_MASK_MAX 32
#define IP6_PREFIX_MAX 128
we will use these two macros to check the max mask/prefix length,
instead of
#define IP4_MASK_NUM 33
#define IP6_PREFIX_NUM 129
which means a valid number.
This will make the code readability and maintainability.

Cc: Subramanian Sriram <sriram-s@hpe.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
dba6e9a935dc6728f1f29af103dab3dbcb695167 21-Jan-2016 Jiaxin Wu <jiaxin.wu@intel.com> MdeModulePkg: Define a general function to create DNS QName

This patch is used to define a general function to create
DNS QName.
QName is a domain name represented as a sequence
of labels, where each label consists of a length octet
followed by that number of octets. The domain name terminates
with the zero length octet for the null label of the root.

Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Cc: El-Haj-Mahmoud Samer <samer.el-haj-mahmoud@hpe.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
33ecfa8af9e36f80d6faf154f64e3d185dd55f5a 30-Sep-2015 Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com> MdeModulePkg: Add SMBIOS 3.0 support in NetLibGetSystemGuid.

NetLibGetSystemGuid gets the UUID from SMBIOS table to use as the System GUID
(in DHCP and other network use cases). This change adds support to get the
UUID from either SMBIOS 2.x or 3.0, since SMBIOS 3.0 uses a different GUID in
the System Configuration Table.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18559 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
2bd25290f3841c135342737c01a7e4336b72b271 07-Aug-2015 Fu Siyuan <siyuan.fu@intel.com> MdeModulePkg: Use monotonic count to initialize the NetLib random seed.

NetRandomInitSeed() function use current time to initialize the random seed,
while in some platform the time service is not accuracy that make the random
seed collision. This patch add the monotonic count to the seed to avoid this.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18185 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
206b5f51beb15a22417c42e846678425de60c556 08-Jul-2015 Zhang Lubo <lubo.zhang@intel.com> MdeModulePkg: Replace unsafe string functions.

Replace unsafe string functions with new added safe string functions.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17881 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
6c5c70d68d868a69d33bb3f7f6e7c673b664c199 08-Jul-2015 jiaxinwu <jiaxin.wu@intel.com> MdeModulePkg: Remove NetLib and Ip4Config Protocol dependency.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: jiaxinwu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hp.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17873 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
3ce454dd402a4fd96b95208943b5faf34a169c44 27-Nov-2013 Fu Siyuan <siyuan.fu@intel.com> Update NetLibGetMacAddress() to handle the case correctly when SNP is absent.

Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ni, Ruiyu <ruiyu.ni@intel.com>
Reviewed-by: Jin, Eric <eric.jin@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14904 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
6879581d2eb67defc68ec800b369b70dec04a07b 25-Apr-2013 sfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524> Update dual network stack drivers to produce multiple Driver Binding Protocol.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Ouyang Qian <qian.ouyang@intel.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14315 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
f8c075d112ebb41f2dfc693426c33a9ed2e9bb22 24-Dec-2012 sfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524> 1. Fix buffer overflow bugs in SNP, MNP and IP6 driver.
2. Fix GCC build fail issue in DxeNetLib.

Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Ouyang Qian <qian.ouyang@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14017 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
1f7eb561d906e47d6dec2fb1406c1a8694f2bd38 17-Dec-2012 sfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524> Fix GCC build fail issue for MdeModulePkg and NetworkPkg.

Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Ouyang Qian <qian.ouyang@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14007 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
216f79703b8cb8dc65abdd768bedb2bcdbc1a1f8 13-Dec-2012 sfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524> 1. Add EFI_COMPONENT_NAME2_PROTOCOL.GetControllerName() support.
2. Fix the driver binding Stop() hang issue in the network stack.
3. Add Ip4 raw data support.
4. Add iSCSI Dhcp option 60 support.

Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Ouyang Qian <qian.ouyang@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13995 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
75dce340624dba5e4a79b2e5b2dbe943bae0d0e9 17-Oct-2012 sfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524> 1. Fix a bug in PXE driver that the PXE boot do not restart if a new boot option on the different IP stack is selected.
2. Retrieve the IP information after iSCSI TCPv6 connection established and fill it into iBFT table.
3. Generate a random IAID for each NIC port to require different IPv6 address in PXE driver.
4. Update function EfiMtftp6Configure() and Mtftp6RrqHandleOack() to allocate at most one UdpIo.
5. Fix a typo from “destory” to “destroy” in network code.

Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Ouyang Qian <qian.ouyang@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13859 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
b00ed21ac6490ced364a58359034aa49b8af9647 25-Jun-2012 tye1 <tye1@6f19259b-4bc3-4df7-8a09-765794883524> Add OPTIONAL attribute to parameter ‘ImageHandle’ in NetLibGetMacString to benefit consumer of this API.


Signed-off by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu, Siyuan <Siyuan.fu@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13471 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
501793fad4084c43828ba2f4e2d9355d29abe9f7 26-Oct-2011 niruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524> Adopt new IPv4/IPv6 device path for network modules.
Signed-off-by: tye
Reviewed-by: niruiyu

Adopt SasEx and new IPv6 device path for DevicePathDxe driver.
Signed-off-by: niruiyu
Reviewed-by: erictian

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12574 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
e20d6513edbdd12114558969baea0fc3fa829b0f 26-Oct-2011 xdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524> MdeModulePkg: Enhance error handling in NetLibGetMacAddress() of DxeNetLib.

Signed-off-by: xdu2
Reviewed-by: vanjeff

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12572 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
57b301b569ec392b7bcad5f19a44fe93e0502a7f 14-Jul-2011 hhuan13 <hhuan13@6f19259b-4bc3-4df7-8a09-765794883524> 1. Define a netlib library function NetLibGetSystemGuid()
2. Update PXE driver to use NetLibGetSystemGuid()

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12017 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
3af91e23cbafdc7a6b91e22bb1882be70ea269d3 10-Aug-2010 rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> Minor code refinement.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10785 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
775455633400aaba9161b5bb97b48f0df059bd88 06-Aug-2010 jjin9 <jjin9@6f19259b-4bc3-4df7-8a09-765794883524> Fix IP address text representation issue about leading zeros
1.It keeps the rule that Leading zero’s compression(Yes/Not) need to be consistent throughout the whole IP address.
2.It also fixes some issue to recognize some invalid representation.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10777 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
ad108abec9975a32aec9776acd6125fb159f267a 28-Jul-2010 lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> Roll back change r10696, because new update on r10700 and r10701 handles this issue.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10705 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
79bcf0554bd91975095b3c4acf9e0c6a8f447588 26-Jul-2010 lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> Make sure gBS FreePool() is used to free the buffer always allocated by gBS AllocatePool() service.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10696 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
1dc1b43fc2a3739a01680a6dd848d0359bdc829d 01-Jul-2010 vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> 1. fixed one bug to construct config request string header used child handle instead of NIC controller handle.
2. fixed one bug to calculate buffer size.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10617 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
cd5ebaa06dca3e6ef3c464081e6defe00d358c69 24-Apr-2010 hhtian <hhtian@6f19259b-4bc3-4df7-8a09-765794883524> Update the copyright notice format

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10420 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
e798cd87ca9a3a30c4cea50c5f5de84e10a8bc5a 17-Apr-2010 geekboy15a <geekboy15a@6f19259b-4bc3-4df7-8a09-765794883524> Fixed GCC 4.4 build issues due to EFIAPI not being used when required.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10379 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
3b1464d5ac4e8b917c54b9f29a43ad972d2a2c85 19-Mar-2010 rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10288 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
dd29f3edb9849b7bb51f0ae4be8941a760846ef3 03-Feb-2010 xdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524> For network dynamic media support:
1. add library function NetLibDetectMedia to NetLib for media detection
2. update MnpDxe to periodically poll for media status update and check for media status before packet transmit
3. update Ip4Dxe to return ModeData using Mnp->GetModeData()
4. update IScsiDxe to check for media status before try to do DHCP and session login
5. update UefiPxeBcDxe to check for media status before PXE start

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9919 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
04bb6788ddc58a354e487ea27e5a4194102fc4b5 01-Feb-2010 qianouyang <qianouyang@6f19259b-4bc3-4df7-8a09-765794883524> MdeModulePkg\Library\DxeNetLib: Update the NetLibStrToIp6andPrefix() to return different values for two situations - a. The Input string doesn’t contain the prefix length; b. The prefix length contains prefix length and the prefix length is zero.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9898 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
9b6f044a327dabb0a8cd3a38e8c0249fefbcc8af 25-Jan-2010 tye1 <tye1@6f19259b-4bc3-4df7-8a09-765794883524> Update according to two review comments:
1. add some comments to clarify AsciiStrDecimalToUintn() can help filtering un-decimal characters.

2. change the condition judgment to “Index < 15” rather than (Index + 1 ) <16.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9803 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
e4ef0031cd0c6dfd9085576bc09266090899a8ba 25-Jan-2010 tye1 <tye1@6f19259b-4bc3-4df7-8a09-765794883524> Add StrToIp functions to NetLib.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9798 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
95157291b0d5d1c4438a19a1f6695077ba580334 12-Jan-2010 tye <tye@6f19259b-4bc3-4df7-8a09-765794883524> Fix the warning: Line 389, the Index of mMonthName may be -1.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9714 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
70b689905c0ea1c9782f45dcce66f37986e886d9 11-Jan-2010 tye <tye@6f19259b-4bc3-4df7-8a09-765794883524> Add ASSERT () to make sure the array is accessed within the limit.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9709 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
e285199897e538523f762cb5b3900e81f872035a 08-Jan-2010 vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> refine the code and add more security check.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9691 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
779ae3579848a36319d67a6ba012b4b9aa88aa6b 30-Dec-2009 xdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524> Add VLAN support.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9649 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
1204fe8319e5e6f77df68c375ef403e9ffa9227e 30-Dec-2009 xdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524> Code clean up in NetLib:
1. Add GLOBAL_REMOVE_IF_UNREFERENCED to all globals
2. Update NTOHL and NTOHS to be BaseLib func SwapBytes32/SwapBytes16
3. Remove duplicate NET_SWAP_SHORT (to use NTOHS instead)

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9648 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
f6b7393ceb34c9b3a27434268bf2ce517047641f 04-Nov-2009 tye <tye@6f19259b-4bc3-4df7-8a09-765794883524> [Change summary]:
1. Update NetLib to a combined NetLib support dual network stack:
1) Add Network Debug facility for IPv4 stack.
2) Extend the library APIs to support IPv6 stack:
a. NetIp6IsUnspecifiedAddr
b. NetIp6IsLinkLocalAddr
c. NetIp6IsNetEqual
d. NetLibCreateIPv6DPathNode.
e. NetIp6PseudoHeadChecksum
f. NetIp6IsValidUnicast
3) Update the structure definitions:
a. Update NET_BUF to add EFI_IP6_HEADER and EFI_UDP_HEADER
b. Add NET_IP6_PSEUDO_HDR
4) Update Ip4IsUnicast to NetIp4IsUnicast

2. Update the impacted modules to adopt the combined NetLib.

3. Clean up coding style errors in all network drivers and libraries.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9391 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
b45b45b2d248892930620c33a9d01d8457ae0e54 30-Oct-2009 tye <tye@6f19259b-4bc3-4df7-8a09-765794883524> 1. Update the UdpIo to a combined UdpIo to support both v4 and v6 stack.
2. Update Dhcp4 and Mtftp4 driver to adopt the combined UdpIo.
3. Clean up coding style problems in combined IpIoLib/NetLib. Update Tcp4 and Udp4 to adopt the changes.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9382 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
fb115c61504fe6c4f94be0a87f75e28e1684657f 26-Oct-2009 tye <tye@6f19259b-4bc3-4df7-8a09-765794883524> NetLib:
1. Add new interface Ip6IsValidUnicast
2. Add new enum IP6_EXTENSION_HEADER_TYPE
3. Add new structure IP6_ICMP_* definitions
4. Update structure from EFI_UDP4_HEADER to EFI_UDP_HEADER
5. Add new macro EFI_IP6_EQUAL


IpIoLib:
1. Update the IpIoLib to a combined library for both v4 and v6 network stack
2. Fix a bug in IpIoIcmpHandler() - for IPv6 packet, the header length is variable (basic header + extension) rathar than fixed length.
The fix removes the IPv6 header fields and notify the user with the ICMPv6 packet only containing payload.

TcpDxe/UdpDxe:
1. Update to adapt the new combined IpIoLib
2. Add gEfiIp6ProtocolGuid/gEfiIp6ServiceBindingProtocolGuid to [Protocols] in INF file since the Ip6.h is included in IpIoLib and NetLib.
3. Pass the TCP4/UDP4 UEFI SCT test on NT32 platform.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9374 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
d8d26fb207e02aa5ef57e2bcb213f9dda16166cc 12-Jul-2009 mdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524> Retire NetLibQueueDpc() and NetLibDispatchDpc() and use QueueDpc() and DispatchDpc() from the DpcLib instead.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8897 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
894d038a8d0e99d456042e2b6d1554c4a406ea70 29-Jun-2009 vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> add security check.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8680 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
752ef5d80c099b1d33bf25f62f36289dac47d83c 21-May-2009 mdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524> Add includes for definitions used by the DxeIpIoLib and DxeNetLib


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8359 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
ce4106bec492fc943bb37c488f5c75944498e99d 20-May-2009 vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> enhanced to support more routing table entry.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8342 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
638868496cafa80a7212f654559944f34f65598a 13-May-2009 vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> 1. retired NicIp4ConfigProtocolGuid
2. moved NicIp4ConfigVariableGuid to Include/Guid/NicIp4ConfigNvData.h
3. updated Ip4ConfigDxe module to publish one setup page to Get/Set network parameters. Also, Ip4ConfgiDxe installed EFI HII Config Access protocol for each network devices.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8309 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
8f5e6151d506b69e4156eeb401a3bbc9f03a4a8d 13-Jan-2009 ywu21 <ywu21@6f19259b-4bc3-4df7-8a09-765794883524> fix file header issues
add . at the end of lines

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7259 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
b9008c87ebabcdd2bde1b8a7fd6497a8bbb20b1e 29-Dec-2008 ywu21 <ywu21@6f19259b-4bc3-4df7-8a09-765794883524> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7144 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
3e7104c26f426dd418b4bee2c8115470262af78f 23-Dec-2008 ywu21 <ywu21@6f19259b-4bc3-4df7-8a09-765794883524> Remove #include <Protocol/LoadedImage.h>
Remove //#include <Protocol/Ip4.h>
Remove #include <Library/UefiLib.h>
Fix one function header description error

Fix filer header
Fix function header
Fix return status issues
Fix in out issues
Fix no Boolean expression issues


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7096 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
ac7e320cb8326befd240020db709151884c889bc 01-Dec-2008 lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> Remove NibbleToHexChar() function from BaseLib

Move IsHexDigit, BufToHexString, HexStringToBuf from BaseLib to MdeModulePkg IfrSupportLib. The reason is:
1) IsHexDigit function provides the logic to check Hex Digit and convert it to Decimal value, which is required by IScsi LUN and HII user input. But this logic is not provided by any functions in MdeLib. So, it can't be deleted. It is moved to IfrSupportLib.
2) BufToHexString function converts a array of buffers to hex string. If the buffer length is less than sizeof (UINT64), it can be directly replaced by UnicodeValueToString(). But HII modules may use BufToHexString to convert the buffers whose length > sizeof (UINT64). For example:
.\MdeModulePkg\Universal\HiiDatabaseDxe\ConfigRouting.c line 201, 1148
.\Universal\SetupBrowserDxe\Setup.c line line 1457, 1503
Like this case, it is not easy to use UnicodeValueToString to replace BufToHexString. So, BufToHexString is still kept. Because such usages are in HII modules, this function is moved to IfrSupportLib.
3) HexStringToBuf is moved to IfrSupportLib. The reason is similar to BufToHexString.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6782 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
1232b21473646661a4ac1ae4b7bf5113d4613e83 11-Nov-2008 klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> 1, Add <Library/DevicePathLib.h> for all source that use device path utility macros
2, Add DevicePathLib library class to module's INF that use device path utility macros

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6456 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
e1a590c3e7d1d4947d870944408f1471e3655e2f 05-Nov-2008 klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> Add missing include for protocol header file.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6404 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
347cacceeff77048b63a5a7a1308ff3bab358c78 05-Nov-2008 klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> Remove over specific protocol for library DxeIpIoLib
add missing protocol header file for DxeNetLib

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6390 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
fe1e36e550c6ffcd2561903d434683d3939e1942 30-Oct-2008 jji4 <jji4@6f19259b-4bc3-4df7-8a09-765794883524> Patch to remove STATIC modifier. This is on longer recommended by EFI Framework coding style. All duplicated symbols has been renamed accordingly.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6296 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
2a86ff1cb089d7fb1589e1da54ea880721371000 11-Jul-2008 lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> Code Scrub for DxeCrc32GuidedSectionExtractLib library instance.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5455 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
36fe40c2ea61a81b7f004886682e55fb2d5358be 23-May-2008 qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> 1) Add BufToHexString, HexStringToBuf and IsHexDigit to BaseLib.
2) Remove the duplicated functions implementation from the modules that reference these APIs

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5283 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
7b414b4ed6ccdefce8e167ecc7d67ad64118eb94 11-Apr-2008 vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> 1. add public functions header.
2. apply for doxgen format for file header.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5043 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
e48e37fce2611df7a52aff271835ff72ee396d9b 14-Feb-2008 vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> Use Mde library and definition instead of some native definitions in NetLib, to simply network library.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4693 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
3012ce5cf75f938a79c70568595454e27b2f014a 17-Jan-2008 vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> 1. Fixed bugs in DxeNetLib to meet consistence with network module DriverBinding protocol.
2. Sync bugs in console modules.
3. Sync bugs in PlatDriOverLib.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4571 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
36ee91ca3661d3d020a7841aacbf858d885c4728 20-Nov-2007 vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> 1. Add DPC protocol and DpcLib library in MdeModulePkg.
2. Add DpcDxe module and DxeDpcLib module in MdeModulePkg
3. Port network stack module to use DPC.
4. Use MIN, and MAX defined in MdePkg to replace NET_MIN and NET_MAX.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4307 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
da1d02010d73465a9c2b21f619e8c01cb00bd1fa 28-Sep-2007 qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> Clear up network stack to use R9 MdeLib:
1.Use driver model APIs in UefiLib
2.Register Unload Image in INF/MSA to be included in autogen code.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3962 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
e5e12de7d0a67111060c77723df39885c91a8ea5 27-Aug-2007 vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> 1. Sync the latest network stack. Add NetLibCreateIPv4DPathNode () in netlib library.
2. Fixed one porting bug in Udp4Impl.c

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3717 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
84b5c78e89686879f799a4cd095eeef83ff7cf34 27-Aug-2007 qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> Make MdeModulePkg GCC clean.
It also pass ICC+IPF and MYTOOLS+EBC build.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3711 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
772db4bb33ae66fa20e39f786b5f80d107d450a5 30-Jul-2007 vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> Import ArpDxe, Dhcp4Dxe, Ip4Dxe, Mtftp4Dxe, PxeBcDxe and PxeDhcp4Dxe.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3492 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
4eb65aff715faafd9040c6fc85a5d59e22343978 25-Jul-2007 vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> Fixed EBC build issues.
Fixed ICC build issues.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3431 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
cbf316f20726bb31b7c37424601643790dbd02d9 23-Jul-2007 vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> 1. Import NetLib, IpIoLib and UdpIoLib class definitions
2. Import DxeNetLib, DxeIpIoLib and DxeUdpIoLib libraries instances
2. Port Ip4Config module

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3405 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c