inetd and syslogd

Allan Clark allanc at chickenandporn.com
Tue Nov 8 09:46:56 UTC 2005


yinguomei wrote:
> hi;
> first I use the inetd in busybox,but the error message is 
> telnet: tcp/telnet: unknown service
>   

I think the answer lies in this code, then (networking/inetd.c at 625)
> if (port == 0) {
> syslog(LOG_ERR,
> "%s/%s: unknown service",
> sep->se_service, sep->se_proto);
> continue;
> }

Now, just looking at the code, and understanding that it follows
bb_lookup_port(...) this would imply that the port was not found. I'm
sure you looked at this code, and came to the same conclusion, so I'm
wondering whether you looked at /etc/services, or wherever else it
should look to map a port name to a port number.

It's possible, too, looking at the code ("sep->se_service,
sep->se_proto") against your error message ("tcp/telnet: unknown
service") that you have the format backwards? In your /etc/inetd.conf
file, should you swap the "tcp" and the "telnet"? If it's that simple,
that would really suck, but at least you're fixed...

I'm guessing based on the order of the parameters in the error message
and by looking at the code, so I (really) might be wrong, but take a
look, and see if it gives you any ideas.

> so I use the netkit-base-0.17, but it can not work too.
> I build the busybox as static library.
> what's the problem?
>   

I'm wondering if you looked at what the error message meant (I used
"find busybox -name \*.c -exec grep 'unknown service' {} \; -print",
there was one match). 。。。but I'm sure you did. What did your
/etc/services file look like? Or are you using something that looks in
another place? I could be wrong in my assumption (4:40am, I could be
broken). Take another look, Busybox's inetd works very well for many, it
should work for you.

Allan



More information about the busybox mailing list