Michael Brown
73b09ecba6
Use stdio.h instead of vsprintf.h
2007-01-19 01:13:12 +00:00
Michael Brown
5ff23aa406
Include stdlib.h rather than malloc.h
2007-01-18 20:06:03 +00:00
Michael Brown
f11da20f25
When a network device is specified to tcpip_tx() or it's children, treat
...
it as a fallback network device rather than an explicitly forced network
device.
Clear routing table entries before re-attempting DHCP.
2007-01-16 04:09:13 +00:00
Michael Brown
1a1fc23417
Improve debugging
2007-01-16 03:29:15 +00:00
Michael Brown
c953c1a1c3
Use -ENETUNREACH to mean "no reachable network device exists, don't bother
...
retrying".
2007-01-14 16:22:10 +00:00
Michael Brown
d9ba8f790b
Add route() function to display routing table.
2007-01-10 20:38:20 +00:00
Michael Brown
cc9b32c405
Remove uIP; we haven't used it for quite some time now.
2007-01-10 02:52:58 +00:00
Michael Brown
f008b77ba2
Allow an explicit network device to be specified for IP-layer
...
transmissions.
2007-01-10 02:25:11 +00:00
Michael Brown
98b6154c3e
Add "name" field to network device, to facilitate netdev commands.
2007-01-09 23:48:18 +00:00
Michael Brown
35b5e5d3f5
Minirouting table entries hold a persistent reference to a net_device.
2007-01-04 03:10:21 +00:00
Michael Brown
a0525a4ed3
Verify checksums on the RX datapath.
...
Simplify checksum generation on the TX datapath.
2007-01-03 20:48:52 +00:00
Michael Brown
285beeff7c
Tidy up debug messages
...
Move routing into a separate function
2007-01-03 16:39:11 +00:00
Michael Brown
718294553b
Fix compiler warning
2007-01-03 15:56:15 +00:00
Michael Brown
867c7aef59
iphdr->hlen includes the IP header, so truncate packet *before*
...
stripping the header. Also fix an htons/ntohs confusion.
2006-08-09 11:52:53 +00:00
Marty Connor
ee9ae8130a
Remove _PROTOCOL macros for gcc 3.2 compatibility
2006-08-09 04:42:14 +00:00
Michael Brown
a3d508b648
Clarified packet ownership transfer between a few functions.
...
Added a large number of missing calls to free_pkb(). In the case of UDP,
no received packets were ever freed, which lead to memory exhaustion
remarkably quickly once pxelinux started up.
In general, any function with _rx() in its name which accepts a pk_buff
*must* either call free_pkb() or pass the pkb to another _rx() function
(e.g. the next layer up the stack). Since the UDP (and TCP) layers don't
pass packet buffers up to the higher-layer protocols (the
"applications"), they must free the packet buffer after calling the
application's newdata() method.
2006-08-09 01:24:32 +00:00
Nikhil Chandru Rao
409f69a08a
Changed ipv4_dump() to consume only one line.
2006-08-08 22:26:35 +00:00
Michael Brown
68e33224ef
gcc3 compatibility: removed ARP_NET_PROTOCOL().
2006-08-08 17:44:25 +00:00
Nikhil Chandru Rao
d2bdf81505
Removed some bugs in TCP
2006-08-08 03:42:30 +00:00
Michael Brown
885a630ddf
Fix routing when a gateway exists. This should probably be split into
...
a separate function.
2006-08-07 17:51:19 +00:00
Nikhil Chandru Rao
6714ec745a
Minor corrections
2006-08-07 07:37:23 +00:00
Michael Brown
467e9627cc
Added features that will be required for PXE UDP support.
...
Introduced struct sockaddr_tcpip, to simplify code that deals with
both IPv4 and IPv6 addresses.
Reorganised parts of tcpip.c and udp.c.
2006-08-02 00:02:21 +00:00
Nikhil Chandru Rao
c24546c70b
Minor changes to the network layer rx() functions
2006-08-01 20:27:26 +00:00
Michael Brown
1ebb68e49a
Renamed trans_{rx,tx}() to tcpip_{rx,tx}(), since they are specific to
...
the TCP/IP protocol suite (rather than being general transport-layer
functions).
2006-08-01 14:22:04 +00:00
Michael Brown
3a0e293123
Renamed tcpip_if.[ch] to tcpip.[ch]
2006-08-01 14:18:09 +00:00
Michael Brown
36c94eae78
Clarify hexiness of header length
2006-07-20 00:01:50 +00:00
Michael Brown
2c0eb6eb1d
Correct TCP/IP checksum generation.
2006-07-19 23:38:05 +00:00
Nikhil Chandru Rao
5f651f8622
Added fragment reassembly code
2006-06-30 08:52:03 +00:00
Nikhil Chandru Rao
c9ea710930
Renamed net/interface.c and include/gpxe/interface.h to net/tcpip_if.c and include/gpxe/tcpip_if.h respectively. Made changes in the other files.
2006-06-28 15:43:08 +00:00
Nikhil Chandru Rao
6e2c97b0c0
Added ipv4_pseudo_header structure
2006-06-28 09:59:27 +00:00
Nikhil Chandru Rao
41b399d672
Fixed endianness of 16- and 32- bit values
2006-06-28 09:10:35 +00:00
Michael Brown
35557914e3
Simplify ipv4_tx() by not having a separate "source" variable now that
...
we are constructing the IP header ourselves.
Formatting fix-ups (80 column limit is mandatory!)
2006-06-26 16:10:34 +00:00
Michael Brown
b49de73950
Factorise out common code
2006-06-26 16:01:24 +00:00
Michael Brown
e517a4771b
Split ipv6 functions out from ipv4.c
2006-06-26 15:33:46 +00:00
Michael Brown
e04ea505c9
Whitespace fixes
2006-06-26 13:45:24 +00:00
Nikhil Chandru Rao
90fbff8f34
added support for processing and transmitting without uIP
2006-06-25 05:16:54 +00:00
Michael Brown
8637834031
Made the temporary buffer part of the TCP senddata() API, to ease the
...
transition away from uIP.
Prepared ipv4.c for transition away from uIP.
2006-06-17 23:20:54 +00:00
Michael Brown
3c8aafa209
Simplify RX data path.
...
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.
2006-06-17 22:36:27 +00:00
Michael Brown
bbd9e28061
Simplify TX datapath.
2006-06-16 00:19:46 +00:00
Michael Brown
69b1f24a97
I have no idea how this ever worked before.
2006-05-27 13:43:56 +00:00
Michael Brown
592a5a99c8
Moved uIP and tcp.c from proto/ to net/
2006-04-30 01:16:37 +00:00
Michael Brown
bac97eb979
Change semantics of network API so that packet-absorbing calls *always*
...
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.
2006-04-29 17:17:43 +00:00
Michael Brown
129c6c3968
Network layer now works as a proof of concept
2006-04-28 14:13:50 +00:00
Michael Brown
53f78346bf
Network API now allows for multiple network devices (although the
...
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.
2006-04-24 15:38:53 +00:00