コード例 #1
0
RTP_BOOL SH7619_EDMAC_xmit_done  (PIFACE pi, DCU msg, RTP_BOOL success)
{
	PSH7619_EDMAC_SOFTC   sc;

	ARGSUSED_PVOID(msg);

	if(!pi)
	{
		return (RTP_FALSE);
	}

	sc = iface_to_softc(pi);
	if(!sc)
		return(RTP_TRUE);

	if(!success)
	{
		sc->stats.errors_out++;
		sc->stats.tx_other_errors++;
	}
	else
	{
		/* Update total number of successfully transmitted packets. */
		sc->stats.packets_out++;
		sc->stats.bytes_out += msg->length;
	}
	return(RTP_TRUE);
}
コード例 #2
0
/* ********************************************************************
   Statistic. return statistics about the device interface
   
   This routine is called by user code that wishes to inspect driver statistics.
   We call this routine in the demo program. It is not absolutely necessary
   to implement such a function (Leave it empty.), but it is a handy debugging
   tool.
  
   The address of this function must be placed into the "devices" table in
   iface.c either at compile time or before a device open is called.
  
   
   Non packet drivers should behave the same way.
  
   ********************************************************************     */
RTP_BOOL loop_statistics(PIFACE pi)                       
{
    NATIVE_PROFILE_HAL_DRIVERS_ETHERNET();
#if (!INCLUDE_KEEP_STATS)
    ARGSUSED_PVOID(pi)
#endif

    UPDATE_SET_INFO(pi, interface_packets_in, loop_packets_in)
    UPDATE_SET_INFO(pi, interface_packets_out, loop_packets_out)
    UPDATE_SET_INFO(pi, interface_bytes_in, loop_bytes_in)
    UPDATE_SET_INFO(pi, interface_bytes_out, loop_bytes_out)
    UPDATE_SET_INFO(pi, interface_errors_in, loop_errors_in)
    UPDATE_SET_INFO(pi, interface_errors_out, loop_errors_out)
    UPDATE_SET_INFO(pi, interface_packets_lost, 0L)
    return(RTP_TRUE);
}
コード例 #3
0
ファイル: OSMALLOC.C プロジェクト: Strongc/DC_source
/* ********************************************************************   */
void _ks_free(PFBYTE ptr, int num_elements, int size)
{
#if (DISPLAY_MALLOC)
    DEBUG_ERROR("ks_free returns: ", DINT1, ptr, 0);
#endif

#    if (defined (RTKBCPP))
        /* Was done by ks_dpmi_release_all();   */
        ARGSUSED_PVOID(ptr)
        ARGSUSED_INT(num_elements)
        ARGSUSED_INT(size)

#    elif (INCLUDE_BGET)
        ARGSUSED_INT(num_elements)
        ARGSUSED_INT(size)
        brel(ptr);

#    elif (INCLUDE_WINSOCK || INCLUDE_BSDSOCK)
        ARGSUSED_INT(num_elements);
        ARGSUSED_INT(size);
        free(ptr);

#    elif (defined(SEG_IAR))
        /* protected mode   */
        ARGSUSED_INT(num_elements);
        ARGSUSED_INT(size);
        free(ptr);

#    elif ( defined(__BORLANDC__) )   /* real mode */
        ARGSUSED_INT(num_elements);
        ARGSUSED_INT(size);
        _ffree(ptr);


#    else
        #error: ks_free needs to be implemented
#    endif
}
コード例 #4
0
/* ********************************************************************
   close the packet driver interface.
   
   This routine is called when the device interface is no longer needed
   it should stop the driver from delivering packets to the upper levels
   and shut off packet delivery to the network.
  
   The address of this function must be placed into the "devices" table in
   iface.c either at compile time or before a device open is called.
  
   ********************************************************************     */
void loop_close(PIFACE pi)                                
{
    NATIVE_PROFILE_HAL_DRIVERS_ETHERNET();
    /* keep compiler happy */
    ARGSUSED_PVOID( pi );  
}
コード例 #5
0
void SH7264_SMSC_close(PIFACE pi)                          
{
    ARGSUSED_PVOID( pi );  //  keep compiler happy
}
コード例 #6
0
void SH7619_EDMAC_close(PIFACE pi)                          
{
	ARGSUSED_PVOID( pi );  /*  keep compiler happy */
}