[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dev-serveez] SO_BINDTODEVICE investigations
From: |
stefan |
Subject: |
[dev-serveez] SO_BINDTODEVICE investigations |
Date: |
Wed, 5 Dec 2001 12:17:55 +0100 (CET) |
Hello list,
The `man 7 socket' tells us about a SO_BINDTODEVICE. I tried to apply
this feature to Serveez. Unfortunately I came not to far...
* You must have root priviledges to use setsockopt(SO_BINDTODEVICE).
* I cannot connect() to the listener (with or without an extra bind()).
* What should be the correct order? Maybe:
1) socket()
2) bind() (What address?)
3) setsockopt(SO_BINDTODEVICE)
4) listen()
* With this order the poll() loop does not drop out to signal activity on
the listener socket.
* Maybe select() does?
* Does the feature really support IP address switches on a device? If
so, to what address should we bind()?
Next I played around a bit with my PCMCIA cards. I am using `cardctrl
scheme <scheme-name>' to switch my network. Serveez tells me the correct
IP addresses (serveez -i). But when I switch from scheme `raimi' to
`clean' it still shows Raimi's eth0 interface and Serveez is able
to bind to this address although `ifconfig' does not know about it.
Finally when I plug out and in again my PCMCIA card the interface
disappears also in Serveez.
This behaviour shows that we actually cannot implement a correct algorithm
for switching interface addresses... [In fact: How should a user space
program if the kernel does not?]
Cheers,
address@hidden
- [dev-serveez] SO_BINDTODEVICE investigations,
stefan <=