Hi,
i have a small socket or linux problem: Can anybody tell me how to develope
a socket application reading IP messages which are not directed to my pc
(have an other IP adress)? I wrote a socket application, but it couldn't
access IP-messages directed to other pcs in the network.
thanks,
Guido
background:
i want to program a "router", which sends IP-Messages through a small bus.
Now i have a character device driver for this bus system and 2 linux
systems connected with this network. Due to the complexity of kernel
development I don't want to write a new linux network driver. so i decided
to develope an application which has a thread for listening to a
TCP/IP-socket from an ethernet card in the first PC and another thread for
reading messages from the bus simultanously.
pc1: 192.168.1.1 <-----> pc2: 192.168.1.2
ethernet card IP no ethernet card
my application <-----> my application
| BUS |
simple socket client simple socket server
1.) the client trys to connect to the pc2, which is not in the ethernet
network.
2.) my application notices this request...
3.) ... and sends it through the bus (with the character device driver
functions)
4.) the application on the other side sends the message to the
IP-network(maybe to the loopback device) and this way directly to the
socket server.
5.) steps 1-4 in the other direction. pc2- pc1