Michael Brown [Wed, 26 Apr 2006 00:14:19 +0000 (00:14 +0000)]
Updated to syntax required by latest bochs CVS.
Michael Brown [Wed, 26 Apr 2006 00:09:52 +0000 (00:09 +0000)]
Updated to current bochs CVS
Michael Brown [Tue, 25 Apr 2006 21:48:16 +0000 (21:48 +0000)]
Glenn managed to shrink .text by 5 more bytes.
Michael Brown [Tue, 25 Apr 2006 12:56:18 +0000 (12:56 +0000)]
D'oh
Michael Brown [Tue, 25 Apr 2006 12:55:23 +0000 (12:55 +0000)]
Added missing ssize_t
Michael Brown [Tue, 25 Apr 2006 12:11:36 +0000 (12:11 +0000)]
Actually, it's probably a good idea to have packet buffers avoid 4kB
crossings.
Michael Brown [Tue, 25 Apr 2006 12:04:07 +0000 (12:04 +0000)]
Update to use POSIX-like API.
Michael Brown [Tue, 25 Apr 2006 11:54:58 +0000 (11:54 +0000)]
Fixed erroneous comparison
Michael Brown [Tue, 25 Apr 2006 10:41:49 +0000 (10:41 +0000)]
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 Brown [Tue, 25 Apr 2006 04:01:58 +0000 (04:01 +0000)]
Now passes trivial tests. free_memblock() needs neatening up.
Michael Brown [Tue, 25 Apr 2006 03:30:46 +0000 (03:30 +0000)]
Updated memory allocator to improve support for unaligned or partially
aligned blocks.
Moved header to include/malloc.h, since we now also provide the
POSIX-like malloc()/free() pair.
Not yet tested.
Michael Brown [Mon, 24 Apr 2006 23:00:32 +0000 (23:00 +0000)]
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 ) )
fls(), flsl(), ffs() and ffsl() appear in strings.h according to
POSIX.
Michael Brown [Mon, 24 Apr 2006 19:35:10 +0000 (19:35 +0000)]
Added missing headers required for compilation in Etherboot.
Michael Brown [Mon, 24 Apr 2006 19:34:51 +0000 (19:34 +0000)]
Added pkb_reserve().
Michael Brown [Mon, 24 Apr 2006 19:19:13 +0000 (19:19 +0000)]
We have our own ARP layer now.
Michael Brown [Mon, 24 Apr 2006 18:44:50 +0000 (18:44 +0000)]
Add missing {register,free}_netdev().
Tie into existing driver API; we'll fix that up soon.
Michael Brown [Mon, 24 Apr 2006 18:31:37 +0000 (18:31 +0000)]
gcc is rather over-aggressive about optimising out static data structures
even when __atribute__ (( unused )) is correctly set...
Michael Brown [Mon, 24 Apr 2006 18:29:47 +0000 (18:29 +0000)]
(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 Brown [Mon, 24 Apr 2006 15:42:49 +0000 (15:42 +0000)]
Header rearrangement.
I want to get to the point where any header in include/ reflects a
standard user-level header (e.g. a POSIX header), while everything that's
specific to gPXE lives in include/gpxe/. Headers that reflect a Linux
header (e.g. if_ether.h) should also be in include/gpxe/, with the same
name as the Linux header and, preferably, the same names used for the
definitions.
Michael Brown [Mon, 24 Apr 2006 15:38:53 +0000 (15:38 +0000)]
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.
Michael Brown [Mon, 24 Apr 2006 15:33:06 +0000 (15:33 +0000)]
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.
Michael Brown [Mon, 24 Apr 2006 15:31:02 +0000 (15:31 +0000)]
Obviate uip_init(); our bss is zeroed at startup already.
Michael Brown [Mon, 24 Apr 2006 15:28:56 +0000 (15:28 +0000)]
Don't bother poisoning lists; it costs code size.
Michael Brown [Mon, 24 Apr 2006 15:27:58 +0000 (15:27 +0000)]
Prototype now clashes with the macro in arch/i386.
Michael Brown [Mon, 24 Apr 2006 15:25:25 +0000 (15:25 +0000)]
Added __constant_memcpy() based on version in Linux's string.h.
Added memswap().
Michael Brown [Mon, 24 Apr 2006 15:21:18 +0000 (15:21 +0000)]
First draft of a dynamic memory allocator
Michael Brown [Mon, 24 Apr 2006 15:20:01 +0000 (15:20 +0000)]
Add "net" directory.
Avoid including debug information in bin/%.s output, since the whole
point is to have easy-to-read assembler.
Michael Brown [Wed, 19 Apr 2006 12:07:46 +0000 (12:07 +0000)]
First sketch of a new net device API.
Michael Brown [Wed, 19 Apr 2006 11:32:24 +0000 (11:32 +0000)]
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 Brown [Wed, 19 Apr 2006 02:11:56 +0000 (02:11 +0000)]
Updated to remove obsolete constants
Michael Brown [Wed, 19 Apr 2006 02:09:08 +0000 (02:09 +0000)]
Added the concept of a network interface (a network-layer concept) as
separate from a network device (a link-layer concept).
Michael Brown [Wed, 19 Apr 2006 02:08:27 +0000 (02:08 +0000)]
Typo
Michael Brown [Wed, 19 Apr 2006 02:05:50 +0000 (02:05 +0000)]
First version, based on include/linux/list.h, stripped down to just
those functions we are likely to need.
Still need to come up with a way of getting the linker to create
static lists using this linking mechanism.
Michael Brown [Wed, 19 Apr 2006 01:56:10 +0000 (01:56 +0000)]
Update now that if_ether.h has moved.
Michael Brown [Wed, 19 Apr 2006 01:54:53 +0000 (01:54 +0000)]
Added ENOENT and EAFNOSUPPORT
Michael Brown [Wed, 19 Apr 2006 01:54:24 +0000 (01:54 +0000)]
Added pkb_unput() and pkb_len().
Michael Brown [Wed, 19 Apr 2006 01:53:49 +0000 (01:53 +0000)]
Make flags more efficient.
Add 'raw' net_addr facility (needed for ARP).
Michael Brown [Wed, 19 Apr 2006 01:52:41 +0000 (01:52 +0000)]
Moved if_ether.h and if_arp.h to include/gpxe, for consistency with Linux
kernel.
Removed obsolete struct arprequest from if_arp.h and put it in nic.c so
that nic.c will still compile. ARP will very shortly be handled by
net/arp.c instead.
Michael Brown [Wed, 19 Apr 2006 01:43:56 +0000 (01:43 +0000)]
First version. ARP protocol independence in less than the size of uIP's
Ethernet-and-IPv4-only ARP module. :)
Michael Brown [Wed, 19 Apr 2006 01:42:33 +0000 (01:42 +0000)]
Add missing prototype
Michael Brown [Wed, 19 Apr 2006 01:42:03 +0000 (01:42 +0000)]
First version
Michael Brown [Tue, 18 Apr 2006 17:52:51 +0000 (17:52 +0000)]
First sketch
Michael Brown [Tue, 18 Apr 2006 17:49:51 +0000 (17:49 +0000)]
First version
Michael Brown [Tue, 18 Apr 2006 17:47:01 +0000 (17:47 +0000)]
First version, based on the concepts in linux/skbuff.h
Michael Brown [Wed, 5 Apr 2006 11:46:18 +0000 (11:46 +0000)]
Added netmask and gateway global options.
Added iSCSI testing.
Michael Brown [Wed, 5 Apr 2006 11:44:56 +0000 (11:44 +0000)]
First draft of iSCSI protocol support. Is capable of retrieving disk
blocks.
Michael Brown [Wed, 5 Apr 2006 11:44:05 +0000 (11:44 +0000)]
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 Brown [Wed, 5 Apr 2006 11:43:01 +0000 (11:43 +0000)]
Added tcp_buffer, to give applications a zero-cost place to build data to
be transmitted.
Michael Brown [Wed, 5 Apr 2006 11:41:15 +0000 (11:41 +0000)]
Added set_netmask() and set_gateway()
Michael Brown [Fri, 24 Mar 2006 17:39:05 +0000 (17:39 +0000)]
We don't need to know anything about ARP
Michael Brown [Fri, 24 Mar 2006 17:28:40 +0000 (17:28 +0000)]
Allow specifying the local IP address via --from.
Michael Brown [Fri, 24 Mar 2006 17:22:09 +0000 (17:22 +0000)]
Split non-TCP portions of the stack out into ip.[ch].
Added set_ipaddr().
Michael Brown [Fri, 24 Mar 2006 16:43:12 +0000 (16:43 +0000)]
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 Brown [Thu, 23 Mar 2006 22:37:05 +0000 (22:37 +0000)]
Moved "hello world" protocol implementation out of prototester.c and into
the first standalong uIP-based protocol module.
Michael Brown [Thu, 23 Mar 2006 22:07:21 +0000 (22:07 +0000)]
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 Brown [Thu, 23 Mar 2006 21:35:20 +0000 (21:35 +0000)]
Pick up the gPXE include files when building prototester.
Michael Brown [Thu, 23 Mar 2006 21:34:25 +0000 (21:34 +0000)]
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 Brown [Thu, 23 Mar 2006 21:32:03 +0000 (21:32 +0000)]
Moved uIP wrapper out of prototester.c and into proto/tcp.c.
Michael Brown [Thu, 23 Mar 2006 21:06:36 +0000 (21:06 +0000)]
Add include/gpxe as a directory to scan.
Exclude proto/uip, since uip.c and uip_arp.c both have global variables
called "c", which screws up doxygen's auto-generation of links to file
documentation when it encounters a file name such as "hello.c".
Michael Brown [Thu, 23 Mar 2006 20:39:26 +0000 (20:39 +0000)]
Updated with "doxygen -u" from doxygen 1.4.4
Michael Brown [Thu, 23 Mar 2006 20:34:08 +0000 (20:34 +0000)]
Moved old tcp.h to old_tcp.h, to avoid name clash with new (uIP-based)
tcp.h.
Michael Brown [Thu, 23 Mar 2006 19:33:57 +0000 (19:33 +0000)]
Assertions are now handled via the POSIX-like <assert.h>.
Michael Brown [Thu, 23 Mar 2006 19:23:25 +0000 (19:23 +0000)]
Added missing #endif
Michael Brown [Thu, 23 Mar 2006 17:28:51 +0000 (17:28 +0000)]
Added assert.h, with assert() defined (almost) as per POSIX, and
linker_assert() defined as gPXE-specific.
Michael Brown [Thu, 23 Mar 2006 16:59:25 +0000 (16:59 +0000)]
Removed to make way for the uIP-based tcp.c.
Michael Brown [Thu, 23 Mar 2006 16:45:01 +0000 (16:45 +0000)]
Moved include/in.h to include/gpxe/in.h, so that it can be included by
prototester.
Michael Brown [Thu, 23 Mar 2006 13:11:41 +0000 (13:11 +0000)]
Add Makefile for hijack and prototester utilities.
Michael Brown [Thu, 23 Mar 2006 13:09:29 +0000 (13:09 +0000)]
Add debug symbols to objects. (They will be stripped out of the final
-Obinary build anyway, so it doesn't waste any space).
Michael Brown [Thu, 23 Mar 2006 13:08:06 +0000 (13:08 +0000)]
Make the application state a void *.
Michael Brown [Thu, 23 Mar 2006 13:06:08 +0000 (13:06 +0000)]
Can now also print data sent by the remote side.
Michael Brown [Thu, 23 Mar 2006 12:25:28 +0000 (12:25 +0000)]
Now capable of sending "Hello world!" via TCP.
Michael Brown [Wed, 22 Mar 2006 22:35:32 +0000 (22:35 +0000)]
Added basic http-specific option parsing
Michael Brown [Wed, 22 Mar 2006 21:25:35 +0000 (21:25 +0000)]
Started adding structure to allow for separate protocol tests, with
individual options.
Created the embryonic beginnings of a cleanly separated driver and
protocol stack API.
Michael Brown [Wed, 22 Mar 2006 02:23:20 +0000 (02:23 +0000)]
Skeleton version: contains device driver (connecting to network via
hijack daemon) and a functional but very ugly and very primitive
wrapper around uIP.
This passes proof-of-concept testing; it successfully initiates a TCP
connection and responds to pings.
Michael Brown [Wed, 22 Mar 2006 02:14:55 +0000 (02:14 +0000)]
Added from uip-0.9/uip/uip_arp.[ch]
Michael Brown [Wed, 22 Mar 2006 01:25:43 +0000 (01:25 +0000)]
Remove htons(); it is provided elsewhere in Etherboot
Michael Brown [Wed, 22 Mar 2006 01:24:13 +0000 (01:24 +0000)]
Basic, functional-but-extremely-pessimal versions (taken from
uip-0.9/unix/uip_arch.c).
Michael Brown [Tue, 21 Mar 2006 17:48:33 +0000 (17:48 +0000)]
Terminate cleanly on SIGINT or SIGHUP
Michael Brown [Tue, 21 Mar 2006 16:50:25 +0000 (16:50 +0000)]
Use libpcap API to send/receive packets.
Include automatic filtering (based on source MAC address of first
transmitted packet).
Proven to successfully elicit a ping response from a remote host.
Michael Brown [Tue, 21 Mar 2006 02:25:30 +0000 (02:25 +0000)]
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 Brown [Fri, 17 Mar 2006 14:16:05 +0000 (14:16 +0000)]
These can come back when someone wants to support them
Michael Brown [Fri, 17 Mar 2006 14:14:36 +0000 (14:14 +0000)]
More purging
Michael Brown [Fri, 17 Mar 2006 14:13:09 +0000 (14:13 +0000)]
They can come back when they have someone to support them.
Michael Brown [Fri, 17 Mar 2006 14:09:45 +0000 (14:09 +0000)]
GPXE code cleanup and purge.
Michael Brown [Thu, 16 Mar 2006 19:28:38 +0000 (19:28 +0000)]
Prefix semantics have changed
Michael Brown [Thu, 16 Mar 2006 19:18:12 +0000 (19:18 +0000)]
Add uip on HEAD; it's safe to build, since nothing links against it at the
moment.
Michael Brown [Thu, 16 Mar 2006 19:09:31 +0000 (19:09 +0000)]
Build in gpxe
Michael Brown [Thu, 16 Mar 2006 19:04:19 +0000 (19:04 +0000)]
Remove accidental duplicate arising from merge
Michael Brown [Thu, 16 Mar 2006 19:02:18 +0000 (19:02 +0000)]
Build under gpxe
Michael Brown [Thu, 16 Mar 2006 18:56:16 +0000 (18:56 +0000)]
Back out duplication arising from the merge
Michael Brown [Thu, 16 Mar 2006 18:54:57 +0000 (18:54 +0000)]
Fix to compile under gpxe
Michael Brown [Thu, 16 Mar 2006 18:51:23 +0000 (18:51 +0000)]
Merge from Etherboot 5.4
Michael Brown [Thu, 16 Mar 2006 18:44:31 +0000 (18:44 +0000)]
Merge from Etherboot 5.4
Michael Brown [Thu, 16 Mar 2006 18:30:54 +0000 (18:30 +0000)]
Merge from Etherboot 5.4
Michael Brown [Thu, 16 Mar 2006 18:30:46 +0000 (18:30 +0000)]
Merge from Etherboot 5.4
Michael Brown [Thu, 16 Mar 2006 18:15:48 +0000 (18:15 +0000)]
Merge from Etherboot 5.4
Michael Brown [Thu, 16 Mar 2006 17:59:51 +0000 (17:59 +0000)]
Merge from Etherboot 5.4
Michael Brown [Thu, 16 Mar 2006 17:40:55 +0000 (17:40 +0000)]
Merge from Etherboot 5.4
Michael Brown [Thu, 16 Mar 2006 17:31:29 +0000 (17:31 +0000)]
Merge from Etherboot 5.4
Michael Brown [Thu, 16 Mar 2006 17:11:36 +0000 (17:11 +0000)]
Merge from Etherboot 5.4