summaryrefslogtreecommitdiffstats
path: root/src/usr/ifmgmt.c
Commit message (Collapse)AuthorAgeFilesLines
* [netdevice] Separate out the concept of hardware and link-layer addressesMichael Brown2009-08-121-1/+1
| | | | | | | | | | | The hardware address is an intrinsic property of the hardware, while the link-layer address can be changed at runtime. This separation is exposed via APIs such as PXE and EFI, but is currently elided by gPXE. Expose the hardware and link-layer addresses as separate properties within a net device. Drivers should now fill in hw_addr, which will be used to initialise ll_addr at the time of calling register_netdev().
* [ifmgmt] Move link-up status messages from autoboot() to iflinkwait()Joshua Oreman2009-06-241-7/+27
| | | | | | | | | | | | With the addition of link status codes, we can now display a detailed error indication if iflinkwait() fails. Putting the error output in iflinkwait avoids code duplication, and gains symmetry with the other interface management routines; ifopen() already prints an error directly if it cannot open its interface. Modified-by: Michael Brown <mcb30@etherboot.org> Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [netdevice] Add mechanism for reporting detailed link status codesMichael Brown2009-06-241-0/+4
| | | | | | | | Expand the NETDEV_LINK_UP bit into a link_rc status code field, allowing specific reasons for link failure to be reported via "ifstat". Originally-authored-by: Joshua Oreman <oremanj@rwcr.net>
* [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.
* [ui] Allow Ctrl-C to cancel wait for net device link-upMichael Brown2009-01-271-0/+9
| | | | | This really ought to be handled via monojob.c and the usual Ctrl-C mechanism that handles cancelling DHCP or file downloads.
* [netdevice] Retain and report detailed error breakdownsMichael Brown2008-11-081-2/+23
| | | | | | | | | | netdev_rx_err() and netdev_tx_complete_err() get passed the error code, but currently use it only in debug messages. Retain error numbers and frequencey counts for up to NETDEV_MAX_UNIQUE_ERRORS (4) different errors for each of TX and RX. This allows the "ifstat" command to report the reasons for TX/RX errors in most cases, even in non-debug builds.
* [NETDEV] Add notion of link stateMichael Brown2008-04-221-1/+23
| | | | | | | | | | | Add ability for network devices to flag link up/down state to the networking core. Autobooting code will now wait for link-up before attempting DHCP. IPoIB reflects the Infiniband link state as the network device link state (which is not strictly correct; we also need a succesful IPoIB IPv4 broadcast group join), but is probably more informative.
* Allow recording of TX and RX errors to aid in end-user debugging.Michael Brown2007-07-051-2/+3
|
* Add trivial net device statistics (TX and RX packet count), reportedMichael Brown2007-07-031-2/+3
| | | | via UNDI API and also by ifstat command; may be useful for debugging.
* Use stdio.h instead of vsprintf.hMichael Brown2007-01-191-1/+1
|
* Add "name" field to struct device to allow human-readable hardware deviceMichael Brown2007-01-101-2/+3
| | | | | | | | | | | names. Add "dev" pointer in struct net_device to tie network interfaces back to a hardware device. Force natural alignment of data types in __table() macros. This seems to prevent gcc from taking the unilateral decision to occasionally increase their alignment (which screws up the table packing).
* Added network interface management commandsMichael Brown2007-01-101-0/+66