Hi
I have a libc server application that binds a UDP socket and a libc client application to test the server. For this purpose I start two vfs and bridge them using the nic_bridge component:
<start name="vfs_client"> <binary name="vfs"/> <provides> <service name="File_system"/> </provides> <config> <vfs> <dir name="socket"> <lxip ip_addr="127.0.0.2" netmask="255.0.0.0" gateway="0.0.0.0" nameserver="0.0.0.0"/> </dir> </vfs> <default-policy root="/socket" writeable="yes"/> </config> <route> <!-- ... --> </route> </start>
<start name="vfs_server"> <binary name="vfs"/> <provides> <service name="File_system"/> </provides> <config> <vfs> <dir name="socket"> <lxip ip_addr="127.0.0.1" netmask="255.0.0.0" gateway="0.0.0.0" nameserver="0.0.0.0"/> </dir> </vfs> <default-policy root="/socket" writeable="yes"/> </config> <route> <!-- ... --> </route> </start>
<start name="nic_bridge"> <provides> <service name="Nic"/> </provides> <config> <policy label_prefix="vfs_client" ip_addr="127.0.0.2" /> <policy label_prefix="vfs_server" ip_addr="127.0.0.1" /> </config> <route> <service name="Nic"> <child name="nic_drv"/> </service> <!-- ... --> </route> </start>
The server successfully binds a UDP socket to 0.0.0.0:1234 but when the client tries to connect to 127.0.0.1:1234 it gets errno 61 (connection refused).
I then tried to simplify the scenario because what I actually need is just a loopback interface. I replaced vfs_client and vfs_server by a single vfs and routed the Nic session to nic_loopback. Which leads to the same result (connection refused) when the client tries to connect.
What am I missing? Thanks, Roman