From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,1a7993b1e81d1924,start X-Google-Attributes: gid1164f8,public From: "Ashutosh V. Bhalerao" Subject: IFNET implementation on DEC 2100 Date: 1996/01/10 Message-ID: <4d19j3$bks@giga.bga.com>#1/1 X-Deja-AN: 134683681 x-rtcode: 863fe54a30a306107ef429b1 content-type: text/plain; charset=us-ascii organization: Real/Time Communications - Bob Gustwick and Associates mime-version: 1.0 newsgroups: comp.sys.dec x-mailer: Mozilla 1.1PE (Windows; I; 16bit) Subject: IFNET implementation on DEC 2100 Newsgroups: comp.sys.dec Organization: Centre for Development of Advanced Computing (C-DAC), Pune, INDIA. Distribution: global Summary: Keywords: Hi Everybody, I am really sorry for having included a source code in this posting but please bear with me !! Anyway, my problem is that I am NOT able to use the "ifnet" STREAMS module for bridging STREAMS device drivers to sockets. Such a facility is available on DIGITAL UNIX (any version above 2.0) running on DEC 2100 server. The problem that I am having is that after pushing the "ifnet" streams module on top of my STREAMS Device Driver, I can't tell the "ifnet" module of the "unit number" of my Device Driver. The source code that I have used to do this is given below. Thanks very much Abhay Ranade abhayr@falcon.cdac.ernet.in PS : Please reply by email ------------------------------------------------------------------------- -- #include #include #include #include #include #include #include #include main() { int fd, unit ; struct strioctl str ; if ( (fd = open("/dev/streams/pcids", O_RDWR)) < 0 ) { perror("pcids : open failed ....") ; exit(1) ; } if (isastream(fd)) printf("\nSTREAMS based open\n") ; else printf("\nSockets based open\n") ; if(ioctl(fd,I_PUSH,"ifnet") < 0 ) printf("\n\n ifnet I_PUSH failed \n\n") ; else printf("\n\n Ifnet module pushed \n\n") ; unit = 61 ; /* My device driver's MAJOR id */ str.ic_cmd = 1236 ; /* IS THIS THE RIGHT COMMAND ? <<<<<<<<<<<<<<<< */ str.ic_dp = (char *)&unit ; if ( ioctl(fd, I_STR, (void *)&str) < 0 ){ perror("ioctl IFNET_IOCTL_UNIT failed ...") ; exit(2) ; } close (fd) ; } ------------------------------------------------------------------------- - RETURN STATUS : The last ioctl returns the following message in response to execution of the perror statement: ioctl IFNET_IOCTL_UNIT failed ...: Operation wood block