- From: Andrew Steets <steets@gmail.com>
- Date: Fri, 17 Aug 2007 16:42:07 -0500
- To: "dmoore7@nd.edu" <dmoore7@nd.edu>
- Cc: www-lib@w3.org
On 8/16/07, dmoore7@nd.edu <dmoore7@nd.edu> wrote: > > Hello, > I'm seeking to use webbot to retrieve information and not use the default device > that it would be assigned by the routing table. > I believe this is possible, ping, for instance, can take a -I argument to force > it to work out of a specific device. The way that ping is able to do this is generally operating system specific. On most UNIX systems this is accomplished via the use of raw sockets. Specifically, ping has to construct the IP packet from scratch, rather than using higher layer APIs. I don't think this is a practical option for libwww. > So far it seems as though this would require modification to both the webbot > program, and also to the libwww library itself, perhaps modifying the format of > a request object to contain device selection information. > > Does this seem feasible? Has anyone heard of such a thing being done before? > Is there another method of doing this that is easier? You definitely have options. You haven't said why you want the web bot traffic to use another interface. That information would probably help in finding the correct solution, but it sort of seems like a job for policy routing. Classical routing decisions are made solely based upon the destination IP address. However, most modern operating systems have some notion of policy routing wherein routing decisions can be made based on other criteria. The available criteria are going to depend on your operating system. On Linux I would look at the ip(8) and iptables(8) documentation. You may also want to make routing decisions at an upstream router (if you have access to those resources). Hope this helps. -Andrew
Received on Friday, 17 August 2007 21:42:12 UTC