freebsd-dev/lib/libstand
Toomas Soome da8fb057e5 loader: network read rework
The current read from network is working from up to down - we have some
protocol needing the data from the network, so we build the buffer space
for that protocol, add the extra space for headers and pass this buffer
down to be filled by nif get call in hope, we have guessed the incoming
packet size right. Amazingly enough this approach mostly does work, but
not always...

So, this update does work from down to up - we allocate buffer (based
on MTU or frame size info), fill it up, and pass on for upper layers.
The obvious problem is that when we should free the buffer - if at all.

In the current implementation the upper layer will free the packet on error
or when the packet is no longer needed.

While working on the issue, the additional issue did pop up - the bios
implementation does not have generic get/put interface but is using pxe
udpsend/udpreceive instead. So the udp calls are gone and undi interface
is implemented instead. Which in turn means slight other changes as we
do not need to have duplicated pxe implementation and can just use dev_net.

To align packet content, the actual read from nic is using shifted buffer by
ETHER_ALIGN (2).

Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D10232
2017-05-06 20:32:27 +00:00
..
amd64 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
i386 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
mips Merge @228176 from Perforce to fix a bug introduced in r249553: 2013-04-28 14:40:29 +00:00
powerpc Fix loader on PowerPC following r279784. It turns out that, due to .PATH 2015-03-09 02:19:44 +00:00
sparc64 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
__main.c
arp.c loader: network read rework 2017-05-06 20:32:27 +00:00
assert.c
bcd.c
bootp.c loader: network read rework 2017-05-06 20:32:27 +00:00
bootp.h loader: network read rework 2017-05-06 20:32:27 +00:00
bootparam.c loader: network read rework 2017-05-06 20:32:27 +00:00
bootparam.h
bzipfs.c
cd9660.c dosfs support in libstand is broken since r298230 2016-12-30 19:06:29 +00:00
close.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
closeall.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
dev.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
dosfs.c libstand/dosfs: cache FAT32 in 128 Kb blocks to save loader memory 2017-04-06 20:12:39 +00:00
dosfs.h libstand/dosfs: cache FAT32 in 128 Kb blocks to save loader memory 2017-04-06 20:12:39 +00:00
environment.c Fix an inappropriate free of a non-dynamic value. While here, make the 2013-12-18 17:03:43 +00:00
ether.c loader: network read rework 2017-05-06 20:32:27 +00:00
ext2fs.c prefix UFS symbols with UFS_ to reduce namespace pollution 2017-02-15 19:50:26 +00:00
fstat.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
getopt.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
gets.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
globals.c distinguish NFS versus TFTP boot by rootpath 2017-05-06 19:23:58 +00:00
gzipfs.c
in_cksum.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
inet_ntoa.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
ioctl.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
iodesc.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
libstand.3 Fix usage example in kvprintf(9) and its copy in libstand(3): trailing '\n' 2015-01-23 07:30:57 +00:00
lseek.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
Makefile Add explicit_bzero() to libstand, and switch GELIBoot to using it 2017-03-31 00:04:32 +00:00
Makefile.depend DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
nandfs.c prefix UFS symbols with UFS_ to reduce namespace pollution 2017-02-15 19:50:26 +00:00
net.c loader: network read rework 2017-05-06 20:32:27 +00:00
net.h loader: network read rework 2017-05-06 20:32:27 +00:00
netif.c loader: network read rework 2017-05-06 20:32:27 +00:00
netif.h loader: network read rework 2017-05-06 20:32:27 +00:00
nfs.c loader: network read rework 2017-05-06 20:32:27 +00:00
nfsv2.h Remove OLD_NFSV2 from loader and libstand 2017-03-30 19:32:25 +00:00
nullfs.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
open.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
pager.c
pkgfs.c Add pkgfs, a file system implementation for reading files out of a 2014-07-31 23:25:13 +00:00
printf.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
qdivrem.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
quad.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
random.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
rarp.c loader: network read rework 2017-05-06 20:32:27 +00:00
read.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
readdir.c
rpc.c loader: network read rework 2017-05-06 20:32:27 +00:00
rpc.h loader: network read rework 2017-05-06 20:32:27 +00:00
rpcv2.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
saioctl.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
sbrk.c Set the malloc alignment to 64 bytes on platforms that use the U-Boot API 2014-02-05 22:53:58 +00:00
splitfs.c
stand.h loader: want mechanism to avoid RA with bcache 2017-04-06 15:57:53 +00:00
stat.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
strcasecmp.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
strdup.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
strerror.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
strtol.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
strtoul.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
tftp.c loader: network read rework 2017-05-06 20:32:27 +00:00
tftp.h
twiddle.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
udp.c loader: network read rework 2017-05-06 20:32:27 +00:00
ufs.c prefix UFS symbols with UFS_ to reduce namespace pollution 2017-02-15 19:50:26 +00:00
uuid_from_string.c Fix a bug in the parsing code: always use the len and not 8. 2016-05-20 05:33:26 +00:00
uuid_to_string.c Make tohex() work as expected. 2016-01-09 08:04:29 +00:00
write.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
zalloc_defs.h Set the malloc alignment to 64 bytes on platforms that use the U-Boot API 2014-02-05 22:53:58 +00:00
zalloc_malloc.c
zalloc_mem.h Set the malloc alignment to 64 bytes on platforms that use the U-Boot API 2014-02-05 22:53:58 +00:00
zalloc_protos.h
zalloc.c Set the malloc alignment to 64 bytes on platforms that use the U-Boot API 2014-02-05 22:53:58 +00:00