From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,d1bdd99423d805c7 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1993-05-31 14:07:00 PST Path: gmd.de!rrz.uni-koeln.de!unidui!math.fu-berlin.de!news.belwue.de!xlink.net!howland.reston.ans.net!spool.mu.edu!uwm.edu!opus.csd.uwm.edu!dave From: dave@opus.csd.uwm.edu (Dave Rasmussen) Newsgroups: comp.unix.osf.osf1 Subject: Re: Alpha/OSF network code question Date: 31 May 1993 20:46:09 GMT Organization: University of Wisconsin - Milwaukee Distribution: na Message-ID: <1udqqhINNq18@uwm.edu> References: <1ub1cpINNgpb@uwm.edu> Reply-To: dave@opus.csd.uwm.edu NNTP-Posting-Host: 129.89.70.40 Originator: dave@opus.csd.uwm.edu >From article <1ub1cpINNgpb@uwm.edu>, by dave@csd4.csd.uwm.edu (Dave Rasmussen): > > I've been looking at this code a while now and can't figure out what > conversion I need to do to the port I get from the getservbyname > in order to bind a name to the proper socket. Any advice to this or > anything else I'm doing would be appreciated. > > sa.sin_port = htons(sp->s_port); /* what conversion should I use here??? */ > sa.sin_family = hp->h_addrtype; Matt Thomas from DEC pointed out that I needed to bzero the socketaddr structure of any remnant garbage before using it. Problem solved. Thanks Matt! -- Dave Rasmussen - SysAdm/Hacker/Consulting Manager, UWM Computing Svcs Div. Internet:dave@uwm.edu, Uucp:uwm!dave, Bitnet:dave%uwm.edu@INTERBIT AT&T:414-229-5133 USmail:Box 413 EMS380,Milwaukee,WI 53201 HAM: N9REJ