> I've got the question: why this produces shit! ?
> if ((serv = getservbyport(23, "tcp")) == NULL) {
^^^^^^^^^ use htons(23)
the man page isnt too explicit about this. (but it's still obvious ...)
-- mingo