From: pb@idca.tds.philips.nl (Peter Brouwer)
Subject: Re: sin_port weirdness in DEC OSF/1?
Date: 11 Mar 94 07:42:42 GMT [thread overview]
Message-ID: <pb.763371762@atperf.idca.tds.philips.nl> (raw)
In-Reply-To: 2loa0b$sqk@vixen.cso.uiuc.edu
In <2loa0b$sqk@vixen.cso.uiuc.edu> robm@ncsa.uiuc.edu (Rob McCool) writes:
>int get_portnum(int sd,FILE *out) {
> struct sockaddr addr;
> int len;
>
> len = sizeof(struct sockaddr);
> if(getsockname(sd,&addr,&len) < 0)
> die(SERVER_ERROR,"could not get port number",out);
> return(((struct sockaddr_in *)&addr)->sin_port);
>}
>Does anyone see anything wrong with this? Is this a bug in OSF/1, or a
>mistake on my part which just happens to work on other systems? If it's an
>OS bug, does anyone have a workaround?
Might the fact that sin_port is a u_short and your function returns an int give
problems?
--
Regards, Peter Brouwer /\_/\
pb@idca.tds.philips.nl (0 0)
-----------------------------------oOO--(_)--OOo----------------------------
# Digital Equipment Enterprise, / WorkGroup Systems, Office Product Set
# DIGITAL : HLDEO1::BROUWER_P,829-4218 \ Dep Office Product Sets, P.O.Box 245,
# PHONE:[+31][0]55 43 ext 4218,fax 9133 7300AE Apeldoorn, The Netherlands.
next prev parent reply other threads:[~1994-03-11 7:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-03-10 23:20 sin_port weirdness in DEC OSF/1? Rob McCool
1994-03-11 4:16 ` Rob McCool
1994-03-11 7:42 ` Peter Brouwer [this message]
1994-03-11 14:23 ` John T. Kohl
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox