hello together
i really need some help: i have an application that needs two sockets using two different interfaces with the same ip address. i wrapped the two sockets into a "supersocket" which should send out any packet on both interfaces, but this doesn't work. these are the interfaces:
- eth1 (192.168.220.4)
- pan0 (192.168.220.4)
i have to do this because one socket is used for wireless (eth1) and the other is bluetooth (pan0) and a broadcast must reach all devices (wireless and bluetooth). unfortunately, java doesn't let me bind a socket to a specific network interface but only to an IP address. like this, it simply binds the socket to the first interface with the given IP address. like this, if a device has wirelss and bluetooth network interfaces active with the identical IP address it will only send it over eth1 and no bluetooth device around will hear the broadcast... i need to bind socket1 to eth1 and socket2 to pan0, but how? does anyone know, how i can bind a socket to an interface / MAC address or any other solution for this??
help is greatly appreciated because i'm quite stuck
sebastian
i really need some help: i have an application that needs two sockets using two different interfaces with the same ip address. i wrapped the two sockets into a "supersocket" which should send out any packet on both interfaces, but this doesn't work. these are the interfaces:
- eth1 (192.168.220.4)
- pan0 (192.168.220.4)
i have to do this because one socket is used for wireless (eth1) and the other is bluetooth (pan0) and a broadcast must reach all devices (wireless and bluetooth). unfortunately, java doesn't let me bind a socket to a specific network interface but only to an IP address. like this, it simply binds the socket to the first interface with the given IP address. like this, if a device has wirelss and bluetooth network interfaces active with the identical IP address it will only send it over eth1 and no bluetooth device around will hear the broadcast... i need to bind socket1 to eth1 and socket2 to pan0, but how? does anyone know, how i can bind a socket to an interface / MAC address or any other solution for this??
help is greatly appreciated because i'm quite stuck
sebastian