Michael Brown
05f4c3d176
Remove the one-packet-per-poll-cycle limit; it seems to no longer be
needed now that performance is up.
18 anos atrás
Michael Brown
6c72bf13a1
Presize the download buffer when we see the Content-Length header;
this saves around 70us per received packet (which is around 50% of the
overall packet processing time).
18 anos atrás
Michael Brown
08da93a311
Reorder functions to more closely reflect the flow of control
18 anos atrás
Michael Brown
06630a3036
Switch from calloc() to malloc()+memset() to match the practices used
almost everywhere else.
18 anos atrás
Michael Brown
dd6d94004f
HTTP/DNS now working fully asynchronously. HTTP/IP addresses and any
other protocol won't work at the moment.
18 anos atrás
Michael Brown
99e58865c7
Use struct sockaddr rather than struct sockaddr_tcpip
Tidy up code
18 anos atrás
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.
18 anos atrás
Michael Brown
1a1fc23417
Improve debugging
18 anos atrás
Michael Brown
bcdb6fad3e
Improve debug messages
18 anos atrás
Michael Brown
835d35749f
Improved debugging
18 anos atrás
Michael Brown
143d14614d
Quickly hack in DNS resolution as a proof of concept
18 anos atrás
Michael Brown
9af12d5fba
A working DNS resolver (not yet tied in to anything)
18 anos atrás
Michael Brown
df0397f334
Update TFTP and FTP to take the same temporary URI scheme as HTTP
18 anos atrás
Michael Brown
afa752f5fb
Protocol's get() method no longer takes ownership of the URI. HTTP is the
exception rather than the rule; we may as well keep things clean for other
protocols.
18 anos atrás
Michael Brown
1f92c6b3e8
Must free http on the error path; nothing else will do it
18 anos atrás
Michael Brown
c676591cd1
Unmaintained example code is probably worse than useless.
18 anos atrás
Michael Brown
4e20d73bb5
Gave asynchronous operations approximate POSIX signal semantics. This
will enable us to cascade async operations, which is necessary in order to
properly support DNS. (For example, an HTTP request may have to redirect
to a new location and will have to perform a new DNS lookup, so we can't
just rely on doing the name lookup at the time of parsing the initial
URL).
Anything other than HTTP is probably broken right now; I'll fix the others
up asap.
18 anos atrás
Michael Brown
76aa9ad07d
Make TCP give up immediately when it receives -ENETUNREACH from
tcpip_tx(). This avoids the irritating wait when you accidentally type
"kernel pxelinux.0" before bringing up the network interface.
Add ENETUNREACH to strerror()'s list.
18 anos atrás
Michael Brown
c953c1a1c3
Use -ENETUNREACH to mean "no reachable network device exists, don't bother
retrying".
18 anos atrás
Michael Brown
526d314266
Advertise a larger MSS to improve TCP performance.
18 anos atrás
Michael Brown
497c3a5aad
Fixed HTTP
18 anos atrás
Michael Brown
ad22cccc09
No need to maintain a received byte count; we always fill in sequential
order so we can just use buffer->fill.
18 anos atrás
Michael Brown
0010e10ef3
Update TFTP to use a struct buffer rather than a callback.
Add debug autocolourisation to TFTP.
18 anos atrás
Michael Brown
037da9d840
I hate NULL pointer dereferences.
18 anos atrás
Michael Brown
a3ed0cbbc7
Extract packet-padding login from rtl8139.c to a separate pkbpad.c file.
18 anos atrás
Michael Brown
6918cf9e9e
Change FTP to use a data buffer rather than a callback function.
18 anos atrás
Michael Brown
d9ba8f790b
Add route() function to display routing table.
18 anos atrás
Michael Brown
1fa5cd0e2b
Add find_pci_netdev()
18 anos atrás
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).
18 anos atrás
Michael Brown
cc9b32c405
Remove uIP; we haven't used it for quite some time now.
18 anos atrás
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.
18 anos atrás
Michael Brown
649b789e93
DHCP transmits via specified net device, so no need to create a dummy
routing table entry just to fool ipv4.c any more.
18 anos atrás
Michael Brown
c821a7b20d
Add udp_sendto_via() to allow e.g. DHCP to transmit without first having
to set up dummy routing entries.
18 anos atrás
Michael Brown
f008b77ba2
Allow an explicit network device to be specified for IP-layer
transmissions.
18 anos atrás
Michael Brown
d24b80acf2
Added network interface management commands
18 anos atrás
Michael Brown
98b6154c3e
Add "name" field to network device, to facilitate netdev commands.
18 anos atrás
Michael Brown
c65fae2475
Add RX quotas to the net device poll() method. This avoids the problem
of alloc_pkb() exhaustion when e.g. an iSCSI-booted DOS session is left
idle for a long time at the C:\ prompt and builds up a huge packet
backlog.
18 anos atrás
Michael Brown
18e5353bed
Rename pkb_available() to pkb_tailroom() for consistency with Linux's
skb_tailroom(). Add pkb_headroom().
18 anos atrás
Michael Brown
b7fcfe8ece
Added net device TX queue; this will be needed to support the PXE UNDI API
(which will need us to wait for TX completions).
Added debug autocolourisation to netdevice.c
18 anos atrás
Michael Brown
8a268073a7
Move start/stop/expire debug messages to DBG2() level.
18 anos atrás
Michael Brown
2eeb7c4fe7
Define "connected" as
"when SYN is ACKed and we have already received SYN", or
"when SYN is received and we have already had SYN ACKed"
rather than just
"when SYN is ACKed"
This avoids spuriously calling the connected() method when we receive
a RST,ACK in response to a SYN.
18 anos atrás
Michael Brown
aaca21a2b6
We can't assert that the RX engine is idle in iscsi_done(), because it
may be called during the RX data processor, before the RX engine
transitions back to idle. It doesn't really matter if the RX engine
isn't idle when iscsi_done() is called, because it will just pick up
where it left off on the next call. (The same is not true for the TX
engine, so keep the TX engine assertion.)
18 anos atrás
Michael Brown
6ea07b9247
Use debug auto-colourisation.
18 anos atrás
Michael Brown
76525294ee
Clean up connection closing and permanent failure logic.
18 anos atrás
Michael Brown
20681d6168
Allow empty checksums on received packets
18 anos atrás
Michael Brown
0c03bb5a9a
Make open() and close() an official part of the netdevice API.
Call netdevice's poll() and transmit() methods only when device is open.
18 anos atrás
Michael Brown
7fafa89258
A DHCP session holds a persistent reference to a network device
18 anos atrás
Michael Brown
b29861a5aa
IPv6 minirouting table entries hold persistent references to net devices.
18 anos atrás
Michael Brown
b22d4405c0
An AoE session holds a persistent reference to a net device.
18 anos atrás
Michael Brown
35b5e5d3f5
Minirouting table entries hold a persistent reference to a net_device.
18 anos atrás