home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff294.lzh / DNet / amiga / lib / dioctl.c < prev    next >
C/C++ Source or Header  |  1989-12-11  |  464b  |  28 lines

  1.  
  2. /*
  3.  *  DIoctl.C
  4.  */
  5.  
  6. #include "lib.h"
  7.  
  8. void
  9. DIoctl(_chan, cmd, val, aux)
  10. void *_chan;
  11. ubyte cmd;
  12. uword val;
  13. ubyte aux;
  14. {
  15.     CHANN *chan = (CHANN *)_chan;
  16.     IOSTD ior;
  17.  
  18.     ior.io_Command = DNCMD_IOCTL;
  19.     ior.io_Unit = (void *)chan->chan;
  20.     ior.io_Offset = (long)chan;
  21.     ior.io_Message.mn_ReplyPort = (PORT *)chan;
  22.     ior.io_Data = (APTR)(long)((val<<16)|(aux<<8)|cmd);
  23.     PutMsg(chan->dnetport, (MSG *)&ior);
  24.     WaitMsg(&ior);
  25.     FixSignal(chan);
  26. }
  27.  
  28.