summaryrefslogtreecommitdiff
path: root/StdLib/EfiSocketLib
AgeCommit message (Collapse)Author
2013-02-27Otherwise gcc can default to the "sysv_abi" (as opposed to the "ms_abi") ↵lpleahy
calling convention on X64, causing problems like <http://sourceforge.net/mailarchive/message.php?msg_id=30356166>. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14148 6f19259b-4bc3-4df7-8a09-765794883524
2013-02-08Increase sockets performance by increasing the maximum buffer sizes.lpleahy
Tested using: DataSource/DataSink Signed-off-by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14125 6f19259b-4bc3-4df7-8a09-765794883524
2013-02-08Allow fragmentation of large UDP packetslpleahy
Reviewed-by: Ankit Singh of Dell Signed-off-by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14124 6f19259b-4bc3-4df7-8a09-765794883524
2012-10-08Poll the network adapter during connectlpleahy
Signed-off-by: lpleahy Reviewed-by: Dell, Sreenivasula Reddy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13803 6f19259b-4bc3-4df7-8a09-765794883524
2012-10-08Fixed close for socket to properly release the socket context structure and ↵lpleahy
the handle. Signed-off-by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13802 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-10Modify UDP and IP to transmit on all network adapters instead of just the ↵lpleahy
first network adapter. Fix comment in Socket.c. Signed-off-by: lpleahy Reviewed and tested by: Sreenivasula Reddy of Dell git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13713 6f19259b-4bc3-4df7-8a09-765794883524
2012-08-10Return the proper status after one of the ports is configured for UDP or IP ↵lpleahy
communications. Reviewed by: Ankit Singh of Dell Submitted by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13604 6f19259b-4bc3-4df7-8a09-765794883524
2012-06-29Choose a better subnet mask value for the IPv4 address.lpleahy
Signed-off-by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13479 6f19259b-4bc3-4df7-8a09-765794883524
2012-06-26Define the global variables as weak to enable the proper linking with ↵lpleahy
applications and the Sockets driver. Submitted-by: Oliver Martin Reviewed-by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13475 6f19259b-4bc3-4df7-8a09-765794883524
2012-06-22Fix listen exit path when last port returns an error.lpleahy
Signed-off-by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13466 6f19259b-4bc3-4df7-8a09-765794883524
2012-06-08Fix port retry behavior during connect - All port error paths exit through ↵lpleahy
ConnectComplete to try the next port. When the last port fails to connect, the port error status to errno translation gets done by ConnectPoll. Testing: Using two network adapters, second one always connected to the network. 1. Eth0 not configured, not connected - short delay 2. Eth0 not configured, connected - short delay 3. Eth0 configured, not connected - short delay 4. Eth0 configured, connected to private network - long delay due to connection timeout, failover to Eth1 5. Eth1 configured, connected, no server - long delay due to connection timeout, returned timeout error. Signed-off-by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13436 6f19259b-4bc3-4df7-8a09-765794883524
2012-06-07Only use ports with a network connection (media present) when connecting to ↵lpleahy
a remote host. Fix bug causing early exit with NO_MEDIA. Add fix to TCP6. Signed-off-by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13432 6f19259b-4bc3-4df7-8a09-765794883524
2012-06-04Only use ports with a network connection (media present) when connecting to ↵lpleahy
a remote host. Signed-off-by: lpleahy Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13427 6f19259b-4bc3-4df7-8a09-765794883524
2012-06-01UseEfiSocketLib.c - Only exit for out of resources, otherwise use all ↵lpleahy
network adapters. Service.c - Return EFI_SUCCESS if any of the protocols are present. Return failure only when no protocols are available or no more memory available. Signed-off-by: lpleahy Reviewed-by: vzimmer git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13426 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-05Fix read issue detected by the following Python program. The issue was that ↵lpleahy
the caller's buffer pointer was not being advanced between segments of the read data. Signed-off-by: lpleahy ----- UnbufferedRead.py ----- import httplib conn = httplib.HTTPConnection("10.241.97.30") conn.request('GET', '/') resp = conn.getresponse(buffering=True) if resp.status != 200: print "status:", resp.status print "aborting" sys.exit(1) while True: chunk = resp.read() if not chunk: break print chunk git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13077 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-24Fix issues detected by python web-server.lpleahy
* Removed display of TPL * Added NOP implementation for SO_REUSEADDR * Add better detection of socket address * Return first address Signed-off-by: lpleahy Python Web server below: --------------- import sys import BaseHTTPServer from SimpleHTTPServer import SimpleHTTPRequestHandler HandlerClass = SimpleHTTPRequestHandler ServerClass = BaseHTTPServer.HTTPServer Protocol = "HTTP/1.0" port = 80 server_address = ('', port) HandlerClass.protocol_version = Protocol httpd = ServerClass(server_address, HandlerClass) sa = httpd.socket.getsockname() print "Serving HTTP on", sa[0], "port", sa[1], "..." httpd.serve_forever() git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13034 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-15Bug fix: CreateEvent sometimes returning EFI_INVALID_PARAMETER due to bad ↵lpleahy
TPL value. Use known good TPL value since TPL is a don't care. Found, reviewed and tested by: Duane Voth Signed-off-by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13017 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-09Merged socket development branch:lpleahy
* Fixed bug report (Duane Voth: Python sockets test application not working) by starting the receive operations when a connection is established! * Increased performance by extending the idle loop into the network stack with the Poll call. * Added support for TCPv6 (SOCK_STREAM) and UDPv6 (SOCK_DGRAM). * Added support for getaddrinfo and getnameinfo calls. * Moved application PCD values into AppPkg Signed-off-by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13002 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-30Fix compilation errors detected with GCC 4.4lpleahy
Signed-off-by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12504 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-30Update the sockets library codelpleahy
* Passes conformance and functional tests. * Builds with GCC 4.4 compiler. Signed-off by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12497 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-08Better handle transmit errorslpleahy
Return 0 receive bytes when socket is closed git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12099 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-08Remove SocketPkg referenceslpleahy
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12096 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-02Fix GCC build breaks.darylm503
Fix case mismatch for includes of "Socket.h". Original code was <socket.h> while file was Socket.h in the same directory as the .c file. Add EFIAPI to function declarations so that they match the definition. Remove "ineffective" statements from stub functions. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12076 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-30Add Socket Libraries.darylm503
Add Posix functions for porting compatibility. Fix compliance issues with ISO/IEC 9899:199409 New Functions: setenv(), fparseln(), GetFileNameFromPath(), rename(), realpath(), setprogname(), getprogname(), strlcat(), strlcpy(), strsep(), setitimer(), getitimer(), timegm(), getopt(), basename(), mkstemp(), ffs(), vsnprintf(), snprintf(), getpass(), usleep(), select(), writev(), strcasecmp(), getcwd(), chdir(), tcgetpgrp(), getpgrp(), gettimeofday(), bcopy(), git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12061 6f19259b-4bc3-4df7-8a09-765794883524