Commit Graph

19 Commits

Author SHA1 Message Date
Liming Gao f75a7f568e NetworkPkg: Clean up source files
1. Do not use tab characters
2. No trailing white space in one line
3. All files must end with CRLF

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
2018-06-28 11:19:49 +08:00
fanwang2 152f2d5e45 NetworkPkg: Update Api from NetLibDetectMedia to NetLibDetectMediaWaitTimeout.
Since new Api NetLibDetectMediaWaitTimeout was involved to support connecting
state handling, and it is forward compatible. So apply this Api in NetworkPkg.

V2:
   *Define time period in a macro instead of hard code.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wang Fan <fan.wang@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Signed-off-by: fanwang2 <fan.wang@intel.com>
2017-12-18 16:38:24 +08:00
Zhang Lubo eabc6e59b9 NetworkPkg: Add dns support for target URL configuration in ISCSI.
v2:
*1. Add IScsiDnsIsConfigured function in IScsiSupported to check
attempt using DNS protocol or not.2. Fix wrongs typos in IScsiDns.c
and .uni file.3. define a macro for the length of target URL.4.
update the Copyright to 2017.

Add DNS support for target URL directly configuration in UI.

Besides, When we enable the option (Get target info via DHCP) ,
the dhcp server will return target info include the  rootpath,
like the format
"iscsi:"<servername>":"<protocol>":"<port>":"<LUN>":"<targetname>
According to the RFC 4173,the server name region is expressed as
IPv4(192.168.10.20 )or IPv6 ([2000:bbbb::3]) or domain name,
but currently we only support the IP address format.
To enable this feature, we can support both.

Another enhancement is that we can deal with the data received from
the iSCSI login response with an target redirection status,
in which contains the Target Address in the format
domainname[:port][,portal-group-tag] required by RFC 3720.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@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: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
2017-01-19 11:31:57 +08:00
Zhang Lubo 9c3dcd0f56 NetworkPkg: Support bracketed IPv6 address during a redirection in iSCSI
According to RFC 3720, the TargetAddress provided in a redirection
might be a DNS host name, a dotted-decimal IPv4 address, or a
bracketed IPv6 address. Current ISCSI driver in Networkpkg only
supports dotted-decimal IPv4 address, so we need add IPv6 address
support since it is a combo driver supporting dual stack.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
2016-10-26 16:43:31 +08:00
Gary Lin d1c85a17fa NetworkPkg: Fix typos in comments
- assocated -> associated
- malformated -> malformatted
- mal-formated -> mal-formatted
- formated -> formatted
- octects -> octets
- responsiblity -> responsibility
- enought -> enough
- immediatly -> immediately
- integar -> integer
- Alogrithem -> Algorithm
- Initializeion -> Initialization
- primelenght -> primelength
- Vlaue -> Value
- perfoms -> performs
- randome -> random
- verifed -> verified
- finallization -> finalization
- Intializes -> Initializes
- specifed -> specified
- if -> If
- Decrption -> Decryption
- Autahentication -> Authentication
- informatino -> information
- alogrithm -> algorithm
- Authenticaion -> Authentication
- Alogrithem -> Algorithm
- containning -> containing
- paramter -> parameter

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-By: Siyuan Fu <siyuan.fu@intel.com>
Reviewed-By: Jiaxin Wu <jiaxin.wu@intel.com>
2016-10-26 08:50:03 +08:00
Ye Ting a2d59ef291 NetworkPkg: Record user configured TargetIP/Port in iBFT
Current ISCSI driver records redirected iSCSI targetIP/Port in iBFT
once redirection occurs, which removes the possibility of the OS
to reconnect to the configured IP for load balancing. The behavior
is not explicitly described in IBFT spec, though the MSFT expert
confirm we should record original user setting rather than
publish the redirected IP.

Thanks Sriram for reviewing and validating this patch in his test-bed.

Cc: Subramanian Sriram <sriram-s@hpe.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Subramanian Sriram <sriram-s@hpe.com>
2016-10-14 10:54:26 +08:00
Hao Wu 689c9d975d NetworkPkg IScsiDxe: Fix build error for lastest VS2015 compiler
The IScsiDxe module encounters a build error for IA32 arch using the
latest version of VS2015:

IScsiDxe.lib(IScsiProto.obj) : error LNK2001: unresolved external symbol
__allmul

The cause is line 141 in file NetworkPkg\IScsiDxe\IScsiProto.c. The third
parameter for gBS->SetTimer() function is of type UINT64, so the
multiplication should use the MultU64x32() function now.

Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-07-26 13:43:45 +08:00
Zhang Lubo 7c275b3cde NetworkPkg: Replace ASSERT with error handling in Http boot and IScsi
v2:
*Fix some memory leak issue.

This patch is used to replace ASSERT with error handling in Http boot
Driver and IScsi driver.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@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: Wu Jiaxin <jiaxin.wu@intel.com>
2016-06-23 09:27:14 +08:00
Eric Dong 94866d4035 Update code to support VS2013 tool chain.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15693 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-28 07:43:23 +00:00
Fu Siyuan cb162780fe Re-execute the failed SCSI command if iSCSI driver could reinstates the session successfully.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Dong, Guo <guo.dong@intel.com>
Reviewed-by: Tian, Feng <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15152 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-22 01:57:06 +00:00
Wu Jiaxin 0b10bb6f43 Fix a bug about iSCSI initiator(based on NetworkPkg-IPv4 network stack) cannot reinstate session with Windows iSCSI target.
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com >
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Jin Eric <eric.jin@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14862 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-19 05:52:10 +00:00
Ye Ting 03b08d7a06 Fix an issue that execute "map -r" in NT32 simulator cannot reinstate iSCSI session with Linux iSCSI target after unplug/plug network cable.
Signed-off-by: Ye Ting  <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14783 6f19259b-4bc3-4df7-8a09-765794883524
2013-10-18 02:49:13 +00:00
Ye Ting e8b1fb2e60 Fix an issue that execute "map -r" in UEFI shell cannot reinstate iSCSI session with Microsoft iSCSI target after unplug/plug network cable.
Signed-off-by: Ye Ting  <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14781 6f19259b-4bc3-4df7-8a09-765794883524
2013-10-18 02:43:34 +00:00
Fu Siyuan 6c657d742e Roll back the changes in revision 14294 since it will cause iSCSI security authentication issue.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ouyang Qian <qian.ouyang@intel.com> 
Reviewed-by: Ye Ting <ting.ye@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14461 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-10 05:52:58 +00:00
tye1 4304bf6945 Add transit bit check for detecting partial response in iSCSI stack.
Signed-off-by: Ye Ting  <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Tian Feng <feng.tian@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14294 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-19 06:19:40 +00:00
sfu5 75dce34062 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
2012-10-17 08:23:41 +00:00
tye1 75acfab6c3 Removes irrelevant parameter during negotiation to avoid login fail.
Signed-off-by: Ye Ting<ting.ye@intel.com>
Reviewed by: Ouyang, Qian <qian.ouyang@intel.com>
Reviewed by: Tian, Feng<feng.tian@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13193 6f19259b-4bc3-4df7-8a09-765794883524
2012-04-12 09:54:59 +00:00
ydong10 7a49cd0875 Update code to avoid potential access violation.
Signed-off-by: Dong Eric <eric.dong@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Ouyang Qian <Ouyang.qian@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13175 6f19259b-4bc3-4df7-8a09-765794883524
2012-04-10 02:27:05 +00:00
tye1 4c5a5e0cfe Add IScsiDxe driver to NetworkPkg in order to support iSCSI over IPv6 stack and iSCSI MPIO.
Signed-off-by: tye1
Reviewed-by: hhuan13
Reviewed-by: eric_tian


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12149 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-17 02:38:08 +00:00