Age | Commit message (Collapse) | Author | Files | Lines |
|
There are two dedicated DHCP options for loading PXELINUX config files,
option 209 (config file name) and 210 (path prefix). We should support
them, too, in case some users want to configure their boot flow this way.
See RFC 5071 and the following URL for more details:
https://www.syslinux.org/wiki/index.php?title=PXELINUX#DHCP_options
Unlike most other strings in libnet, I've chosen to not use fixed-size
arrays for these two strings, but to allocate the memory via malloc here.
We always have to make sure not to overflow the stack in Paflof, so
adding 2 * 256 byte arrays to struct filename_ip sounded just too
dangerous to me.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
This way we can easily re-use the rc --> string translation in later
patches.
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
When we will support loading of pxelinux.cfg files later, we have to call
the tftp load function multiple times from different places. To avoid that
we've also got to pass around the ip_version information via function para-
meters to all spots, let's rather put it into struct filename_ip instead
since we've got this struct filename_ip info available everywhere already.
While we're at it, also drop the __attribute__((packed)) from the struct.
The struct is only used internally, without exchanging it with the outside
world, so the attribute is certainly not necessary here.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
The blocksize is hard-coded to 1428 bytes in obp-tftp.fs, so instead of
hardcoding this in the Forth code, we could also move this into tftp.c
directly instead. A similar condition exists with the huge-tftp-load
parameter. While this non-standard variable could still be changed in the
obp-tftp package, it does not make much sense to set it to zero since you
only lose the possibility to do huge TFTP loads with index wrap-around in
that case.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
For some strange reasons, the libnet code is using int8_t arrays for
strings in a couple of places where it really does not make any sense.
Therefor a lot of "(char *)" casts are needed when the code is using
the string functions from the libc. Let's change the strings to use
"char" instead of "int8_t" so we can get rid of a lot of these casts.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
The code does not exist in the repository, so it does not make
sense to keep the prototypes and the Forth wrapper around.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
Unfortunately netapps.h currently can't be included from .code
Forth-to-C wrapper files - it includes tftp.h which in turn
includes ipv6.h, and that header contains some constructs which
can't be used in .code files. So let's make netapps.h independent
from tftp.h and add some "extern" keywords like it is done with
the other header files already that are included from .code files.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
When we want to link the network stack to other parts of the
firmware later (paflof), we've got to turn it into a proper
library first.
Note: Make sure to run "make distclean" after this patch, so that
the dependencies for the moved files get rebuilt properly.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|