Xref: utzoo comp.sys.encore:609 comp.unix.questions:21952 Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucsd!usc!apple!snorkelwacker!bloom-beacon!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.sys.encore,comp.unix.questions Subject: Re: getsockname problem ?? Message-ID: <1990May4.014228.12520@athena.mit.edu> Date: 4 May 90 01:42:28 GMT References: <7889@rouge.usl.edu> <1990May3.233332.5956@athena.mit.edu> <20328:May402:03:4790@stealth.acf.nyu.edu> Sender: news@athena.mit.edu (News system) Reply-To: jik@athena.mit.edu (Jonathan I. Kamens) Distribution: usa Organization: Massachusetts Institute of Technology Lines: 26 In article <20328:May402:03:4790@stealth.acf.nyu.edu>, brnstnd@stealth.acf.nyu.edu writes: |> In article <1990May3.233332.5956@athena.mit.edu> jik@athena.mit.edu |> (Jonathan I. Kamens) writes: |> > (or store a constant address into |> > the sin_addr.s_addr field, although this type of thing is frowned upon, |> > since you should use gethostbyname() and then assign the return value |> > directly into the sin_addr.s_addr field), |> Don't be so pedantic. All programs should accept both numeric addresses |> and domain names. Definitely. You're misreading what I said. If a program is given a numeric address, then it uses inet_addr() (which is, IMHO, in the same class as gethostbyname(). I meant to say "something like gethostbyname()" in my message, not just "gethostbyname()", and perhaps that's why you misunderstood me) to convert it into a network byte order, and then assings that to the sin_addr.s_addr field. When I said "constant address", I was talking about unsigned long integers hard-coded into a program. This is the "type of thing" I consider to be "frowned upon." Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8495 Home: 617-782-0710