FreeBSD/sys/netpfil/ipfw/test/main.c
/* release a packet for a given flow_id.
 * Put the mbuf in the freelist, and in case move the
 * flow to the end of the bucket.
 */
release a packet for a given flow_id.
Put the mbuf in the freelist, and in case move the
flow to the end of the bucket.
release a packet for a given flow_id . Put the mbuf in the freelist and in case move the flow to the end of the bucket .
static int
drop(struct cfg_s *c, struct mbuf *m)
{
	struct dn_queue *q;
	int i;
	c->drop++;
	q = FI2Q(c, m->flow_id);
	i = q->ni.length; 
	ND("q %p id %d current length %d", q, m->flow_id, i);
	if (i < BACKLOG) {
		struct list_head *h = &q->ni.h;
		c->llmask &= ~(1<<(i+1));
		c->llmask |= (1<<(i));
		list_del(h);
		list_add_tail(h, &c->ll[i]);
	}
	m->m_nextpkt = c->freelist;
	c->freelist = m;
	return 0;
}
static int drop ( struct cfg_s * c , struct mbuf * m ) { struct dn_queue * q ; int i ; c -> drop ++ ; q = FI2Q ( c , m -> flow_id ) ; i = q -> ni . length ; ND ( " " , q , m -> flow_id , i ) ; if ( i < BACKLOG ) { struct list_head * h = & q -> ni . h ; c -> llmask &= ~ ( 1 << ( i + 1 ) ) ; c -> llmask |= ( 1 << ( i ) ) ; list_del ( h ) ; list_add_tail ( h , & c -> ll [ i ] ) ; } m -> m_nextpkt = c -> freelist ; c -> freelist = m ; return 0 ; }
release a packet for a given flow_id.
release a packet for a given flow_id .
// XXX or ffs...