getsockname problem ??
brnstnd at stealth.acf.nyu.edu
brnstnd at stealth.acf.nyu.edu
Fri May 4 12:03:47 AEST 1990
A note of warning: In a struct servent (as read from /etc/services),
s_port is defined as an int. Don't pass it to ntohl()! All ports are
unsigned short values and should go through ntohs().
In article <1990May3.233332.5956 at athena.mit.edu> jik at 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.
---Dan
More information about the Comp.unix.questions
mailing list