Commit Graph

11 Commits

Author SHA1 Message Date
Avi Kivity
4e76590ed6 net: allow configuring the IP address 2014-09-17 17:52:02 +03:00
Avi Kivity
3168a2fc7c Allow providing options to configure network stacks 2014-09-17 17:44:58 +03:00
Avi Kivity
37c90fe54e net: make packet data members private
This will assist in future refactoring.
2014-09-16 11:24:13 +03:00
Avi Kivity
3def4bc7d7 tcp: queue connections being accepted
With the current listen() -> future<connection> interface, if a new connection
is established before the connection handler is able to re-register for the
port, we have to drop the connection.

Fix by adding a queue for accepted connections, and switching to the more
standard listen() -> accept() -> future<connection> model.
2014-09-14 16:05:48 +03:00
Asias He
647a0cacd3 net: Add ipv4_address(string) constructor
Set ipv4 address using dotted decimal form.

Signed-off-by: Asias He <asias@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
2014-09-13 07:20:31 +03:00
Avi Kivity
67fc9dfe9a net: fix eof reporting in native data_source adapter
An empty packet signals end-of-stream, which we ignored.

Note the empty packet and report it to the caller.
2014-09-11 11:39:10 +03:00
Avi Kivity
e0d7b5f1f6 s/networking/network/
Just because.
2014-09-10 15:45:23 +03:00
Avi Kivity
c0f87bbf40 net: fix byte order confusion in listen()
posix sockaddr_in gives the port in network byte order.
2014-09-10 15:42:24 +03:00
Avi Kivity
430acf7109 net: set up native network stack correctly
Start the interface and set up an IP address.
2014-09-10 15:41:51 +03:00
Avi Kivity
9c2a31bf0f core: add networking stack registry
The registry allows stacks to name themselves to the core, so that
a networking stack can be selected at startup.
2014-09-10 11:42:33 +03:00
Avi Kivity
5630f636cd net: add protcol stack adapter for native stack
This defines adapter classes for converting from the tcp<> class to the
abstractions that applications use.

Still very inefficient due to impedance mismatch between the data types used.
2014-09-10 10:42:21 +03:00