From: "Ashutosh V. Bhalerao" <ashu@bga.com>
To: abhayr@parcom.ernet.in
Subject: (no subject)
Date: 1996/01/10 [thread overview]
Message-ID: <4d197j$bks@giga.bga.com> (raw)
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 <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/stream.h>
#include <sys/stropts.h>
#include <sys/strlog.h>
#include <sys/dlpihdr.h>
#include <sys/poll.h>
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
next reply other threads:[~1996-01-10 5:00 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-01-10 5:00 Ashutosh V. Bhalerao [this message]
-- strict thread matches above, loose matches on Subject: below --
1999-07-27 4:00 (no subject) Dave Kranz
1999-07-28 4:00 ` Enrico Badella
1997-11-04 5:00 Fredrik Larsson
1997-09-30 4:00 Henny Zutt
[not found] <5sc09m$16n@dfw-ixnews10.ix.netcom.com>
1997-08-08 4:00 ` celtic
1997-08-07 4:00 Seungho Lee
1997-04-23 4:00 wm_tey
1996-07-11 4:00 Peter Lang
1996-01-10 5:00 Ashutosh V. Bhalerao
1996-01-05 5:00 Mike Berkowitz
1996-01-09 5:00 ` Pauwl Lunow
[not found] <4cgf9m$n75@news.Ieunet.ie>
1996-01-04 5:00 ` Uwe Leinberger GSI Darmstadt
1995-12-17 5:00 scott almburg
1995-12-18 5:00 ` Mike Young
1995-12-17 5:00 Mary E. Bourns
1995-12-09 5:00 Benny Jonsson
1995-11-03 5:00 Peter Ruczynski
1995-09-14 4:00 Steve Sonnenberg
1995-09-14 4:00 Cybersmith Customer
1995-06-08 4:00 Royal Hansen
1995-06-08 4:00 Royal Hansen
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox