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

27 Commits

Author SHA1 Message Date
Michael Brown 70fc25ad6e [netdevice] Limit MTU by hardware maximum frame length
Separate out the concept of "hardware maximum supported frame length"
and "configured link MTU", and limit the latter according to the
former.

In networks where the DHCP-supplied link MTU is inconsistent with the
hardware or driver capabilities (e.g. a network using jumbo frames),
this will result in iPXE advertising a TCP MSS consistent with a size
that can actually be received.

Note that the term "MTU" is typically used to refer to the maximum
length excluding the link-layer headers; we adopt this usage.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2017-01-25 14:55:09 +00:00
Michael Brown 8430642642 [tcpip] Allow supported address families to be detected at runtime
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-09-01 21:04:45 +01:00
Michael Brown 57bab4e1d3 [tcpip] Fix dubious calculation of min_port
Detected using sparse.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-13 10:19:44 +00:00
Michael Brown 2f020a8df3 [legal] Relicense files under GPL2_OR_LATER_OR_UBDL
These files cannot be automatically relicensed by util/relicense.pl
since they either contain unusual but trivial contributions (such as
the addition of __nonnull function attributes), or contain lines
dating back to the initial git revision (and so require manual
knowledge of the code's origin).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-02 16:35:29 +00:00
Michael Brown 6414b5ca03 [tcpip] Provide tcpip_mtu() to determine the maximum transmission unit
Provide the function tcpip_mtu() to allow external code to determine
the (transport-layer) maximum transmission unit for a given socket
address.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-03-04 13:13:54 +00:00
Michael Brown db67de6f31 [tcpip] Provide tcpip_netdev() to determine the transmitting network device
Provide the function tcpip_netdev() to allow external code to
determine the transmitting network device for a given socket address.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-03-04 13:02:58 +00:00
Michael Brown 11963c4f5f [tcpip] Add IP statistics collection as per RFC 4293
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-03-02 20:33:35 +00:00
Michael Brown 6bf36f57a0 [tcpip] Pass through network device to transport layer protocols
NDP requires knowledge of the network device on which a packet was
received.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-09-03 02:02:58 +01:00
Michael Brown 252d28f098 [tcpip] Allow binding to unspecified privileged ports (below 1024)
Originally-implemented-by: Marin Hannache <git@mareo.fr>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-08-06 15:56:54 +01:00
Michael Brown 1d77d03216 [tcpip] Allow for architecture-specific TCP/IP checksum routines
Calculating the TCP/IP checksum on received packets accounts for a
substantial fraction of the response latency.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-06-27 19:15:17 +01:00
Michael Brown 8406115834 [build] Rename gPXE to iPXE
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>
2010-04-19 23:43:39 +01:00
Michael Brown c44a193d0d [legal] Add a selection of FILE_LICENCE declarations
Add FILE_LICENCE declarations to almost all files that make up the
various standard builds of gPXE.
2009-05-18 08:33:25 +01:00
Michael Brown 1266d7902b [tables] Redefine methods for accessing linker tables
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.
2009-03-13 02:06:30 +00:00
Michael Brown d230b53df2 [tcpip] Allow for transmission to multicast IPv4 addresses
When sending to a multicast address, it may be necessary to specify
the source address explicitly, since the multicast destination address
does not provide enough information to deduce the source address via
the miniroute table.

Allow the source address specified via the data-xfer metadata to be
passed down through the TCP/IP stack to the IPv4 layer, which can use
it as a default source address.
2009-01-21 03:40:39 +00: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
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 dad5274522 Add "name" field to struct device to allow human-readable hardware device
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).
2007-01-10 04:22:09 +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 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
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 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 beadd82208 Remove unused functions. 2006-08-01 14:26:02 +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