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

int nfq_set_queue_maxlen ( struct nfq_q_handle *  qh,
u_int32_t  queuelen 

nfq_set_queue_maxlen - Set kernel queue maximum length parameter

qh Netfilter queue handle obtained by call to nfq_create_queue().
queuelen the length of the queue
Sets the size of the queue in kernel. This fixes the maximum number of packets the kernel will store before internally before dropping upcoming packets.

Definition at line 571 of file libnetfilter_queue.c.

      union {
            char buf[NFNL_HEADER_LEN
                  +NFA_LENGTH(sizeof(struct nfqnl_msg_config_params))];
            struct nlmsghdr nmh;
      } u;
      u_int32_t queue_maxlen = htonl(queuelen);

      nfnl_fill_hdr(qh->h->nfnlssh, &u.nmh, 0, AF_UNSPEC, qh->id,

      nfnl_addattr_l(&u.nmh, sizeof(u), NFQA_CFG_QUEUE_MAXLEN, &queue_maxlen,

      return nfnl_query(qh->h->nfnlh, &u.nmh);

Generated by  Doxygen 1.6.0   Back to index