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.
Michael Brown2006-04-29 17:17:43 +00:00
23c494d14e
Added basic code for implementing co-operative multitasking.
Michael Brown2006-04-29 16:42:09 +00:00
5fe31f1014
Give uIP a static IP address for proof-of-concept testing
Michael Brown2006-04-28 14:15:21 +00:00
129c6c3968
Network layer now works as a proof of concept
Michael Brown2006-04-28 14:13:50 +00:00
1488cd3b73
Fix a couple of broken assertions, and align the buffer correctly.
Michael Brown2006-04-28 14:09:31 +00:00
79f64eea55
Transmit the buffer contents, not the buffer descriptor...
Michael Brown2006-04-28 14:08:41 +00:00
95f8a42930
Removed incorrect comment; malloc() is inefficient only when the alignment and size are both powers of two, and there's no way to specify an alignment through the malloc() interface anyway.
Michael Brown2006-04-25 10:41:49 +00:00
4e92f29c9e
Now passes trivial tests. free_memblock() needs neatening up.
Michael Brown2006-04-25 04:01:58 +00:00
b601a7d355
Updated memory allocator to improve support for unaligned or partially aligned blocks.
Michael Brown2006-04-25 03:30:46 +00:00
2f0d412210
Add __constant_flsl(), because it's useful for finding out the next power-of-two up from a given constant via ( 1 << fls ( constant - 1 ) )
Michael Brown2006-04-24 23:00:32 +00:00
a81f96998b
Added missing headers required for compilation in Etherboot.
Michael Brown2006-04-24 19:35:10 +00:00
832e86246b
gcc is rather over-aggressive about optimising out static data structures even when __atribute__ (( unused )) is correctly set...
Michael Brown2006-04-24 18:31:37 +00:00
4c4e4de18f
(librm_base-1b) is already an offset; no need to apply OFFSET(). Doing so, in fact, seems to expose an assembler bug; (a-b-0) is apparently not the same as (a-b). Go figure.
Michael Brown2006-04-24 18:29:47 +00:00
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).
Michael Brown2006-04-24 15:38:53 +00:00
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).
Michael Brown2006-04-24 15:33:06 +00:00
0d97f0d482
Obviate uip_init(); our bss is zeroed at startup already.
Michael Brown2006-04-24 15:31:02 +00:00
5423f876fb
Don't bother poisoning lists; it costs code size.
Michael Brown2006-04-24 15:28:56 +00:00
1d7cfd5acf
Prototype now clashes with the macro in arch/i386.
Michael Brown2006-04-24 15:27:58 +00:00
510ccb2900
Added __constant_memcpy() based on version in Linux's string.h.
Michael Brown2006-04-24 15:25:25 +00:00
b6b6a0b5fe
First draft of a dynamic memory allocator
Michael Brown2006-04-24 15:21:18 +00:00
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.
Michael Brown2006-04-19 11:32:24 +00:00
3ca7dbe7ca
Added the concept of a network interface (a network-layer concept) as separate from a network device (a link-layer concept).
Michael Brown2006-04-19 02:09:08 +00:00
2558439ce4
First version, based on include/linux/list.h, stripped down to just those functions we are likely to need.
Michael Brown2006-04-19 02:05:50 +00:00
49f933fbc3
Moved if_ether.h and if_arp.h to include/gpxe, for consistency with Linux kernel.
Michael Brown2006-04-19 01:52:41 +00:00
9f67ad9db0
First version. ARP protocol independence in less than the size of uIP's Ethernet-and-IPv4-only ARP module. :)
Michael Brown2006-04-19 01:43:56 +00:00
0864a73347
First version, based on the concepts in linux/skbuff.h
Michael Brown2006-04-18 17:47:01 +00:00
1a60444fe4
Added netmask and gateway global options.
Michael Brown2006-04-05 11:46:18 +00:00
6446767258
First draft of iSCSI protocol support. Is capable of retrieving disk blocks.
Michael Brown2006-04-05 11:44:56 +00:00
9ea782d339
Make pcap_inject non-static, so that its prototype doesn't conflict with the real pcap_inject in the case where we do have it.
Michael Brown2006-04-05 11:44:05 +00:00
c8a7133e9f
Added tcp_buffer, to give applications a zero-cost place to build data to be transmitted.
Michael Brown2006-04-05 11:43:01 +00:00
90892d5ec7
Allow specifying the local IP address via --from.
Michael Brown2006-03-24 17:28:40 +00:00
b44332eb7d
Split non-TCP portions of the stack out into ip.[ch].
Michael Brown2006-03-24 17:22:09 +00:00
1c607470e3
Put in a substitute pcap_inject() function, since earlier versions of libpcap are lacking the function. For now, we always use the substitute version, since there's no easy way to determine whether or not we need it.
Michael Brown2006-03-24 16:43:12 +00:00
7e61f38799
Moved "hello world" protocol implementation out of prototester.c and into the first standalong uIP-based protocol module.
Michael Brown2006-03-23 22:37:05 +00:00
508dcdb303
Added container_of(). This seems about the best place to put it, since the definition of it uses offsetof(), and the two concepts are related.
Michael Brown2006-03-23 22:07:21 +00:00
99032becce
Pick up the gPXE include files when building prototester.
Michael Brown2006-03-23 21:35:20 +00:00
2299435f1c
Added prototype for inet_ntoa, even though we don't have the function yet, in order to allow prototester.c to compile. It might be worth changing all the uses of "%@" in printf to use "%s" and inet_ntoa instead, in order to improve the portability of our code.
Michael Brown2006-03-23 21:34:25 +00:00
a4a0244aa3
Moved uIP wrapper out of prototester.c and into proto/tcp.c.
Michael Brown2006-03-23 21:32:03 +00:00
cb8e89de15
Added assert.h, with assert() defined (almost) as per POSIX, and linker_assert() defined as gPXE-specific.
Michael Brown2006-03-23 17:28:51 +00:00
531371efa2
Removed to make way for the uIP-based tcp.c.
Michael Brown2006-03-23 16:59:25 +00:00
dde1c5ad18
Moved include/in.h to include/gpxe/in.h, so that it can be included by prototester.
Michael Brown2006-03-23 16:45:01 +00:00
eaf40883ff
Add Makefile for hijack and prototester utilities.
Michael Brown2006-03-23 13:11:41 +00:00
21c58729ae
Add debug symbols to objects. (They will be stripped out of the final -Obinary build anyway, so it doesn't waste any space).
Michael Brown2006-03-23 13:09:29 +00:00
5263a5abf4
Started adding structure to allow for separate protocol tests, with individual options.
Michael Brown2006-03-22 21:25:35 +00:00
c32e83ad8d
Skeleton version: contains device driver (connecting to network via hijack daemon) and a functional but very ugly and very primitive wrapper around uIP.
Michael Brown2006-03-22 02:23:20 +00:00
4485df516c
Basic structure in place: can daemonise, listen on a Unix domain socket, accept new connections, open a network interface using libpcap and forward (all) traffic.
Michael Brown2006-03-21 02:25:30 +00:00
013ee958a1
These can come back when someone wants to support them
Michael Brown2006-03-17 14:16:05 +00:00