Article delegate-en/76 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: Preffered interface
09 Sep 1998 11:23:04 GMT (Yutaka Sato 佐藤豊)

In message <_A75@delegate-en.ML_> on 09/09/98(17:51:47)
you "Vadim V. Chepkov" <> wrote:
 |I tried to use delegated (v. 5.6.5) but have found a problem.
 |I have multirouted host on which I've installed delegated with one
 |ethernet card whith a few IP-addresses as aliases. One of them
 |I want to use.
 |I run delegated whith -Ppreffered_ip:port and it works fine, but
 |requests are going not from preffered_ip. How to setup it?

-P option specifies the interface to be used to accept connections
from clients, that is the destination of connection.
What you require is another thing; how to specify the source of
connection to the server.  Once I tried it but not completed.
You can find a stuff commented out which is a reminder of the trial
in src/inets.c.

>  static sockopen1(asock,in,what,portname,hostname,direct)
>  /*
>  {
>  int on = 1;
>  char sockname[256];
>  bind_insock(sock,"etlkbs",0);
>  gethostName(sock,sockname,"%A:%P");
>  rcode = Setsockopt(sock, SOL_SOCKET, SO_DONTROUTE, &on, sizeof(on));
>  printf("[%s] dontroute=%d\n",sockname,rcode);
>  }
>  */
>          rcode = Bconnect(sock,(SAP)in,sizeof(struct sockaddr_in),direct);

I suppose doing


before calling Bconnect() may work well in a special case, where
only single IP routes exists.

I remember the problem is that binding the source name of a socket
makes uncontrollable effect on the IP routing, like TCP connection
error, where the host has multiple IP rotes.

Yutaka Sato <>   @ @ 
Computer Science Division, Electrotechnical Laboratory      ( - )
1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan            _<   >_

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]