aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/arp.c
Commit message (Collapse)AuthorAgeFilesLines
* [netdevice] Make ll_broadcast per-netdevice rather than per-ll_protocolMichael Brown2009-07-171-1/+1
| | | | | | | | | IPoIB has a link-layer broadcast address that varies according to the partition key. We currently go through several contortions to pretend that the link-layer address is a fixed constant; by making the broadcast address a property of the network device rather than the link-layer protocol it will be possible to simplify IPoIB's broadcast handling.
* [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.
* [tables] Redefine methods for accessing linker tablesMichael Brown2009-03-131-8/+1
| | | | | | | | | | | | | | | Intel's C compiler (icc) chokes on the zero-length arrays that we currently use as part of the mechanism for accessing linker table entries. Abstract away the zero-length arrays, to make a port to icc easier. Introduce macros such as for_each_table_entry() to simplify the common case of iterating over all entries in a linker table. Represent table names as #defined string constants rather than unquoted literals; this avoids visual confusion between table names and C variable or type names, and also allows us to force a compilation error in the event of incorrect table names.
* [iobuf] Add iob_disown() and use it where it simplifies codeMichael Brown2009-02-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | There are many functions that take ownership of the I/O buffer they are passed as a parameter. The caller should not retain a pointer to the I/O buffer. Use iob_disown() to automatically nullify the caller's pointer, e.g.: xfer_deliver_iob ( xfer, iob_disown ( iobuf ) ); This will ensure that iobuf is set to NULL for any code after the call to xfer_deliver_iob(). iob_disown() is currently used only in places where it simplifies the code, by avoiding an extra line explicitly setting the I/O buffer pointer to NULL. It should ideally be used with each call to any function that takes ownership of an I/O buffer. (The SSA optimisations will ensure that use of iob_disown() gets optimised away in cases where the caller makes no further use of the I/O buffer pointer anyway.) If gcc ever introduces an __attribute__((free)), indicating that use of a function argument after a function call should generate a warning, then we should use this to identify all applicable function call sites, and add iob_disown() as necessary.
* Add untested support for UNDI transmit and receive.Michael Brown2007-07-021-2/+1
|
* pkbuff->iobuf changeoverMichael Brown2007-05-191-17/+17
| | | | | | | | Achieved via Perl using: perl -pi -e 's/pk_buff/io_buffer/g; s/Packet buffer/I\/O buffer/ig; ' \ -e 's/pkbuff\.h/iobuf.h/g; s/pkb_/iob_/g; s/_pkb/_iob/g; ' \ -e 's/pkb/iobuf/g; s/PKB/IOB/g;'
* Add "name" field to struct device to allow human-readable hardware deviceMichael Brown2007-01-101-2/+2
| | | | | | | | | | | 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).
* We don't actually have a stdio.h header file. Our printf() functions areMichael Brown2006-09-271-1/+0
| | | | | | | | defined in vsprintf.h. (This may change, since vsprintf.h is a non-standard name, but for now it's the one to use.) There should be no need to include vsprintf.h just for DBG() statements, since include/compiler.h forces it in for a debug build anyway.
* added stdio.h to includes for DBG compilationMarty Connor2006-09-271-0/+1
|
* Remove _PROTOCOL macros for gcc 3.2 compatibilityMarty Connor2006-08-091-3/+1
|
* Simplify RX data path.Michael Brown2006-06-171-15/+41
| | | | | | | | | | Kill off the static single net device and move to proper dynamic registration (which we need with the new device model). Break the (flawed) assumption that all network-layer protocols can use ARP; such network-layer protocols (i.e. IPv4) must now register as an ARP protocol using ARP_NET_PROTOCOL() and provide a single method for checking the existence of a local network-layer address.
* Simplify TX datapath.Michael Brown2006-06-161-44/+21
|
* Change semantics of network API so that packet-absorbing calls *always*Michael Brown2006-04-291-7/+7
| | | | | | | | | | | take ownership of the packet, rather than doing so only if they return success. This breaks semantic compatibility with Linux's hard_start_xmit() method, but means that we don't have to worry so much about error cases. Split mechanism of processing received packets (net_rx_process()) out from policy (net_step()), preparatory to putting net_step() in a separate object.
* Network layer now works as a proof of conceptMichael Brown2006-04-281-9/+43
|
* D'ohMichael Brown2006-04-251-1/+1
|
* Network API now allows for multiple network devices (although theMichael Brown2006-04-241-84/+107
| | | | | | | | | | | | | implementation allows for only one, and does so without compromising on the efficiency of static allocation). Link-layer protocols are cleanly separated from the device drivers. Network-layer protocols are cleanly separated from individual network devices. Link-layer and network-layer protocols are cleanly separated from each other.
* Remove the concept of the media-independent link-layer header and replaceMichael Brown2006-04-191-27/+20
| | | | | it with metadata in the pkb structure. This is required since UNDI will want to be able to parse the link-layer header without destroying it.
* First version. ARP protocol independence in less than the size of uIP'sMichael Brown2006-04-191-0/+244
Ethernet-and-IPv4-only ARP module. :)