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

810 Commits

Author SHA1 Message Date
Michael Brown 8c3d09c564 Tweaked retry messages 2006-12-05 23:12:54 +00:00
Michael Brown 9600af14a3 Added debug messages 2006-12-05 22:53:49 +00:00
Michael Brown cc0b92652f Call closed() method only when the connection is genuinely in the
TCP_CLOSED state (i.e. after the final FIN/ACK exchange), and has been
removed from the list of TCP connections.
2006-12-05 22:53:28 +00:00
Michael Brown fcc70c9d60 Ensure that tcp_rx() always frees its received packet buffer. 2006-12-05 21:23:23 +00:00
Michael Brown 28c711b91d Killed off spurious <stdio.h> inclusion 2006-12-05 21:16:52 +00:00
Michael Brown 3fbfbad0f7 Avoid calling NULL methods! 2006-12-05 21:09:37 +00:00
Michael Brown 89bcb57201 Update ftp.c to work with Nikhil's TCP stack.
Remove the now-totally-obsolete sockaddr_in field from tcp.h.
2006-12-05 19:07:47 +00:00
Michael Brown 6842dd3222 Handle TargetAddress 2006-12-05 01:41:32 +00:00
Michael Brown 67577556a2 Handle strings as complete units, instead of a byte at a time. 2006-12-05 01:08:56 +00:00
Michael Brown 3a7d762c1c Add iscsi_rx_buffered_data() and supporting infrastructure. 2006-12-05 00:39:05 +00:00
Michael Brown 3f0b4d9ed8 Updated to use asynchronous operation model for iSCSI requests
Added CHAP authentication
2006-11-28 00:29:02 +00:00
Michael Brown fedc186fd7 Split login into security negotation and operational parameter
negotiation phases, to allow inclusion of CHAP authentication.
2006-10-03 09:17:38 +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 0dca1dc8ce Made eth_ntoa() public for use in legacy drivers' DBG() statements. 2006-09-15 12:34:34 +00:00
Michael Brown 095fce14f8 Added extra debugging 2006-08-30 13:39:07 +00:00
Michael Brown cab3f4502b Correct option number for DHCP_DNS_SERVERS, and add it to the request
list.
2006-08-27 01:37:58 +00:00
Nikhil Chandru Rao dccb8358bd Fixed a bug in the TCP state machine. Added a transition from ESTABLISHED to LAST_ACK on receiving a FIN,ACK 2006-08-19 16:14:53 +00:00
Nikhil Chandru Rao d1d334b8e1 IP6 support 2006-08-19 15:58:22 +00:00
Michael Brown f1e1dfae3d Added RX tracing as well. 2006-08-16 00:15:40 +00:00
Michael Brown 0743dc5b0d Added some minimal debugging for transmitted PDUs. 2006-08-15 23:56:18 +00:00
Derek Pryor 562ab6d65c Bug fixes to the HTTP protocol code 2006-08-12 19:05:08 +00:00
Derek Pryor 0f88703019 Bug fixes to the HTTP protocol code 2006-08-12 18:54:59 +00:00
Michael Brown db0ff1731f Fail gracefully when set_dhcp_option() is called with options==NULL. 2006-08-11 18:16:34 +00:00
Derek Pryor 25ea34a8d7 New HTTP protocol and test code 2006-08-11 14:13:02 +00:00
Michael Brown 2497270c14 command->data_{in,out} are now userptr_t, so it is invalid to compare
against NULL.
2006-08-10 17:35:14 +00:00
Michael Brown ea5fa82b91 Fixed variable name in assertion 2006-08-10 17:09:48 +00:00
Michael Brown c3a4f3c5da Towards an RFC2988-compliant timer. 2006-08-09 15:54:17 +00:00
Michael Brown f0718d562f Don't call stop_timer() from within the timer expiry callback; it's
already stopped.

Don't call start_timer() when sending a dataless ACK.  This may or may
not be the right thing to do; I can't tell.

Back out broken "send ACK only if required to" logic temporarily.
2006-08-09 15:50:20 +00:00
Nikhil Chandru Rao 3aff701001 Changed the TCP state machines behaviour in the ESTABLISHED state 2006-08-09 15:04:26 +00:00
Michael Brown dc8b96b446 Temporarily work around the bug when port numbers are reused between
subsequent runs.
2006-08-09 14:44:58 +00:00
Michael Brown 09688cb3b5 Correct some packet ownership and freeing bugs. 2006-08-09 14:27:07 +00:00
Michael Brown 43d601b678 out_flags was being set but never used.
Use just random() to allocate initial sequence numbers; the previous
algorithm ended up with a high probability of zeroing the high word.
2006-08-09 13:35:03 +00:00
Michael Brown 065a2a486d Port the UDP port allocation code to TCP 2006-08-09 12:08:20 +00:00
Michael Brown de0c36a98a Remove some of the confusion surrounding the amount to strip off from
a TCP packet before passing to newdata().
2006-08-09 12:01:09 +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 e9561aafc0 Derive xid dynamically from the netdev, so that we can call
create_dhcp_packet() from pxe_preboot.c, after the dhcp_session is long
gone.

Expose the functions required by pxe_preboot.c
2006-08-09 02:56:40 +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 d1a123b1f4 Added TFTP test code (currently just dumps file to console). 2006-08-09 00:09:29 +00:00
Michael Brown 3611cb17b7 Initial (untested) implementation of TFTP over the new UDP API. 2006-08-08 23:45:52 +00:00
Nikhil Chandru Rao 409f69a08a Changed ipv4_dump() to consume only one line. 2006-08-08 22:26:35 +00:00
Nikhil Chandru Rao 8bf38fb400 Corrected bugs in the TCP logic. There might be a few more which need to be taken care of. 2006-08-08 22:25:20 +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
Nikhil Chandru Rao cb42e573a0 Added retransmissions to TCP 2006-08-07 18:52:26 +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
Michael Brown d0e4f198d6 Add iSCSI to the DHCP tests.
Start updating iscsi.c to use Nikhil's TCP API.
2006-08-07 16:48:24 +00:00
Nikhil Chandru Rao 6714ec745a Minor corrections 2006-08-07 07:37:23 +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
Nikhil Chandru Rao 9225f4edac TCP support 2006-08-01 20:46:50 +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
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 ae277992c2 Request bootfile name; it doesn't seem to be automatically supplied by
all servers.
2006-08-01 14:12:27 +00:00
Michael Brown 3085f03ad4 Request Etherboot encapsulated options.
Parameter request list is yet another option that ISC dhcpd ignores
unless it's in the main options block.

Fix logic error in parsing file and sname fields.
2006-07-20 14:14:41 +00:00
Michael Brown b26806cf18 Add dhcp_snprintf() for extracting DHCP string options. 2006-07-20 14:13:11 +00:00
Michael Brown 16d04386b6 Switch default stack to Nikhil's TCP/IP stack 2006-07-20 02:53:15 +00:00
Michael Brown e74e20cb55 Remove the static IP address hack from netdevice.c, and change the
default test to the DHCP test.
2006-07-20 02:51:52 +00:00
Michael Brown 00a1f000b1 Added dhcp_ipv4_option() and friends.
Added test code to configure the interface for IPv4 after DHCP.
2006-07-20 02:49:59 +00:00
Michael Brown 6a0b4c9772 Free up any allocated options if we fail 2006-07-20 02:25:39 +00:00
Michael Brown 764cb41456 Document memory ownership. 2006-07-20 02:23:42 +00:00
Michael Brown 7ca1bb0fbe Now successfully negotiates the whole DHCPDISCOVER/OFFER/REQUEST/ACK
cycle.  :)
2006-07-20 02:19:06 +00:00
Michael Brown 30d9bcdc6e Rename unwieldy function 2006-07-20 00:24:25 +00:00
Michael Brown 9ad5cede96 Set DHCP_MESSAGE_TYPE option within the main options block. This
doesn't seem to be required by the RFCs, but at least ISC dhcpd and
ethereal refuse to recognise it otherwise.
2006-07-20 00:18:50 +00:00
Michael Brown 881b90e82c Packets without a DHCP_MESSAGE_TYPE option are probably just BOOTP
packets.
2006-07-20 00:03:25 +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 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
Michael Brown 0768670fd8 udp_open() takes ports in network-endian order. 2006-07-19 21:56:27 +00:00
Nikhil Chandru Rao 13dbf5494d Minor edits 2006-07-19 21:05:58 +00:00
Michael Brown 224529d8dd Now capable of sending what, to me, looks like a valid DHCPDISCOVER
(apart from the bad UDP checksum).
2006-07-19 20:50:50 +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
Michael Brown e8daeb62b1 Eliminate confusion between functions that return pointers and
functions that return status codes.

Zero the DHCP packet buffer *before* creating the options structures
inside it.
2006-07-19 18:11:31 +00:00
Michael Brown 3369f93036 Add block identification to debug messages 2006-07-19 17:58:27 +00:00
Michael Brown 6d9d48537e Added some debug messages and DHCP test code 2006-07-19 17:49:31 +00:00
Michael Brown 317b962b65 Proof of concept: transmit a single DHCPDISCOVER and dump out any
parsed DHCP responses.
2006-07-19 17:32:13 +00:00
Michael Brown 16fc9858db Beginnings of DHCP protocol implementation 2006-07-19 17:01:06 +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
Michael Brown 254fe6e00e Split DHCP packet creation into two parts: creating the basic packet
structure, and populating it with options.  This should allow us to
use the same basic options list for both DHCPDISCOVER and DHCPREQUEST,
plus making it much easier to set the non-constant parameters
(e.g. requested IP address) in request packets.
2006-07-19 12:12:45 +00:00
Michael Brown e40ebb67de Allow for calling find_dhcp_option() with "options" set to NULL, in order
to search through all registered option blocks.

Move some static inlines that are likely to be used frequently into
dhcpopts.c as normal functions, to save space.
2006-07-19 11:05:38 +00:00
Michael Brown 6c01d3bb95 Fix creation of the htype field; the ll_proto field from which it is
derived is a 16-bit big-endian field, but htype is only 8 bits wide.
2006-07-17 13:07:14 +00:00
Michael Brown b24947f0c0 Add sketch code to reassemble a DHCP packet from our internal "everything
is a DHCP option" data structures.

We need this code in order to be able to return a DHCP packet to a PXE NBP
which reflects options from our multiple sources (e.g. NVS and DHCP
server).  This is expensive, but necessary.  Having paid this cost, we may
as well try to use the same code to generate our DHCP request packets,
since the process is similar.
2006-07-17 12:47:22 +00:00
Michael Brown 12da7ea475 Add (untested) code for parsing a received DHCP packet and constructing a
DHCP options block from the contents.
2006-07-15 19:24:55 +00:00
Michael Brown 19e8b41562 Add code to modify DHCP option values within a block. 2006-07-13 20:49:04 +00:00
Nikhil Chandru Rao 5f651f8622 Added fragment reassembly code 2006-06-30 08:52:03 +00:00
Nikhil Chandru Rao 8de630c62b Removing net/interface.c and include/gpxe/interface.h 2006-06-29 06:51:11 +00:00
Michael Brown 51d62d1a3c Provide a mechanism for returning the encapsulator as well as the
encapsulated option; this will be needed for modifications to the options
block.
2006-06-28 18:59:54 +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
Michael Brown 291f072b82 Add priority mechanism 2006-06-28 13:48:02 +00:00
Michael Brown bd0c8b21ad Change dhcp_num_option() to return the numerical value directly. 2006-06-28 12:16:41 +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
Nikhil Chandru Rao a6c6b3d739 Fixed whitespaces; updated UDP code 2006-06-28 07:46:28 +00:00
Michael Brown 0bcaa8a21f First stab at DHCP option handling in a way that will allow us to have
multiple option sources (e.g. multiple DHCP replies, non-volatile
storage etc.)
2006-06-27 17:24:07 +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
Nikhil Chandru Rao 74339b3c6e updated UDP interface 2006-06-25 05:13:17 +00:00
Nikhil Chandru Rao fdc05e2664 created interface for transport-network interface 2006-06-25 05:12:07 +00:00
Michael Brown 3a660f9b25 Update ftp.c and hello.c to use the generic async_operations API. 2006-06-19 15:46:58 +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 968501e323 For consistency 2006-06-16 13:17:40 +00:00
Michael Brown bcdcd796fb 32kB window is actually larger than our typical receive ring size.
Shrink to 4kB for now.  We might want to see if it can be made
genuinely indicative of the RX ring size in the new TCP
implementation.
2006-06-16 13:16:59 +00:00
Michael Brown bbd9e28061 Simplify TX datapath. 2006-06-16 00:19:46 +00:00
Michael Brown d78581297b Improve tcpdump legibility. 2006-06-01 19:23:52 +00:00
Michael Brown 48fb6c6dc2 Updated retry timer mechanism to incorporate smoothed RTT estimation.
AoE now uses the retry timer mechanism.
2006-06-01 14:33:52 +00:00
Michael Brown f6d20bb0f4 Put in a method to get the MAC address for the AoE target. (It's not
elegant, but it works).
2006-05-31 19:12:17 +00:00
Michael Brown 99ef98d0bf ATA devices are now asynchronous. The ATA layer itself now performs the
async_wait(), though we may wish to move this higher up the stack, and
consider making the block device model asynchronous.  (There is only a
marginal cost for synchronous devices, since they can simply call
async_done() before returning; async_wait() will work seamlessly in this
situation).
2006-05-31 18:57:11 +00:00
Michael Brown 68125bc441 Added generic asynchronous operations code.
Removed data_in_len and data_out_len from ata_command structure; the
lengths are implied by the sector count and the presence of the data_in
or data_out pointers.

Changed AoE code to use subcommands by default, and made aoe_issue()
nonblocking (with completion via async_wait()).
2006-05-31 14:34:17 +00:00
Michael Brown 552b4a178e One bit of an ASCII character can make a big difference. 2006-05-29 21:00:00 +00:00
Michael Brown 1db1a6dad3 Added first sketch of a generic retry timer mechanism. The idea is to use
these timer objects in AoE and UDP protocols (where there is no underlying
retransmission mechanism) without requiring each protocol to implement its
own individual retry logic.  Eventually, we should be able to use the same
timer code for TCP retransmissions as well.
2006-05-29 14:55:07 +00:00
Michael Brown 6541338897 Handle multi-sector reads by splitting them into subcommands. 2006-05-29 08:25:31 +00:00
Michael Brown 9a2a52693d Initial AoE implementation. Limitations are:
Cannot yet handle reads of more than two sectors

  No retransmission

  No way to find out a target's MAC address (this proof of concept uses
  broadcasts)

These limitations shall not last long!  :)
2006-05-28 23:29:43 +00:00
Michael Brown f743de4858 Added tcp_kick(). This speed up LILO and GRUB booting by almost two
orders of magnitude.
2006-05-27 19:01:20 +00:00
Michael Brown cd3ecac809 Avoid causing TX overflow on small TX queues. 2006-05-27 13:55:36 +00:00
Michael Brown 69b1f24a97 I have no idea how this ever worked before. 2006-05-27 13:43:56 +00:00
Michael Brown 6c50564724 Make PKB_ZLEN the minimum possible size of packet buffer (to allow for
hardware that can't autopad).
2006-05-27 13:39:45 +00:00
Michael Brown 1dbafa8950 Tidied up debugging messages 2006-05-27 13:38:49 +00:00
Michael Brown b9cbae58fa Expert advice tells me that we *do* have to explicitly state the
options even when we want to use the defaults.
2006-05-19 17:50:49 +00:00
Michael Brown d48d0fb1bb Add the concept of a "user pointer" (similar to the void __user * in
the kernel), which encapsulates the information needed to refer to an
external buffer.  Under normal operation, this can just be a void *
equivalent, but under -DKEEP_IT_REAL it would be a segoff_t equivalent.

Use this concept to avoid the need for bounce buffers in int13.c,
which reduces memory usage and opens up the possibility of using
multi-sector reads.

Extend the block-device API and the SCSI block device implementation
to support multi-sector reads.

Update iscsi.c to use user buffers.

Move the obsolete portions of realmode.h to old_realmode.h.

MS-DOS now boots an order of magnitude faster over iSCSI (~10 seconds
from power-up to C:> prompt in bochs).
2006-05-19 15:06:51 +00:00
Michael Brown c69c1ec540 Documented login parameters that we negotiate. 2006-05-19 00:31:42 +00:00
Michael Brown a280587cde iSCSI writes seem to be working (at least, the ethereal trace shows no
errors; still need to verify data integrity).

SCSI response PDUs are handled: status and sense data (if available) are
returned via the scsi_command structure.

Updated iSCSI session parameter usage.
2006-05-19 00:20:08 +00:00
Michael Brown 813a052dc3 Set ErrorRecoveryLevel=0 (we don't want to have to handle it). 2006-05-17 17:41:50 +00:00
Michael Brown f25731d08f Split "iSCSI as a SCSI device" out from "iSCSI as a TCP protocol". 2006-05-14 23:29:16 +00:00
Michael Brown 2421723a15 Rewrote printf and friends to better support standard C semantics. 2006-05-14 02:51:55 +00:00
Michael Brown 5009f8d6a2 Provide a SCSI device interface to the iSCSI protocol 2006-05-13 11:39:46 +00:00
Michael Brown 2462047128 Typo 2006-04-30 18:19:39 +00:00
Michael Brown 9e1becaf8a Merge TCP aborted(), timedout() and closed() methods into a single
closed() method with a reason code.
2006-04-30 16:59:45 +00:00
Michael Brown 8afb6303fb Half-way tidy 2006-04-30 15:23:29 +00:00
Michael Brown 04b6a1e004 Make all TCP methods optional; at least FTP data is a read-only
connection and so legitimately ignores acked() and senddata().
2006-04-30 13:20:40 +00:00
Michael Brown aec0e127d2 Proof-of-concept FTP implementation 2006-04-30 12:02:07 +00:00
Michael Brown 01bd78d62a Created net/tcp and moved hello.c there 2006-04-30 09:34:11 +00:00
Michael Brown 7af478b30d Make tcp_connect() void; it will eventually have no failure case. 2006-04-30 02:13:52 +00:00
Michael Brown 9c9208a132 Put the TCP connection periodic processing in tcp.c, where it belongs. 2006-04-30 02:08:42 +00:00
Michael Brown 592a5a99c8 Moved uIP and tcp.c from proto/ to net/ 2006-04-30 01:16:37 +00:00
Michael Brown 352bf1bda2 Move init.h to gpxe/init.h. 2006-04-30 01:08:52 +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 1488cd3b73 Fix a couple of broken assertions, and align the buffer correctly. 2006-04-28 14:09:31 +00:00
Michael Brown fee8b91015 D'oh 2006-04-25 12:56:18 +00:00
Michael Brown cf3783b4ca Actually, it's probably a good idea to have packet buffers avoid 4kB
crossings.
2006-04-25 12:11:36 +00:00
Michael Brown 00a1de964d Update to use POSIX-like API. 2006-04-25 12:04:07 +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
Michael Brown fdc2ee79db 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:33:06 +00:00
Michael Brown 6209bd873a First sketch of a new net device API. 2006-04-19 12:07:46 +00:00
Michael Brown bdc8190c8d Remove the concept of the media-independent link-layer header and replace
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.
2006-04-19 11:32:24 +00:00
Michael Brown 9f67ad9db0 First version. ARP protocol independence in less than the size of uIP's
Ethernet-and-IPv4-only ARP module.  :)
2006-04-19 01:43:56 +00:00