Re: Patch to add netfilter mark support

From: Andrew Beverley <andy_at_andybev.com>
Date: Fri, 17 Sep 2010 20:52:09 +0100

On Thu, 2010-09-16 at 16:23 -0600, Alex Rousskov wrote:
> On 09/15/2010 12:12 AM, Andrew Beverley wrote:
> > On Wed, 2010-09-15 at 02:06 +0000, Amos Jeffries wrote:
> >> On Tue, 14 Sep 2010 23:55:20 +0100, Andrew Beverley<andy_at_andybev.com>
> >> wrote:
> >>>> * Config.accessList.outgoingTos, Config.accessList.clientsideTos,
> >>>> Config.accessList.outgoingNfmark, Config.accessList.clientsideNfmark
> >> can
> >>>> become members of the Qos scope Config object. All the parsing /free
> >>>> stuff
> >>>> can be moved there too with some #define parse_...() etc for the legacy
> >>>> parser.
> >>>>
> >>>
> >>> I've moved all the configuration variables and functions to the Qos
> >>> scope. I have renamed parse_acl_tos(acl_tos ** head) as
> >>> Ip::Qos::Config::parseConfigAclTos(acl_tos ** head).
> >>>
> >>> However, I'm unable to compile because of the following error:
> >>>
> >>> Qos.cc: In member function ‘void
> >>> Ip::Qos::Config::parseConfigAclTos(acl_tos**)’:
> >>> Qos.cc:377: error: argument of type ‘void (Ip::Qos::Config::)(void*)’
> >> does
> >>> not match ‘void (*)(void*)’
> >>>
> >>> The code at line 377 is:
> >>>
> >>> CBDATA_INIT_TYPE_FREECB(acl_tos, freedConfigAclTos);
> >>>
> >>> I have
> >>>
> >>> CBDATA_TYPE(acl_tos);
> >>>
> >>> specified before the parseConfigAclTos function.
> >>>
> >>> Could you give me any ideas as to what I am doing wrong here? If you
> >>> need me to send through any more of the code then please let me know.
> >>
> >> Do you have this with a cast?
> >> #define parse_acl_tos(X) Ip::Qos::Config::parseConfigAclTos((acl_tos
> >> **)X)
> >>
> >> with the cf.data.pre "TYPE: acl_tos" unchanged.
> >
> > No, I had changed it. However, I have now changed it back to the above,
> > but still get the same error. Any other ideas?
> >
> > Qos.cc: In member function ‘void Ip::Qos::Config::parseConfigAclTos(acl_tos**)’:
> > Qos.cc:377: error: argument of type ‘void (Ip::Qos::Config::)(void*)’ does not match ‘void (*)(void*)’
> >
> > I have attached my current Qos.cc and Qos.h
>
> I kind of lost track of the current state. Do you still want help with
> making this work? Or did you give up and are now back to the old C-style
> craft outside of the proper namespace?

I gave up and moved the config functions (for outgoing_tos etc) back to
cache_cf.cc. The original QOS config parsing is still in Qos.cc. I
thought from what Amos said that it couldn't be made to work with
CBDATA, but if you have any suggestions then I'll happily look at them.

I'll hopefully send the patch in its current format through later on
today anyway, so you can see its current state.

Thanks,

Andy
Received on Fri Sep 17 2010 - 19:52:26 MDT

This archive was generated by hypermail 2.2.0 : Sat Sep 18 2010 - 12:00:06 MDT