Re: [netsniff-ng] mausezahn: TX fast path ... or may be rewrite everything ?

2015-06-19 Thread Daniel Borkmann
On 06/20/2015 12:25 AM, Vadim Kochan wrote: ... Ok, how would all of this tie together with flex and bison that we use for trafgen as parser generator? It looks on a first glance that this design would be outside of that scope? . You mean that this is out of scope of this thread which was relat

Re: [netsniff-ng] [PATCH 0/2 v2] Add suport for Linux "cooked" header sniff & dissect

2015-06-19 Thread Daniel Borkmann
On 06/20/2015 12:38 AM, Vadim Kochan wrote: ... Regarding cleanups ... what do you think about change pcap_pkthdr_t to: typedef struct { union { struct pcap_pkthdr ppo; struct pcap_pkthdr_ns ppn; struct pcap_pkthdr_ll

Re: [netsniff-ng] [PATCH 0/2 v2] Add suport for Linux "cooked" header sniff & dissect

2015-06-19 Thread Vadim Kochan
On Sat, Jun 20, 2015 at 12:27:41AM +0200, Daniel Borkmann wrote: > On 06/20/2015 12:16 AM, Vadim Kochan wrote: > >On Sat, Jun 20, 2015 at 01:12:06AM +0300, Vadim Kochan wrote: > >>On Fri, Jun 19, 2015 at 11:59:32PM +0200, Daniel Borkmann wrote: > >>>On 06/19/2015 11:37 PM, Vadim Kochan wrote: > ...

Re: [netsniff-ng] [PATCH 0/2 v2] Add suport for Linux "cooked" header sniff & dissect

2015-06-19 Thread Daniel Borkmann
On 06/20/2015 12:16 AM, Vadim Kochan wrote: On Sat, Jun 20, 2015 at 01:12:06AM +0300, Vadim Kochan wrote: On Fri, Jun 19, 2015 at 11:59:32PM +0200, Daniel Borkmann wrote: On 06/19/2015 11:37 PM, Vadim Kochan wrote: ... by adding "|| linktype == LINKTYPE_LINUX_SLL)" I got dissected Netlink mes

Re: [netsniff-ng] mausezahn: TX fast path ... or may be rewrite everything ?

2015-06-19 Thread Vadim Kochan
On Fri, Jun 19, 2015 at 11:16:54PM +0200, Daniel Borkmann wrote: > On 06/19/2015 10:46 AM, Vadim Kochan wrote: > ... > >OK here is another (may be better) design. > > > >Here is an example of the cfg script: > > > >{ > > eth > > { > > dst: eth_addr(AA:BB:CC:DD:EE:FF) > > pro

Re: [netsniff-ng] [PATCH 0/2 v2] Add suport for Linux "cooked" header sniff & dissect

2015-06-19 Thread Vadim Kochan
On Sat, Jun 20, 2015 at 01:12:06AM +0300, Vadim Kochan wrote: > On Fri, Jun 19, 2015 at 11:59:32PM +0200, Daniel Borkmann wrote: > > On 06/19/2015 11:37 PM, Vadim Kochan wrote: > > ... > > >Never applied patches from emails, I tried to do in mutt by saving as > > >attachments or mbox, I even cut ti

Re: [netsniff-ng] [PATCH 0/2 v2] Add suport for Linux "cooked" header sniff & dissect

2015-06-19 Thread Vadim Kochan
On Fri, Jun 19, 2015 at 11:59:32PM +0200, Daniel Borkmann wrote: > On 06/19/2015 11:37 PM, Vadim Kochan wrote: > ... > >Never applied patches from emails, I tried to do in mutt by saving as > >attachments or mbox, I even cut till 'diff' line but with no luck to > >apply this. May be you can suggest

Re: [netsniff-ng] [PATCH 0/2 v2] Add suport for Linux "cooked" header sniff & dissect

2015-06-19 Thread Daniel Borkmann
On 06/19/2015 11:48 PM, Vadim Kochan wrote: On Fri, Jun 19, 2015 at 11:13:54PM +0200, Daniel Borkmann wrote: On 06/19/2015 10:58 PM, Vadim Kochan wrote: On Fri, Jun 19, 2015 at 10:47:49PM +0200, Daniel Borkmann wrote: ... @@ -737,6 +837,24 @@ static inline void pcap_validate_header(const stru

Re: [netsniff-ng] [PATCH 0/2 v2] Add suport for Linux "cooked" header sniff & dissect

2015-06-19 Thread Daniel Borkmann
On 06/19/2015 11:37 PM, Vadim Kochan wrote: ... Never applied patches from emails, I tried to do in mutt by saving as attachments or mbox, I even cut till 'diff' line but with no luck to apply this. May be you can suggest some work flow with mutt for patches via email ? Ok, so here's both as an

Re: [netsniff-ng] [PATCH 0/2 v2] Add suport for Linux "cooked" header sniff & dissect

2015-06-19 Thread Vadim Kochan
On Fri, Jun 19, 2015 at 11:13:54PM +0200, Daniel Borkmann wrote: > On 06/19/2015 10:58 PM, Vadim Kochan wrote: > >On Fri, Jun 19, 2015 at 10:47:49PM +0200, Daniel Borkmann wrote: > ... > >>@@ -737,6 +837,24 @@ static inline void pcap_validate_header(const struct > >>pcap_filehdr *hdr) > >>if (

Re: [netsniff-ng] [PATCH 0/2 v2] Add suport for Linux "cooked" header sniff & dissect

2015-06-19 Thread Vadim Kochan
On Fri, Jun 19, 2015 at 10:47:49PM +0200, Daniel Borkmann wrote: > On 06/18/2015 11:49 AM, Daniel Borkmann wrote: > >On 06/18/2015 11:42 AM, Vadim Kochan wrote: > >>On Thu, Jun 18, 2015 at 10:45:29AM +0200, Daniel Borkmann wrote: > >>>I've started splitting this into smaller digestible chunks, > >>

Re: [netsniff-ng] mausezahn: TX fast path ... or may be rewrite everything ?

2015-06-19 Thread Daniel Borkmann
On 06/19/2015 10:46 AM, Vadim Kochan wrote: ... OK here is another (may be better) design. Here is an example of the cfg script: { eth { dst: eth_addr(AA:BB:CC:DD:EE:FF) proto: ipv4, } ip { src: ip_addr(192.168.1.1) dst: ip_addr(192.1

Re: [netsniff-ng] [PATCH 0/2 v2] Add suport for Linux "cooked" header sniff & dissect

2015-06-19 Thread Daniel Borkmann
On 06/19/2015 10:58 PM, Vadim Kochan wrote: On Fri, Jun 19, 2015 at 10:47:49PM +0200, Daniel Borkmann wrote: ... @@ -737,6 +837,24 @@ static inline void pcap_validate_header(const struct pcap_filehdr *hdr) if (unlikely(hdr->version_minor != PCAP_VERSION_MINOR) && _

Re: [netsniff-ng] [PATCH 0/2 v2] Add suport for Linux "cooked" header sniff & dissect

2015-06-19 Thread Vadim Kochan
On Fri, Jun 19, 2015 at 10:47:49PM +0200, Daniel Borkmann wrote: > On 06/18/2015 11:49 AM, Daniel Borkmann wrote: > >On 06/18/2015 11:42 AM, Vadim Kochan wrote: > >>On Thu, Jun 18, 2015 at 10:45:29AM +0200, Daniel Borkmann wrote: > >>>I've started splitting this into smaller digestible chunks, > >>

Re: [netsniff-ng] [PATCH 0/2 v2] Add suport for Linux "cooked" header sniff & dissect

2015-06-19 Thread Daniel Borkmann
On 06/18/2015 11:49 AM, Daniel Borkmann wrote: On 06/18/2015 11:42 AM, Vadim Kochan wrote: On Thu, Jun 18, 2015 at 10:45:29AM +0200, Daniel Borkmann wrote: I've started splitting this into smaller digestible chunks, couple of more evenings and it should be done from my side. Thanks for your pat

Re: [netsniff-ng] mausezahn: TX fast path ... or may be rewrite everything ?

2015-06-19 Thread Vadim Kochan
On Fri, Jun 19, 2015 at 12:08:57AM +0200, Daniel Borkmann wrote: > On 06/18/2015 03:24 PM, Vadim Kochan wrote: > >On Thu, Jun 18, 2015 at 11:07:12AM +0200, Daniel Borkmann wrote: > >>On 06/18/2015 10:57 AM, Vadim Kochan wrote: > >>... > >>>Not yet, but I will try keep thinking about this, and will