Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!rochester!kodak!uupsi!sunic!nuug!ulrik!kjetilo From: kjetilo@gollum.uio.no (Kjetil Otter Olsen) Newsgroups: comp.protocols.nfs Subject: Problem with PC-NFS programmers Toolkit Message-ID: <901019.190237.kjetilo@otter> Date: 19 Nov 90 18:02:37 GMT Sender: news@ulrik.uio.no (USENET News System) Organization: University of Oslo Lines: 43 I am using PC-NFS 3.0.1 and PC-NFS Programmers Toolkit 1.00 and the following problem has come up: When I try to open a TCP socket to a port by using the number of a service, (and not getservbyname()) it fails. After _some_ debugging I found that the getservbyname() function returned port number 5888 for telnet, that is 23 _* 256_. ( Telnet is usually 23, according to Assigned Numbers ) The same weird thing happens for other services (SMTP, NNTP ....) For telnet, SMTP or NNTP this is no problem, I just use getservbyname() or multiply, but in some cases that is not enough... When I want to access a port > 256, I end up with >256 * 256 (= >64k ).. And since the port is declared as an "unsigned short" in the sockaddr_in- struct I have a problem... OK, a bug in the Toolkit I assumed, but then i tried the CUTCP telnet that uses the Toolkit, and it has no problems with port- numbers > 256. Confusing to say the least.. Since no source is available for the CUTCP software at the moment I can not find out what they have done to overcome the problems :-( (My CUTCP/CUTE is: CUTE;2.2TN/NFS-A dated 13th feb 1990.) The question: Does anyone have any idea how i can get PC-NFS Programmers Toolkit to open a socket to a port > 256 ?? Maybe someone in the CUTCP/CUTE team can share their knowledge with me? Please answer by E-mail, or News, or fax, or phone or drop in :-) Thanks in advance. --Kjetil ------------------- Kjetil Otter Olsen |*| kjetilo@gollum.uio.no PC / UNIX / network consultant |*| kjetilo@usit.uio.no Central Computing Senter |*| otter@ifi.uio.no University of Oslo, Norway |*| Kjetil.Olsen@use.uio.no Phone: +47-2-45 34 88 FAX: +47-2-45 57 70 -------------------