Xref: utzoo comp.sys.encore:606 comp.unix.questions:21930 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!uflorida!rex!rouge!gator.cacs.usl.edu From: pcb@gator.cacs.usl.edu (Peter C. Bahrs) Newsgroups: comp.sys.encore,comp.unix.questions Subject: getsockname problem ?? Message-ID: <7889@rouge.usl.edu> Date: 3 May 90 21:04:23 GMT Sender: anon@rouge.usl.edu Followup-To: comp.sys.encore Organization: The Center for Advanced Computer Studies, USL Lines: 22 I am porting some socket stuff from the SUN 3's to the Encore. The code makes a call to : getsockname (socket, (struct sockaddr*) ptr, &len) where ptr is of type sockaddr_in. This seems to work fine on the SUN and on the VAX and the RT. I am trying to reference the field : ptr->sin_port which is a numeric. I want to: sprintf (buff, "%d", ptr->sin_port); Like I said, it works fine on SUN and VAX but puts some wierd stuff in their for the Encore. The weird stuff is not the same port ID as was created. I doing something non portable? Encore BSD 4.2, SUN & VAX 4.3 /*----------- Thanks in advance... --------------------------------------+ | Peter C. Bahrs | | The USL-NASA Project | | Center For Advanced Computer Studies INET: pcb@gator.cacs.usl.edu | | 2 Rex Street | | University of Southwestern Louisiana ...!uunet!dalsqnt!gator!pcb | | Lafayette, LA 70504 | +-----------------------------------------------------------------------*/