On Mon, Nov 16, 2015 at 02:13:04PM +0100, Daniel Borkmann wrote:
> On 11/16/2015 02:00 PM, vkochan wrote:
> >Hi,
> >
> >Before start coding I'd like to know what do you think about such bpfc
> >feature like - passing <var1>=<value1>...<varN>=<valueN> to bpfc which will
> >be converted to cpp as -Dvar1=value1..-DvarN=valueN, and in bpf filter
> >it allows to do #ifdef for specific define and generate bpf opcodes
> >considering this defined value (e.g. - port/protocol number).
> >
> >What do you think ?
> 
> Sounds good to me, I think such a feature might even be more interesting
> for trafgen, there was once a request on this in the past:
> 
>   https://www.mail-archive.com/netsniff-ng%40googlegroups.com/msg00789.html
> 
> I think we could use cpp to do textual replacement to pass in shell vars.
> Part of that should already be possible due to your cmdline feature, but
> for complex patterns that would be too long (thus cfg file preferred), it
> might be interesting as well.
> 
> Thanks!

Of course it will be tricky to specify IPv6 address for example, so it
will be needed to split it to at least 4 32bit variables... but for
single 8/16/32bit variables it should be useful.

I think it will be needed new command line option for trafgen & bpfc
(and better with the same name) which will enable invoke_cpp.

Regards,

-- 
You received this message because you are subscribed to the Google Groups 
"netsniff-ng" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to