Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: abhayr@parcom.ernet.in (Abhay Ranade)
Subject: IFNET implementation on DEC 2100
Date: 1996/01/10	[thread overview]
Message-ID: <DKz2CF.F06@parcom.ernet.in> (raw)

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




             reply	other threads:[~1996-01-10  5:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-01-10  5:00 Abhay Ranade [this message]
  -- strict thread matches above, loose matches on Subject: below --
1996-01-10  5:00 IFNET implementation on DEC 2100 Ashutosh V. Bhalerao
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