FreeBSD/sys/net/altq/altq_subr.c
/*
 * get queue statistics
 * Locking is done in the discipline specific functions with regards to
 * copyout operations, also it is not yet clear which lock to use.
 */
get queue statistics
Locking is done in the discipline specific functions with regards to
copyout operations, also it is not yet clear which lock to use.
get queue statistics Locking is done in the discipline specific functions with regards to copyout operations also it is not yet clear which lock to use .
int
altq_getqstats(struct pf_altq *a, void *ubuf, int *nbytes)
{
	int error = 0;
	switch (a->scheduler) {
#ifdef ALTQ_CBQ
	case ALTQT_CBQ:
		error = cbq_getqstats(a, ubuf, nbytes);
		break;
#endif
#ifdef ALTQ_PRIQ
	case ALTQT_PRIQ:
		error = priq_getqstats(a, ubuf, nbytes);
		break;
#endif
#ifdef ALTQ_HFSC
	case ALTQT_HFSC:
		error = hfsc_getqstats(a, ubuf, nbytes);
		break;
#endif
#ifdef ALTQ_FAIRQ
        case ALTQT_FAIRQ:
                error = fairq_getqstats(a, ubuf, nbytes);
                break;
#endif
#ifdef ALTQ_CODEL
	case ALTQT_CODEL:
		error = codel_getqstats(a, ubuf, nbytes);
		break;
#endif
	default:
		error = ENXIO;
	}
	return (error);
}
int altq_getqstats ( struct pf_altq * a , void * ubuf , int * nbytes ) { int error = 0 ; switch ( a -> scheduler ) { #ifdef ALTQ_CBQ case ALTQT_CBQ : error = cbq_getqstats ( a , ubuf , nbytes ) ; break ; #endif #ifdef ALTQ_PRIQ case ALTQT_PRIQ : error = priq_getqstats ( a , ubuf , nbytes ) ; break ; #endif #ifdef ALTQ_HFSC case ALTQT_HFSC : error = hfsc_getqstats ( a , ubuf , nbytes ) ; break ; #endif #ifdef ALTQ_FAIRQ case ALTQT_FAIRQ : error = fairq_getqstats ( a , ubuf , nbytes ) ; break ; #endif #ifdef ALTQ_CODEL case ALTQT_CODEL : error = codel_getqstats ( a , ubuf , nbytes ) ; break ; #endif default : error = ENXIO ; } return ( error ) ; }
get queue statistics
 Locking is done in the discipline specific functions with regards to
 copyout operations, also it is not yet clear which lock to use.
get queue statistics Locking is done in the discipline specific functions with regards to copyout operations also it is not yet clear which lock to use .