Operating System - OpenVMS
1753611 Members
5976 Online
108797 Solutions
New Discussion

sys$qio IO$_WRITEVBLK with full-duplex card configuration

 
jordi-koro
New Member

sys$qio IO$_WRITEVBLK with full-duplex card configuration

Hi,

Someone knows why the following function detecs correctly the cable disconnection for an ethernet card when is configured on half-duplex mode and when is configured on full-duplex mode doesn't detect the disconnection?

Really thanks in advance!

void check_hubs(int hub)
{
   unsigned int stat,error_dev;
   float waittime = 0.1;			/* needed time to obtain a qio answer */
   P5_PARAM xmt_param={0xAB,0,0x04,0,0,0};	/* broadcast multicast address */
   char xmt_buffer[1];				/* transmit buffer */

   /* transmits a multicast message */
   _qio_iosb[hub].w_err = 0;
   stat = sys$qio(0,_network_channel[hub].channel,IO$_WRITEVBLK,&_qio_iosb[hub],0,0,&xmt_buffer[0],0,0,0,&xmt_param,0);
   if (stat & 1)
   {
		  /* qio success. wait a time to access to the returned information */
		  lib$wait(&waittime);
		
		  /* checks qio status */
		  if (_qio_iosb[hub].w_err == 0)
		  {
			 /* timeout in write operation */
			 error_dev = TRUE;
		  }
		  else if ($FAIL(_qio_iosb[hub].w_err))
		  {
			 /* network error */
			 error_dev = TRUE;
		  }
		  else
		  {
			 /* success in write operation */
		   error_dev = FALSE;	
		  }
   }
   else
   {
     
	    /* qio error */
      if (_network_channel[hub].critical)
      {
          lib$stop(stat,0,0);
      }
      else if (!_error_in_hub[hub])
      {
           printf("QUIO ERROR CONTROL_DEVFAIL\n");
         lib$signal(CONTROL_DEVFAIL, 1, &_dvc_dsc);
      }
      error_dev = TRUE;
   }
}