Logo Search packages:      
Sourcecode: libnetfilter-queue version File versions  Download package

int nfq_set_verdict ( struct nfq_q_handle qh,
u_int32_t  id,
u_int32_t  verdict,
u_int32_t  data_len,
const unsigned char *  buf 
)

nfq_set_verdict - issue a verdict on a packet

Parameters:
qhNetfilter queue handle obtained by call to nfq_create_queue().
idID assigned to packet by netfilter.
verdictverdict to return to netfilter (NF_ACCEPT, NF_DROP)
data_lennumber of bytes of data pointed to by buf
bufthe buffer that contains the packet data

Can be obtained by:

	int id;
	struct nfqnl_msg_packet_hdr *ph = nfq_get_msg_packet_hdr(tb);
	if (ph)
 		id = ntohl(ph->packet_id);

Notifies netfilter of the userspace verdict for the given packet. Every queued packet _must_ have a verdict specified by userspace, either by calling this function, or by calling the nfq_set_verdict2() function.

Returns:
-1 on error; >= 0 otherwise.

Definition at line 690 of file libnetfilter_queue.c.

{
      return __set_verdict(qh, id, verdict, 0, 0, data_len, buf);
}     

Generated by  Doxygen 1.6.0   Back to index