david/ipxe
david
/
ipxe
Archived
1
0
Fork 0
Commit Graph

36 Commits

Author SHA1 Message Date
Michael Brown e381714c07 Partial migration of UDP to data-xfer interface. (Will not link at
present; DHCP is broken).
2007-06-20 01:13:35 +01:00
Michael Brown 3e2c6b6736 pkbuff->iobuf changeover
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;'
2007-05-19 18:39:40 +00:00
Anselm Martin Hoffmeister ff5aac826a hoffmeis: Fixing situation where absence of a newdata() handler for UDP
connections might break things. Only-sending applications like syslog()
do not need a newdata() handler, so added a check if that handler exists.
2007-04-09 17:34:10 +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 bcdb6fad3e Improve debug messages 2007-01-16 03:19:40 +00:00
Michael Brown 753e156844 Allow udp_{send,sendto,sendto_via} to be called outside of the
udp_senddata() callback.  This will simplify any UDP protocols that don't
need the temporary buffer.
2007-01-10 02:46:39 +00:00
Michael Brown c821a7b20d Add udp_sendto_via() to allow e.g. DHCP to transmit without first having
to set up dummy routing entries.
2007-01-10 02:31:38 +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 18e5353bed Rename pkb_available() to pkb_tailroom() for consistency with Linux's
skb_tailroom().  Add pkb_headroom().
2007-01-09 20:56:31 +00:00
Michael Brown 20681d6168 Allow empty checksums on received packets 2007-01-04 05:17:28 +00:00
Michael Brown 94fc68895d Improve consistency between TCP and UDP RX datapaths 2007-01-03 21:13:11 +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 88e38fa148 We don't actually have a stdio.h header file. Our printf() functions are
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.
2006-09-27 10:58:14 +00:00
Marty Connor 6ac78f6aff added stdio.h to includes for DBG compilation 2006-09-27 05:57:06 +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
Michael Brown eb24eece0e Convert some trivial functions to static inlines. 2006-08-03 23:42:03 +00:00
Michael Brown ffe0e24249 Make the UDP senddata() methods return a status code.
udp_connect() now follows the standard BSD sockets semantics and simply
sets the default address for outgoing packets; it doesn't filter incoming
packets.
2006-08-03 23:10:14 +00:00
Michael Brown a0a872f7f1 Updated PXE UDP implementation to use the new Etherboot UDP API.
Updated PXE API dispatcher to use copy_{to,from}_user, and moved to
arch/i386 since the implementation is quite architecture-dependent.
(The individual PXE API calls can be largely
architecture-independent.)
2006-08-02 23:08:10 +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
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 21c3d63c2e We shouldn't need to allocate a TX packet buffer when calling newdata();
if the application wants to send data then it will have to use the normal
senddata() mechanism.
2006-08-01 14:13:58 +00:00
Michael Brown 29b358dd39 conn->local_port is now network-endian; do not swap when comparing
against value in header.

Temporarily disable RX checksumming; it's broken and is holding up
work on higher-layer protocols
.
2006-07-20 00:03:01 +00:00
Michael Brown 2c0eb6eb1d Correct TCP/IP checksum generation. 2006-07-19 23:38:05 +00:00
Nikhil Chandru Rao 13dbf5494d Minor edits 2006-07-19 21:05:58 +00:00
Michael Brown a38010fb0e Make udp_send() call udp_sendto(), rather than vice-versa. 2006-07-19 20:38:49 +00:00
Michael Brown 7c84b74185 A small but very critical bug. 2006-07-19 20:16:46 +00:00
Michael Brown 82f3295794 Use more standardised format specifiers in debug messages (e.g. %p for
a pointer).
2006-07-19 18:45:18 +00:00
Michael Brown ab633f6a73 Reserve space for lower-layer headers when allocating packet buffer.
Use pkb_available() rather than pkb_len() (which will always return 0
on a freshly allocated buffer).

udp_send() should assume that the buffer has already been allocated.
2006-07-19 18:21:30 +00:00
Nikhil Chandru Rao bf515d3d65 Minor edit in net/udp.c 2006-07-19 16:27:54 +00:00
Nikhil Chandru Rao ab577e1a3a The following edits were made: \
1. Updated UDP send data code\
2. Corrected internet checksum\
3. Moved udp_buffer() and udp_buflen() to udp.c from udp.h
2006-07-19 16:25:23 +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 a6c6b3d739 Fixed whitespaces; updated UDP code 2006-06-28 07:46:28 +00:00
Nikhil Chandru Rao 74339b3c6e updated UDP interface 2006-06-25 05:13:17 +00:00