Article View: comp.protocols.iso
Article #1431Help needed with Sun OSI package
From: Jose R. Vazquez
Date: Thu, 28 Jan 1993 18:16
Date: Thu, 28 Jan 1993 18:16
52 lines
1976 bytes
1976 bytes
I'm having a problem converting an application that uses
TCP-IP to run under OSI. I'm using SunNet OSI version 7.
I can open a socket but I can't bind it. I always get
the following error:
NSEL (0) is already in use => errno: 48
I'm following one their examples. Some C code follows.
.
.
.
/* Get socket */
if (sd = socket(AF_OSI, SOCK_DGRAM, OSIPROTO_IND) < 0 )
{
perror("socket");
exit(1);
}
/* Get NSEL from OSI address */
len = OSI_SAP_LEN(&my_addr, OSI_NSAP);
addr = OSI_SAP_ADDR(&my_addr, OSI_NSAP);
nsel = addr[len-1];
/* Set up adddresses and bind to the socket with src. */
if (bind(sd, (struct sockaddr *)&nsel, sizeof(nsel)) < 0 )
{
printf("%s:\tNSEL (%d) is already in use => errno: %d\n",
me, nsel, errno);
close(sd);
exit(1);
}
.
.
.
my_addr already contain the right ISO address of the computer.
I didn't set-up the system, so, I'm not sure if the isoentities
file need to be modify. Any help will be appreciated.
Thanks.
**************************************************************
* * *
* Jose R. Vazquez * Phone: (619) 553-6337 *
* NCCOSC RDT&E DIV * Email: *
* Code 847 * DDN: jose@nosc.mil *
* San Diego, CA 92152-5000 * UUCP: sdcsvax!nosc!jose *
* * *
**************************************************************
Technical Details
Message-ID:
<1993Jan28.181639.22119@nosc.mil>Path:
arc1-ca.pugleaf.net!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!joseShow Full Headers
Complete Article Headers
Newsgroups: comp.protocols.iso Path: arc1-ca.pugleaf.net!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 From: jose@nosc.mil (Jose R. Vazquez) Subject: Help needed with Sun OSI package Message-ID: <1993Jan28.181639.22119@nosc.mil> Keywords: nsel Organization: Naval Ocean Systems Center, San Diego, CA Distribution: usa Date: Thu, 28 Jan 1993 18:16:39 GMT Lines: 52