Re: pf_route pf_pdesc

2016-10-27 Thread Alexandr Nedvedicky
Hello, On Wed, Oct 26, 2016 at 11:48:34PM +0200, Alexander Bluhm wrote: > On Wed, Oct 19, 2016 at 11:49:56PM +0200, Alexander Bluhm wrote: > > I would like to pass a struct pf_pdesc to pf_route() like it is > > done in the other pf functions. That means less parameters, more > > consistency and

Re: pf_route pf_pdesc

2016-10-26 Thread Alexander Bluhm
On Wed, Oct 19, 2016 at 11:49:56PM +0200, Alexander Bluhm wrote: > I would like to pass a struct pf_pdesc to pf_route() like it is > done in the other pf functions. That means less parameters, more > consistency and later I can call functions that need an pd from > pf_route(). After splitting

Re: pf_route pf_pdesc

2016-10-22 Thread Alexandr Nedvedicky
Hello, > > Do we want to go this way? > > You got me thinking how else this might be done. > > Note that union pf_headers is used only to calculate the max size of the > header pull buffer. Its members are never referenced. > > So it may be enough to #define PF_MAXHDR_SIZE 28 in pfvar.h (==

Re: pf_route pf_pdesc

2016-10-22 Thread Alexander Bluhm
On Sat, Oct 22, 2016 at 11:11:59PM +1300, Richard Procter wrote: > So it may be enough to #define PF_MAXHDR_SIZE 28 in pfvar.h (== > sizeof(union pf_headers)), then verify it by a compile-time assert in > pf.c. I think this is better than what we have now and better than a additonal header

Re: pf_route pf_pdesc

2016-10-22 Thread Richard Procter
On Fri, 21 Oct 2016, Alexander Bluhm wrote: > We could put the union pf_headers into a separate header file. > Henning, I hope you don't mind that I used a current license.template > with your old pf_headers code. > > Do we want to go this way? You got me thinking how else this might be done.

Re: pf_route pf_pdesc

2016-10-21 Thread Alexander Bluhm
On Fri, Oct 21, 2016 at 08:07:21PM +1300, Richard Procter wrote: > On 21/10/2016, at 2:03 AM, Alexander Bluhm wrote: > > On Thu, Oct 20, 2016 at 10:53:17AM +0200, Claudio Jeker wrote: > >>> Unfortunately pf_route() is called from pfsync which has no idea > >>> of packet descriptors. As I do not

Re: pf_route pf_pdesc

2016-10-20 Thread Alexander Bluhm
On Thu, Oct 20, 2016 at 10:53:17AM +0200, Claudio Jeker wrote: > > Unfortunately pf_route() is called from pfsync which has no idea > > of packet descriptors. As I do not want to rewrite pfsync, I create > > a temporary pf_pdesc on the stack. > > I'm OK with the direction but am wondering if

Re: pf_route pf_pdesc

2016-10-20 Thread Claudio Jeker
On Wed, Oct 19, 2016 at 11:49:56PM +0200, Alexander Bluhm wrote: > Hi, > > I would like to pass a struct pf_pdesc to pf_route() like it is > done in the other pf functions. That means less parameters, more > consistency and later I can call functions that need an pd from > pf_route(). > >

Re: pf_route pf_pdesc

2016-10-20 Thread Alexandr Nedvedicky
Hello, On Wed, Oct 19, 2016 at 11:49:56PM +0200, Alexander Bluhm wrote: > Hi, > > I would like to pass a struct pf_pdesc to pf_route() like it is > done in the other pf functions. That means less parameters, more > consistency and later I can call functions that need an pd from > pf_route(). >

pf_route pf_pdesc

2016-10-19 Thread Alexander Bluhm
Hi, I would like to pass a struct pf_pdesc to pf_route() like it is done in the other pf functions. That means less parameters, more consistency and later I can call functions that need an pd from pf_route(). Unfortunately pf_route() is called from pfsync which has no idea of packet