FreeBSD/sbin/ipfw/dummynet.c
/*
 * Delete pipe, queue or scheduler i
 */
Delete pipe, queue or scheduler i
Delete pipe queue or scheduler i
int
ipfw_delete_pipe(int do_pipe, int i)
{
	struct {
		struct dn_id oid;
		uintptr_t a[1];	
	} cmd;
	oid_fill((void *)&cmd, sizeof(cmd), DN_CMD_DELETE, DN_API_VERSION);
	cmd.oid.subtype = (do_pipe == 1) ? DN_LINK :
		( (do_pipe == 2) ? DN_FS : DN_SCH);
	cmd.a[0] = i;
	i = do_cmd(IP_DUMMYNET3, &cmd, cmd.oid.len);
	if (i) {
		i = 1;
		warn("rule %u: setsockopt(IP_DUMMYNET_DEL)", i);
	}
	return i;
}
int ipfw_delete_pipe ( int do_pipe , int i ) { struct { struct dn_id oid ; uintptr_t a [ 1 ] ; } cmd ; oid_fill ( ( void * ) & cmd , sizeof ( cmd ) , DN_CMD_DELETE , DN_API_VERSION ) ; cmd . oid . subtype = ( do_pipe == 1 ) ? DN_LINK : ( ( do_pipe == 2 ) ? DN_FS : DN_SCH ) ; cmd . a [ 0 ] = i ; i = do_cmd ( IP_DUMMYNET3 , & cmd , cmd . oid . len ) ; if ( i ) { i = 1 ; warn ( " " , i ) ; } return i ; }
Delete pipe, queue or scheduler i
Delete pipe queue or scheduler i
/* add more if we want a list */