home *** CD-ROM | disk | FTP | other *** search
/ HAM Radio 3 / hamradioversion3.0examsandprograms1992.iso / packet / n17jsrc / maca.c < prev    next >
C/C++ Source or Header  |  1991-02-11  |  717b  |  33 lines

  1. void
  2. maca_recv(iface,axp,src,dest,bp,mcast)
  3. struct iface *iface;
  4. struct ax25_cb *axp;
  5. char *src;
  6. char *dest;
  7. struct mbuf *bp;
  8. int mcast;
  9. {
  10.     int c;
  11.     int32 dt;
  12.  
  13.     if(iface->ioctl == NULL)
  14.         return bp;    /* No device ioctl - can't do anything */
  15.  
  16.     c = PULLCHAR(&bp);
  17.     switch(c){
  18.     case MACA_RTS:
  19.         send_ax25(
  20.         /* Mute long enough for the addressed station to send
  21.          * a CTS. Since that's channel speed dependent, use a special
  22.          * value to tell the driver to use the right value
  23.          */
  24.         (*iface->ioctl)(iface,PARAM_MUTE,1,-1);
  25.         break;
  26.     case MACA_CTS:    /* Inhibit transmitter for requested interval */
  27.         dt = pull32(&bp);
  28.         (*iface->ioctl)(iface,PARAM_MUTE,1,dt);
  29.         break;
  30.     }
  31.     return bp;
  32. }
  33.