Danie Roux <[EMAIL PROTECTED]> wrote:
>If I was to change
>
>sp = getservbyname ("ftp", "tcp");
>
>to 
>
>sp = getservbyport (21, "tcp");
>
>It should work right? Because it isn't. And I need this to work for a boot
>stiffy I'm building.

The port number is given in network byte order. My guess is you'll need:

  sp = getservbyport (htonl (21), "tcp");

Cheers,

-- 
Colin Watson                                  [EMAIL PROTECTED]

Reply via email to