Path: utzoo!attcan!uunet!ncrlnk!ncr-sd!hp-sdd!hplabs!ucbvax!bcsaic.UUCP!krm From: krm@bcsaic.UUCP (Keith Michaels) Newsgroups: comp.protocols.tcp-ip Subject: Shutting down sockets on Apollo/VAX - reply Message-ID: <8810040105.AA14869@wsc-sun.com> Date: 4 Oct 88 01:05:09 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 39 Re: Hung sockets on Apollo and VAX. The following program releases socket connections that are left over after a network application crashes on a VAX running Wollongong TCP/IP. You have to know the INET: device name assigned to it -- this can sometimes be determined by checking the owning PID in SHOW DEV/FULL INET:. This also seems to clean up the Apollo side at the other end of the link, but I don't know how to do the equivalent operation from the Apollo. /* Release unused INET: devices under Wollongong TCP/IP for VAX/VMS */ /* K. Michaels, BCS 27-Sep-1988 */ #include #include #include #include main(ac,av) int ac; char *av[]; { int i; unsigned short iosb[4], chan; char idev[16]; $DESCRIPTOR(idev_dsc,idev); if(av[1] == NULL) do { printf("inet device name: "); if(gets(idev) == 0) exit(SS$_NORMAL); } while (strlen(idev) == 0); else strcpy(idev,av[1]); idev_dsc.dsc$w_length = strlen(idev); i= sys$assign(&idev_dsc,&chan,0,0); if((i & 1) == 0) exit(i); i = sys$qiow(0,chan,IO$_SETCHAR,iosb,0,0,&0,0,0,0,0,0); if((i & 1) == 0) exit(i); if((iosb[0] & 1) == 0) exit(iosb[0]); sys$dassgn(chan); exit(SS$_NORMAL); }