path: root/core/fs/pxe/tcp.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix all warnings, and better separate code that should not be mixedsyslinux-6.04-pre3H. Peter Anvin (Intel)2019-02-071-25/+0
| | | | | | | | | Clean up a number of warnings in the tree. Refactor especially the core code so we don't end up building a bunch of BIOS-specific code for EFI, and general build cleanups. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* efi: Add network supportsyslinux-6.00-pre5Matt Fleming2013-04-231-56/+3
| | | | | | | | | | | | | | | | | | | | | | | | Add TCP and UDP support to the EFI firmware backend. This necessitated moving all tcp functions to a core_tcp_* prefix so that they could be implemented differently for BIOS+lwip and EFI. Unfortunately, the tcp_* prefix is already in use by the lwip code. To maintain symmetry, the UDP functions were also moved from net_core_* to core_udp_*. The net_core API was introduced in 5.x to allow the legacy PXE and lwip stacks to live side by side, and the intention was that net_core_init() would take a protocol argument to build a protocol-specific object. It turned out to be easier to call either udp or tcp functions directly because the semantics of read/write differ between protocols. Booting an IPv4 EFI PXE stack using tftp and http has been tested. There are a couple of TODO items left, o dns resolve code is missing o ftp hasn't been tested Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* Merge remote-tracking branch 'zytor/elflink' into for-hpa/elflink/firmwareMatt Fleming2013-04-111-14/+14
|\ | | | | | | | | | | Conflicts: core/Makefile core/fs/pxe/pxe.h
| * pxe: disentangle the legacy and lwip stacks without #ifdefH. Peter Anvin2013-03-281-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disentangle the dependencies via the legacy and the lwip stacks. Now there are no more #ifdefs (except for a single one in pxelinux.asm) and the only difference between the pxelinux and lpxelinux archives are which files are included. To make this happen: 1. Replace the private part of the socket structure with a union. 2. Move the list of URL methods into a stack-dependent file. Reported-by: Josh Triplett <josh@joshtriplett.org> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | Merge tag 'syslinux-5.10-pre2' into for-hpa/elflink/firmwareMatt Fleming2013-03-221-1/+1
|/ | | | | | | | | | | | | | | | | | syslinux-5.10-pre2 Conflicts: NEWS com32/include/netinet/in.h com32/include/sys/cpu.h com32/lib/Makefile core/Makefile core/fs/diskio.c core/fs/pxe/pxe.h core/init.c core/mem/free.c core/mem/malloc.c mk/devel.mk version
* net: Return of the legacy network stackMatt Fleming2013-03-061-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | While it's nice having the shiny new lwIP stack, there is definitely merit in being able to choose between two different network stacks. We want to keep the legacy network stack around as it is known to handle funky BIOS implementations and provides a good reference point when bugs are suspected in the lwIP code. Users now have a choice of .0 files. pxelinux.0 uses the legacy network stack, while lpxelinux.0 uses lwIP. Note that not every protocol is converted to using this new API. The http, ftp and tcp code is still inherently tied to the netconn API, and is only available with lpxelinux.0 and the lwIP stack. It's unlikely that this code will ever be fixed up to work with the legacy network stack. Network stack operations are abstracted behind the net_core_* interface, and each network stack has private data fields contained within a struct net_private. Cc: H. Peter Anvin <hpa@zytor.com> Cc: Eric W. Biederman <ebiederm@xmission.com> Cc: Gene Cumm <gene.cumm@gmail.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* core/pxe: lwip changes to netconn_recvGene Cumm2012-04-271-2/+2
| | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* pxe: move the per-connection-type operations into a structureH. Peter Anvin2011-05-011-1/+6
| | | | | | | Move the per-connection-type operations into a structure, to make it easier to modify them in the future. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* pxe: tcp: close the connection before freeing the buffersH. Peter Anvin2011-04-241-4/+4
| | | | | | | As long as the connection is opened, we may end up receiving data, so don't free the receive buffers until after the connection is closed. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* pxe: tcp: always call the close methodH. Peter Anvin2011-04-241-1/+2
| | | | | | | | Always call the designated close method, instead of assuming it is tcp_close_file(). This isn't the case for FTP, which also needs to manage the control connection. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* pxe: move operations common to TCP-based protocols to a common fileH. Peter Anvin2011-04-231-0/+72
Move operations that are common to all TCP-based protocols into a common file, tcp.c. Signed-off-by: H. Peter Anvin <hpa@zytor.com>