home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / protocol / iso / 1528 < prev    next >
Encoding:
Text File  |  1993-01-28  |  1.9 KB  |  64 lines

  1. Newsgroups: comp.protocols.iso
  2. Path: sparky!uunet!europa.eng.gtefsd.com!emory!gatech!paladin.american.edu!howland.reston.ans.net!spool.mu.edu!agate!dog.ee.lbl.gov!news!cod!jose
  3. From: jose@nosc.mil (Jose R. Vazquez)
  4. Subject: Help needed with Sun OSI package
  5. Message-ID: <1993Jan28.181639.22119@nosc.mil>
  6. Keywords: nsel
  7. Organization: Naval Ocean Systems Center, San Diego, CA
  8. Distribution: usa
  9. Date: Thu, 28 Jan 1993 18:16:39 GMT
  10. Lines: 52
  11.  
  12. I'm having a problem converting an application that uses
  13. TCP-IP to run under OSI.  I'm using SunNet OSI version 7.
  14. I can open a socket but I can't bind it.  I always get
  15. the following error:
  16.  
  17.     NSEL (0) is already in use => errno: 48
  18.  
  19. I'm following one their examples.  Some C code follows.
  20.  
  21.     .
  22.     .
  23.     .
  24. /* Get socket */
  25. if (sd = socket(AF_OSI, SOCK_DGRAM, OSIPROTO_IND) < 0 ) 
  26. {
  27.     perror("socket");
  28.     exit(1);
  29. }
  30.  
  31. /* Get NSEL from OSI address */
  32.  
  33. len = OSI_SAP_LEN(&my_addr, OSI_NSAP);
  34. addr = OSI_SAP_ADDR(&my_addr, OSI_NSAP);
  35. nsel = addr[len-1];
  36.  
  37. /* Set up adddresses and bind to the socket with src. */
  38.  
  39. if (bind(sd, (struct sockaddr *)&nsel, sizeof(nsel)) < 0 ) 
  40. {
  41.     printf("%s:\tNSEL (%d) is already in use => errno: %d\n",
  42.         me, nsel, errno);
  43.     close(sd);
  44.     exit(1);
  45. }
  46.     .
  47.     .
  48.     .
  49.  
  50. my_addr already contain the right ISO address of the computer.
  51. I didn't set-up the system, so, I'm not sure if the isoentities
  52. file need to be modify.  Any help will be appreciated.
  53.  
  54. Thanks.
  55.  
  56. **************************************************************
  57. *                           *                                *
  58. * Jose R. Vazquez           * Phone: (619) 553-6337          *
  59. * NCCOSC RDT&E DIV          * Email:                         *
  60. * Code 847                  *        DDN: jose@nosc.mil      *
  61. * San Diego, CA  92152-5000 *        UUCP: sdcsvax!nosc!jose *
  62. *                           *                                *
  63. **************************************************************
  64.