FreeBSD/sys/net/altq/altq_subr.c
/*
 * attach a discipline to the interface.  if one already exists, it is
 * overridden.
 * Locking is done in the discipline specific attach functions. Basically
 * they call back to altq_attach which takes care of the attach and locking.
 */
attach a discipline to the interface.  if one already exists, it is
overridden.
Locking is done in the discipline specific attach functions. Basically
they call back to altq_attach which takes care of the attach and locking.
attach a discipline to the interface . if one already exists it is overridden . Locking is done in the discipline specific attach functions . Basically they call back to altq_attach which takes care of the attach and locking .
int
altq_pfattach(struct pf_altq *a)
{
	int error = 0;
	switch (a->scheduler) {
	case ALTQT_NONE:
		break;
#ifdef ALTQ_CBQ
	case ALTQT_CBQ:
		error = cbq_pfattach(a);
		break;
#endif
#ifdef ALTQ_PRIQ
	case ALTQT_PRIQ:
		error = priq_pfattach(a);
		break;
#endif
#ifdef ALTQ_HFSC
	case ALTQT_HFSC:
		error = hfsc_pfattach(a);
		break;
#endif
#ifdef ALTQ_FAIRQ
	case ALTQT_FAIRQ:
		error = fairq_pfattach(a);
		break;
#endif
#ifdef ALTQ_CODEL
	case ALTQT_CODEL:
		error = codel_pfattach(a);
		break;
#endif
	default:
		error = ENXIO;
	}
	return (error);
}
int altq_pfattach ( struct pf_altq * a ) { int error = 0 ; switch ( a -> scheduler ) { case ALTQT_NONE : break ; #ifdef ALTQ_CBQ case ALTQT_CBQ : error = cbq_pfattach ( a ) ; break ; #endif #ifdef ALTQ_PRIQ case ALTQT_PRIQ : error = priq_pfattach ( a ) ; break ; #endif #ifdef ALTQ_HFSC case ALTQT_HFSC : error = hfsc_pfattach ( a ) ; break ; #endif #ifdef ALTQ_FAIRQ case ALTQT_FAIRQ : error = fairq_pfattach ( a ) ; break ; #endif #ifdef ALTQ_CODEL case ALTQT_CODEL : error = codel_pfattach ( a ) ; break ; #endif default : error = ENXIO ; } return ( error ) ; }
attach a discipline to the interface.
attach a discipline to the interface .