tcp_terminal on linux
Christian Helmuth
christian.helmuth at ...1...
Fri Feb 3 09:16:20 CET 2017
Hello Prashanth,
On Thu, Feb 02, 2017 at 05:19:46PM -0800, Prashanth Mundkur wrote:
> After disabling the have_spec check, I can compile and run it. After
> setting the suid bit on drivers/nic/spec/linux/nic_drv to allow it to
> access /dev/net/tun, I get the following output:
Just a remark to prevent setting suid: I setup my tap0 device so that
in can be used by my user ID like follows in /etc/rc.local on Ubuntu.
#
# Setup tap device for base-linux tests
#
dev=tap0
user=<YOUR USER ID>
ip tuntap add dev $dev mode tap user $user
ip address flush dev $dev
ip address add 10.0.2.1/24 brd 10.0.2.255 dev $dev
ip link set dev $dev addr 02:00:00:ca:fe:01
ip link set dev $dev up
But now to your question...
> Though I can see the tap device,
>
> 15: tap0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
> link/ether c2:60:31:f8:52:fc brd ff:ff:ff:ff:ff:ff
>
> I don't see any listening socket on port 8888.
>
> So clearly there is some missing plumbing. What do I need to do to
> fill that in?
If you mean you can't see any listening program on port 8888 on your
host machine that's expected. Genode is running in a virtual network
behind the tap0 device. Additionally, the log states that the
tcp_terminal uses DHCP for network configuration but you may not run a
DHCP server on tap0. Now you have two option: Configure a DHCP server
to serve a private network behind tap, e.g., 10.0.2.1/24, or (much
simpler) configure tcp_terminal statically. Therefore you apply the
following changes to the run script (assuming the example network
above).
<start name="tcp_terminal">
- <libc stdout="/dev/log">
+ <libc ip_addr="10.0.2.55" netmask="255.255.255.0" gateway="10.0.2.1"
+ stdout="/dev/log" stderr="/dev/log"/>
The terminal should then be accessible at 10.0.2.55:8888.
Regards
--
Christian Helmuth
Genode Labs
https://www.genode-labs.com/ · https://genode.org/
https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
More information about the users
mailing list