* nfqueue buf size for recv() @ 2017-04-19 16:50 Oleg 2017-04-19 21:45 ` Florian Westphal 0 siblings, 1 reply; 3+ messages in thread From: Oleg @ 2017-04-19 16:50 UTC (permalink / raw) To: netfilter-devel Hi, all. Can anybody tell me how can i determine a right buf size for recv() in libnetfilter_queue program. http://www.netfilter.org/projects/libnetfilter_queue/doxygen/group__Queue.html#gae36aee5b74d0c88d2f8530e356f68b79 tells nothing about this. P.S. sorry, for noob question. P.P.S. sorry, if i chosen a wrong list for my question. -- Олег Неманов (Oleg Nemanov) ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: nfqueue buf size for recv() 2017-04-19 16:50 nfqueue buf size for recv() Oleg @ 2017-04-19 21:45 ` Florian Westphal 2017-04-20 8:45 ` Oleg 0 siblings, 1 reply; 3+ messages in thread From: Florian Westphal @ 2017-04-19 21:45 UTC (permalink / raw) To: Oleg; +Cc: netfilter-devel Oleg <lego12239@yandex.ru> wrote: > Can anybody tell me how can i determine a right buf size for recv() > in libnetfilter_queue program. > > http://www.netfilter.org/projects/libnetfilter_queue/doxygen/group__Queue.html#gae36aee5b74d0c88d2f8530e356f68b79 > > tells nothing about this. I'd suggest a 80k buffer to be on safe side. You need to be able to hold the size of one packet, which could be up to 64k depending on options/mtu) plus all the extra netlink meta data. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: nfqueue buf size for recv() 2017-04-19 21:45 ` Florian Westphal @ 2017-04-20 8:45 ` Oleg 0 siblings, 0 replies; 3+ messages in thread From: Oleg @ 2017-04-20 8:45 UTC (permalink / raw) To: Florian Westphal; +Cc: netfilter-devel On Wed, Apr 19, 2017 at 11:45:21PM +0200, Florian Westphal wrote: > Oleg <lego12239@yandex.ru> wrote: > > Can anybody tell me how can i determine a right buf size for recv() > > in libnetfilter_queue program. > > > > http://www.netfilter.org/projects/libnetfilter_queue/doxygen/group__Queue.html#gae36aee5b74d0c88d2f8530e356f68b79 > > > > tells nothing about this. > > I'd suggest a 80k buffer to be on safe side. My computations give my 70k buffer, but 80k is also suitable. Thanks. -- Олег Неманов (Oleg Nemanov) ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-20 8:52 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-04-19 16:50 nfqueue buf size for recv() Oleg 2017-04-19 21:45 ` Florian Westphal 2017-04-20 8:45 ` Oleg
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).