On Thu, 16 Nov 2006 11:47:08 -0800, CptDondo wrote:
> I have an embedded box with a single ethernet interface that I will
> configure as some number of virtual interfaces:
>
> eth0:0 - 192.168.1.1
> eth0:1 - 192.168.1.2
> eth0:2 - 192.168.1.3
>
> A request will come in on a particular interface and port, say
> 192.168.1.2:8037 and will invoke a program.
>
> Here's the part I don't understand:
>
> The program that is invoked has to take different action depending on
> which IP address was used.
>
> Is there some way for a program invoked by inetd to get the connection
> information?
>
> The program acts as an intelligent relay of sorts, acting as a bridge
> between the requestor on the network and a piece of hardware connected
> to a serial port.
>
> For reasons of scalability, it would be much easier to have 1 serial
> mapped to 1 IP address; there are hundreds of these clusters, and some
> have 1, 2, 3, or 4 connections.
>
> (Yes I could probably do it with sockets, but I already have the bridge
> software written and tested with inetd, so why reinvent the wheel if I
> don't have to....)
>
> --Yan
xinetd will let you bind an application to an ip address and port.
Not sure about inetd. I use xinetd for all my my inetd type things.
jack
--
D.A.M. - Mothers Against Dyslexia
see
http://www.jacksnodgrass.com for my contact info.
jack - Grapevine/Richardson