From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,ca31841b9f100815 X-Google-Attributes: gid1164f8,public X-Google-Thread: fee84,ca31841b9f100815 X-Google-Attributes: gidfee84,public From: neideck@kar.dec.com (Burkhard Neidecker-Lutz) Subject: Re: Problem with getservbyname on ALPHA/OSF1 box Date: 1998/04/22 Message-ID: <6hlf3r$it6@usenet.pa.dec.com>#1/1 X-Deja-AN: 346728595 References: <6h2mrf$eq$1@nnrp1.dejanews.com> Organization: CEC Karlsruhe Newsgroups: comp.unix.osf.osf1,comp.sys.dec In article <6h2mrf$eq$1@nnrp1.dejanews.com> howard@tibinc.com writes: >Hi guys > >I've been porting an application to a DEC alpha box and I am having trouble >with getservbyname. Specifically after my call to getservbyname, the value of >the s_port field in the servent structure returned is 37146, which is nowhere >close to the value of the service I asked for. Wild guess: The service you wanted has the number 6801 instead of 37146 ? Could this be that the field is in network byte order (big-endian) and you access it directly in host byte order (little-endian) without the ntohs() call ? Burkhard Neidecker-Lutz EUROMEDIA - Distributed Multimedia Archives for Cooperative TV Production CEC Karlsruhe , European Applied Research Center, Digital Equipment Corp. email: neideck@kar.dec.com