summaryrefslogtreecommitdiffstats
path: root/src/usr/route.c
Commit message (Collapse)AuthorAgeFilesLines
* [build] Fix the REQUIRE_SYMBOL mechanismMichael Brown2015-03-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | At some point in the past few years, binutils became more aggressive at removing unused symbols. To function as a symbol requirement, a relocation record must now be in a section marked with @progbits and must not be in a section which gets discarded during the link (either via --gc-sections or via /DISCARD/). Update REQUIRE_SYMBOL() to generate relocation records meeting these criteria. To minimise the impact upon the final binary size, we use existing symbols (specified via the REQUIRING_SYMBOL() macro) as the relocation targets where possible. We use R_386_NONE or R_X86_64_NONE relocation types to prevent any actual unwanted relocation taking place. Where no suitable symbol exists for REQUIRING_SYMBOL() (such as in config.c), the macro PROVIDE_REQUIRING_SYMBOL() can be used to generate a one-byte-long symbol to act as the relocation target. If there are versions of binutils for which this approach fails, then the fallback will probably involve killing off REQUEST_SYMBOL(), redefining REQUIRE_SYMBOL() to use the current definition of REQUEST_SYMBOL(), and postprocessing the linked ELF file with something along the lines of "nm -u | wc -l" to check that there are no undefined symbols remaining. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Use REQUIRE_OBJECT() to drag in per-object configurationMichael Brown2015-03-051-0/+3
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Relicense files under GPL2_OR_LATER_OR_UBDLMichael Brown2015-03-021-1/+5
| | | | | | | Relicense files for which I am the sole author (as identified by util/relicense.pl). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ipv4] Abstract out protocol-specific portions of "route" commandMichael Brown2013-09-031-13/+11Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Update FSF mailing address in GPL licence textsMichael Brown2012-07-201-1/+2
| | | | | Suggested-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Rename gPXE to iPXEMichael Brown2010-04-201-2/+2
| | | | | | | | | | | Access to the gpxe.org and etherboot.org domains and associated resources has been revoked by the registrant of the domain. Work around this problem by renaming project from gPXE to iPXE, and updating URLs to match. Also update README, LOG and COPYRIGHTS to remove obsolete information. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Add netdev_is_open() wrapper functionMichael Brown2010-03-231-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [ipv4] Use a zero address to indicate "no gateway", rather than INADDR_NONEMichael Brown2009-11-161-1/+1
| | | | | | | | | | | | | | | ipv4.c uses a gateway address of INADDR_NONE to represent "no gateway". It initialises the gateway address to INADDR_NONE before calling fetch_ipv4_setting() to retrieve the configured gateway address (if any). However, as of commit 612f4e7 "[settings] Avoid returning uninitialised data on error in fetch_xxx_setting()", fetch_ipv4_setting() will zero the IP address if the setting does not exist, rather than leaving it unaltered. Fix by using a zero IP address to indicate "no gateway", so that a non-existent gateway address setting will be treated as such.
* [legal] Add a selection of FILE_LICENCE declarationsMichael Brown2009-05-181-0/+2
| | | | | Add FILE_LICENCE declarations to almost all files that make up the various standard builds of gPXE.
* Use stdio.h instead of vsprintf.hMichael Brown2007-01-191-1/+1
|
* Warn when net device on an active route is not open.Michael Brown2007-01-101-0/+2
|
* Add route() function to display routing table.Michael Brown2007-01-101-0/+41