[netsniff-ng] Re: about trafgen configuration file dinc question

2019-07-24 Thread Vadim Kochan
can Liu > > > Looks like it needs to be implemented. Regards, Vadim Kochan -- 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 netsniff-ng+unsubscr...@google

Re: [netsniff-ng] Trafgen & mz

2018-04-13 Thread Vadim Kochan
https://groups.google.com/d/optout. > Hi Jack! Thank you for suggestions and report! Regarding trafgen -b option you mean that is would be better if the packets delay was better normalized regarding the rate ? Regards, Vadim Kochan -- You received this message because you are subscribed to the Goog

[netsniff-ng] Re: [PATCH] flowtop: Fix use-after-free on filter reload

2017-12-29 Thread Vadim Kochan
On Tue, Dec 19, 2017 at 12:30 PM, Tobias Klauser <tklau...@distanz.ch> wrote: > On 2017-12-19 at 11:24:40 +0100, Vadim Kochan <vadi...@gmail.com> wrote: > > May it possible that you tried flowtop compiled without the fix ? > > No, I made sure to have the patch applie

[netsniff-ng] Re: [PATCH] flowtop: Fix use-after-free on filter reload

2017-12-19 Thread Vadim Kochan
May it possible that you tried flowtop compiled without the fix ? On Tue, Dec 19, 2017 at 12:18 PM, Vadim Kochan <vadi...@gmail.com> wrote: > Thats really strange, because before this patch I really easy triggered > the issue, but > now I cant. > > On Tue, Dec 19, 201

[netsniff-ng] Re: [PATCH] flowtop: Fix use-after-free on filter reload

2017-12-19 Thread Vadim Kochan
Thats really strange, because before this patch I really easy triggered the issue, but now I cant. On Tue, Dec 19, 2017 at 11:12 AM, Tobias Klauser <tklau...@distanz.ch> wrote: > On 2017-12-18 at 23:38:18 +0100, Vadim Kochan <vadi...@gmail.com> wrote: > > There is missin

[netsniff-ng] [PATCH] flowtop: Fix use-after-free on filter reload

2017-12-18 Thread Vadim Kochan
-by: Vadim Kochan <vadi...@gmail.com> --- flowtop.c | 30 -- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/flowtop.c b/flowtop.c index 8b69d65..7de4d11 100644 --- a/flowtop.c +++ b/flowtop.c @@ -470,20 +470,24 @@ static struct flow_entry *flow_list_f

Re: [netsniff-ng] Re: Trafgen: Warning: Out of Memory

2017-12-18 Thread Vadim Kochan
Hi Chandra, Sorry for the late response ! Would you please provide commands which did you use ? Thanks! On Tue, Dec 5, 2017 at 1:26 PM, wrote: > while running trafgen commands , i am getting segmentation fault (cpre > dump). > > can someone please guide me to

[netsniff-ng] [PATCH] flowtop: Use RCU flow deletion from process entry

2017-12-17 Thread Vadim Kochan
Use cds_list_del_rcu for safer deletion flow from the process flow list to prevent possible use-after-free by UI thread when it is refreshing the processes. It may fix the #183 issue. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- flowtop.c | 2 +- 1 file changed, 1 insertion

Re: [netsniff-ng] Re: [ANNOUNCE] Preparing for netsniff-ng release v0.6.4

2017-12-14 Thread Vadim Kochan
ts possible. Regards, Vadim Kochan On Thu, Dec 14, 2017 at 2:47 PM, Tobias Klauser <tklau...@distanz.ch> wrote: > On 2017-12-11 at 09:08:15 +0100, Tobias Klauser <tklau...@distanz.ch> > wrote: > > On 2017-12-08 at 18:30:24 +0100, Vadim Kochan <vadi...@gmail.com> wrote:

Re: [netsniff-ng] Re: [ANNOUNCE] Preparing for netsniff-ng release v0.6.4

2017-12-08 Thread Vadim Kochan
Hi All, I just noticed there some bug reports, I will look on them on weekend, I assume it is better to wait with release unless isues will be fixed ? Regards, Vadim On Fri, Dec 8, 2017 at 6:57 PM, @mandarg wrote: > On Friday, October 20, 2017 at 9:29:28 AM UTC-4, Tobias

Re: [netsniff-ng] Re: Cannot get /GeoIP.dat.gz from mirrors!

2017-11-22 Thread Vadim Kochan
Hi Lupe, Which version do you use ? Regards, Vadim Kochan On Wed, Nov 22, 2017 at 8:43 PM, Lupe Villalpando < lupe.villalpa...@yardi.com> wrote: > this is the command i am running > > astraceroute -i eth0 -N -S -H netsniff-ng.org > > > -- &g

[netsniff-ng] Re: [PATCH] trafgen: fix packet socket initialization with multiple CPUs

2017-09-14 Thread Vadim Kochan
Thanks Paolo! Shame on me, I did not test it properly :( On Wed, Sep 13, 2017 at 6:54 PM, Paolo Abeni wrote: > The commit 78c13b71e196 ("trafgen: Allow to generate packets > to output pcap file") introduced a regression when output is > a network device and multiple CPU are

[netsniff-ng] [PATCH v2 0/3] trafgen: Add dump of proto headers into *.cfg format

2017-07-29 Thread Vadim Kochan
ated packet. Before dump the default ETH_PROTO fields are applied as first header and then next proto_hdr is identified via .get_next_proto(...) callback. Meanwhile only eth, arp, vlan, ip4, udp, & tcp protos can be dissected into *.cfg format. v2: 1) Missed local patch Vadim Kochan (3):

[netsniff-ng] [PATCH v2 2/3] trafgen: dev_io: Change read/write to specify struct packet *

2017-07-29 Thread Vadim Kochan
Refactor dev_io_ops read & write to specify struct packet *, it may simplify a bit a caller logic. And it allow to keep required members within one struct packet object. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen.c| 25 - trafgen_con

[netsniff-ng] [PATCH v2 3/3] trafgen: Dump proto headers in *.cfg format

2017-07-29 Thread Vadim Kochan
-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen.8| 4 +- trafgen.c| 54 ++-- trafgen/Makefile | 1 + trafgen_conf.h | 2 + trafgen_dev.c| 36 +++- trafgen_dev.h| 4 +- trafgen_dump

[netsniff-ng] [PATCH 0/3] trafgen: Add dump of proto headers into *.cfg format

2017-07-29 Thread Vadim Kochan
ated packet. Before dump the default ETH_PROTO fields are applied as first header and then next proto_hdr is identified via .get_next_proto(...) callback. Meanwhile only eth, arp, vlan, ip4, udp, & tcp protos can be dissected into *.cfg format. Vadim Kochan (3): trafgen: Get packet from p

[netsniff-ng] [PATCH 3/3] trafgen: Dump proto headers in *.cfg format

2017-07-29 Thread Vadim Kochan
-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen.8| 4 +- trafgen.c| 54 ++-- trafgen/Makefile | 1 + trafgen_conf.h | 2 + trafgen_dev.c| 36 +++- trafgen_dev.h| 4 +- trafgen_dump

[netsniff-ng] [PATCH 1/3] trafgen: Get packet from proto_hdr if possible

2017-07-29 Thread Vadim Kochan
allocated packet. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen_l3.c| 4 ++-- trafgen_l4.c| 4 ++-- trafgen_proto.c | 10 -- trafgen_proto.h | 3 +++ 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/trafgen_l3.c b/trafgen_l3.c index 7199b89..48790e5

[netsniff-ng] [PATCH 2/3] trafgen: dev_io: Change read/write to specify struct packet *

2017-07-29 Thread Vadim Kochan
Refactor dev_io_ops read & write to specify struct packet *, it may simplify a bit a caller logic. And it allow to keep required members within one struct packet object. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen.c| 25 - trafgen_con

Re: [netsniff-ng] Segmentation fault of mausezahn

2017-07-24 Thread Vadim Kochan
Hi Zhouyang Jia, Your fix looks reasonable. Would you please send patch in git-format (you can look at SubmittingPatches file), or send a pull request ? Thanks, Vadim Kochan On Mon, Jul 24, 2017 at 5:08 PM, Zhouyang Jia <jiazhouyan...@gmail.com> wrote: > Hi, > > I'm new to ne

[netsniff-ng] [PATCH v2] trafgen: Delegate creation of rfraw to dev_io API

2017-07-17 Thread Vadim Kochan
Simplify a bit of creation rfraw device by delegating it to the dev_io API, also in case the output device is pcap file the --rfraw option sets the link type to ieee80211 radio tap. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen.8 | 3 ++- trafgen.c

[netsniff-ng] [PATCH] trafgen: Delegate creation of rfraw to dev_io API

2017-06-12 Thread Vadim Kochan
Simplify a bit of creation rfraw device by delegating it to the dev_io API, also in case the output device is pcap file the --rfraw option sets the link type to ieee80211 radio tap. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen.8 | 3 ++- trafgen.c

[netsniff-ng] [PATCH v2] trafgen: Fix output pcap file name length trimming

2017-06-12 Thread Vadim Kochan
Trim output name to IFNAMSIZ only if the output is a networking device, otherwise the following error occured if output name is greater then IFNAMSIZ: ~/src/netsniff-ng$ trafgen -n 1 '{ udp() }' -o /tmp/xx.pcap No networking device or pcap file: /tmp/xx

[netsniff-ng] Re: [PATCH] trafgen: Fix output pcap file name length trimming

2017-06-12 Thread Vadim Kochan
On Mon, Jun 12, 2017 at 11:38 PM, Vadim Kochan <vadi...@gmail.com> wrote: > Trim output name to IFNAMSIZ only if the output is a networking device, > otherwise the following error occured if output name is greater then > IFNAMSIZ: > > ~/src/netsniff-ng$ trafgen -n 1

[netsniff-ng] [PATCH] trafgen: Fix output pcap file name length trimming

2017-06-12 Thread Vadim Kochan
Trim output name to IFNAMSIZ only if the output is a networking device, otherwise the following error occured if output name is greater then IFNAMSIZ: ~/src/netsniff-ng$ trafgen -n 1 '{ udp() }' -o /tmp/xx.pcap No networking device or pcap file: /tmp/xx

[netsniff-ng] [PATCH v2] trafgen: Allow to generate packets to output pcap file

2017-06-07 Thread Vadim Kochan
packets) w/o having some special setup. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- v2: 1) Fixed "Failed ..." -> "Failed to ..." error messages 2) Fixed indentation in dev_io struct at pcap_magic field 3) Removed not needed dev_net_close f

[netsniff-ng] [PATCH] trafgen: Allow to generate packets to output pcap file

2017-06-06 Thread Vadim Kochan
packets) w/o having some special setup. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen.8| 5 +- trafgen.c| 102 + trafgen/Makefile | 1 + trafgen_dev.c| 263 +++ trafgen_dev.h

[netsniff-ng] [PATCH] flowtop: Move out stats fields from flow & proc entry

2017-06-01 Thread Vadim Kochan
Move rate, bytes & pkts stats fields from flow & proc entry to separate flow_stat struct. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- flowtop.c | 82 +++ 1 file changed, 41 insertions(+), 41 deletions(-) diff --g

[netsniff-ng] [PATCH 3/4] trafgen: l7: Add DNS header generation API

2017-06-01 Thread Vadim Kochan
y 2 proto_hdr's which describes 4 DNS sections - query & rrecord, because rrecord covers another 3 - answer, auhority, additional which have the same layout. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen/Makefile | 1 + trafgen_l4.c | 32 +++ trafgen_l

[netsniff-ng] [PATCH 0/4] Add DNS proto header support

2017-06-01 Thread Vadim Kochan
om", addr(1::))) } RFC -> PATCH: 1) Removed empty lines after 'break' in switch blocks 2) Use xmemdupz instead malloc + memcpy 3) Squash commit with 'len' parameter 4) Do not change 'index' field in proto_hdr struct to 'int. Vadim Kochan (4): trafgen: proto: Allow to set fi

[netsniff-ng] [PATCH 4/4] trafgen: parser: Add syntax to generate DNS header

2017-06-01 Thread Vadim Kochan
auth(name="ns1", ns("ns1.org")), ans(name="www.google.com", cname("google.com")), auth(name="aa", ns("bb")), qry(name="www.google.com")) } { dns(qr=1, ans(name="www.google.com", addr(1.

[netsniff-ng] [PATCH 1/4] trafgen: proto: Allow to set field with variable length

2017-06-01 Thread Vadim Kochan
bytes and after the field needs to be relocated to the right place. Also add 'len' parameter to *_set_bytes(...) functoins to have better control over it. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen_l2.c | 6 ++-- trafgen_parser.y | 4 +-- trafgen_proto.c

[netsniff-ng] [PATCH 2/4] str: Add function for converting string into DNS name

2017-06-01 Thread Vadim Kochan
Add str2fqdn for converting hostname string into DNS name notation: www..yy.com -> 3www42yy3com0 Returned string must be freed after use by the caller. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- str.c | 37 + str.h | 1 +

[netsniff-ng] [PATCH] flowtop: Improve and unify up/down scrolling

2017-05-27 Thread Vadim Kochan
, not it is handled by ui part. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- flowtop.c | 166 -- ui.c | 70 +- ui.h | 13 + 3 files changed, 157 insertions(+), 92 deletions(-) diff --git a/flo

Re: [netsniff-ng] read 802.1q tags fine, fails to write 802.1q tags to save file

2017-05-19 Thread Vadim Kochan
e, Looks like you are talking when vlan is offloaded ? So netsniff-ng takes this info from kernel control message, and I did not put it into pcap because I decided to keep original packet in pcap file. But may be this is time to change this ? Looks like it is expectable to see the VLAN within pcap e

[netsniff-ng] [PATCH] trafgen: parser: Use proto_field_set_xxx where it is possible

2017-05-13 Thread Vadim Kochan
Use proto_field_set_xxx(field, ...) instead of proto_hdr_field_set_xxx(hdr, fid, ...) to be more generic and do not depent on 'hdr' variable. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen_parser.y | 13 ++--- trafgen_proto.c | 5 + trafgen_proto.h | 1 + 3

[netsniff-ng] Re: [RFC 6/7] trafgen: l7: Add DNS header generation API

2017-03-14 Thread Vadim Kochan
On Tue, Mar 14, 2017 at 12:21 PM, Tobias Klauser <tklau...@distanz.ch> wrote: > On 2017-01-30 at 09:33:29 +0100, Vadim Kochan <vadi...@gmail.com> wrote: >> Add trafgen_l7.c module with DNS proto header generation with >> support of filling DNS query/answer/authority/ad

[netsniff-ng] Re: [RFC 0/7] Add DNS proto header support

2017-02-21 Thread Vadim Kochan
On Mon, Jan 30, 2017 at 10:33 AM, Vadim Kochan <vadi...@gmail.com> wrote: > Add trafgen_l7.c module with DNS proto header generation with > support of filling DNS query/answer/authority/additional sections > as sub headers. > > Introcuded new concept as 'sub header' which is

[netsniff-ng] Re: [RFC 4/7] trafgen: parser: Use proto_field_set_xxx where it is possible

2017-02-13 Thread Vadim Kochan
On Mon, Feb 13, 2017 at 11:18 AM, Tobias Klauser <tklau...@distanz.ch> wrote: > On 2017-01-30 at 09:33:27 +0100, Vadim Kochan <vadi...@gmail.com> wrote: >> Use proto_field_set_xxx(field, ...) instead of >> proto_hdr_field_set_xxx(hdr, fid, ...) to be more generic a

[netsniff-ng] Re: [RFC 2/7] trafgen: proto: Add 'len' parameter to *_set_bytes(...) functions

2017-02-09 Thread Vadim Kochan
On Thu, Feb 9, 2017 at 1:02 PM, Tobias Klauser <tklau...@distanz.ch> wrote: > On 2017-01-30 at 09:33:25 +0100, Vadim Kochan <vadi...@gmail.com> wrote: >> Add 'len' parameter to *_set_bytes(...) functoins to have better >> control over it. > > While this is certai

[netsniff-ng] [PATCH v2 1/3] pcap_io: Add function to get packet timestamp

2017-02-07 Thread Vadim Kochan
Add pcap_get_tstamp(...) function to get packet's timestamp considering different packet types & bytes order. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- pcap_io.h | 53 + 1 file changed, 53 insertions(+) diff --git a/p

[netsniff-ng] [PATCH v2 3/3] trafgen: man: Add description with pcap file for -i, --in option

2017-02-07 Thread Vadim Kochan
Update -i, --in option with pcap file as input parameter. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen.8 | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/trafgen.8 b/trafgen.8 index e09b7a0..fd9788a 100644 --- a/trafgen.8 +++ b/trafgen.8 @@ -66,10

[netsniff-ng] [PATCH v2 0/3] trafgen: Send packets from pcap file

2017-02-07 Thread Vadim Kochan
input pcap file was specified. 3) Replace strcmp("0", ...) to 'if (!rate)' BTW, shaper still works at usec minimum time precision so I did not convert it to nsec yet, but I plan to do it in future patches if it is OK. Vadim Kochan (3): pcap_io: Add function to get packet timest

[netsniff-ng] [PATCH v2 2/3] trafgen: Allow send packets from pcap file

2017-02-07 Thread Vadim Kochan
Add ability to send packets from pcap file if it has ".pcap" extension via "-i,--in" option. By default packet sending is delayed considering original packets timestamps if no rate or delay is specified via -b/-t options. Signed-off-by: Vadim Kochan <vadi...@gm

[netsniff-ng] [PATCH v2] trafgen: l3: Make possible to send frames via tun device

2017-02-06 Thread Vadim Kochan
tun interface does not have Ethernet header so lets push Ethernet header only if device supports this. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen_l3.c| 15 --- trafgen_proto.c | 5 + trafgen_proto.h | 2 ++ 3 files changed, 19 insertions(+), 3 del

[netsniff-ng] [PATCH] geoip: Fix memory leak when using GeoIPRecord

2017-02-04 Thread Vadim Kochan
eded to also free obtained city/region in netsniff-ng, astraceroute & flowtop tools. Fixes: #169 Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- astraceroute.c | 10 - flowtop.c | 4 +- geoip.c| 114 + geoip.

[netsniff-ng] Re: [PATCH] trafgen: l3: Make possible to send frames via tun device

2017-02-01 Thread Vadim Kochan
On Thu, Feb 2, 2017 at 6:37 AM, Vadim Kochan <vadi...@gmail.com> wrote: > tun interface does not have Ethernet header so lets push Ethernet > header only if device supports this. > > Signed-off-by: Vadim Kochan <vadi...@gmail.com> > --- > dev.c |

[netsniff-ng] [PATCH] trafgen: l3: Make possible to send frames via tun device

2017-02-01 Thread Vadim Kochan
tun interface does not have Ethernet header so lets push Ethernet header only if device supports this. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- dev.c | 18 ++ dev.h | 4 trafgen_l3.c| 15 --- trafgen_proto.

[netsniff-ng] [PATCH 2/3] trafgen: Allow send packets from pcap file

2017-01-31 Thread Vadim Kochan
Add ability to send packets from pcap file if it has ".pcap" extension via "-i,--in" option. By default packet sending is delayed considering original packets timestamps if no rate or delay is specified via -b/-t options. Signed-off-by: Vadim Kochan <vadi...@gm

[netsniff-ng] [PATCH 3/3] trafgen: man: Add description with pcap file for -i, --in option

2017-01-31 Thread Vadim Kochan
Update -i, --in option with pcap file as input parameter. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen.8 | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/trafgen.8 b/trafgen.8 index e09b7a0..fd9788a 100644 --- a/trafgen.8 +++ b/trafgen.8 @@ -66,10

[netsniff-ng] [PATCH 1/3] pcap_io: Add function to get packet timestamp

2017-01-31 Thread Vadim Kochan
Add pcap_get_tstamp(...) function to get packet's timestamp considering different packet types & bytes order. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- pcap_io.h | 53 + 1 file changed, 53 insertions(+) diff --git a/p

Re: [netsniff-ng] Mausezahn - virtual nic "unknown physical layer type"

2017-01-31 Thread Vadim Kochan
BTW I did grep over the kernel and looks like it might the 'tun' device. On Tue, Jan 31, 2017 at 12:38 PM, Vadim Kochan <vadi...@gmail.com> wrote: > On Tue, Jan 31, 2017 at 12:36 PM, Vadim Kochan <vadi...@gmail.com> wrote: >> On Tue, Jan 31, 2017 at 12:47 AM, Jojonix1-Web &l

Re: [netsniff-ng] Mausezahn - virtual nic "unknown physical layer type"

2017-01-31 Thread Vadim Kochan
roups.com. > For more options, visit https://groups.google.com/d/optout. Hi Jonathan, 1st thing which comes to mind is that the link type of this interface is "none" or "void", and libnet can't handle it. Could you please give some details about this interface with

[netsniff-ng] [RFC 7/7] trafgen: parser: Add syntax to generate DNS header

2017-01-30 Thread Vadim Kochan
auth(name="ns1", ns("ns1.org")), ans(name="www.google.com", cname("google.com")), auth(name="aa", ns("bb")), qry(name="www.google.com")) } { dns(qr=1, ans(name="www.google.com", addr(1.

[netsniff-ng] [RFC 6/7] trafgen: l7: Add DNS header generation API

2017-01-30 Thread Vadim Kochan
y 2 proto_hdr's which describes 4 DNS sections - query & rrecord, because rrecord covers another 3 - answer, auhority, additional which have the same layout. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen/Makefile | 1 + trafgen_l4.c | 32 ++ trafgen_l

[netsniff-ng] [RFC 4/7] trafgen: parser: Use proto_field_set_xxx where it is possible

2017-01-30 Thread Vadim Kochan
Use proto_field_set_xxx(field, ...) instead of proto_hdr_field_set_xxx(hdr, fid, ...) to be more generic and do not depent on 'hdr' variable. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen_parser.y | 13 ++--- trafgen_proto.c | 5 + trafgen_proto.h | 1 + 3

[netsniff-ng] [RFC 1/7] trafgen: parser: Rename bytes -> mac

2017-01-30 Thread Vadim Kochan
Rename token member to as it is used only for MAC address parsing, for dynamic sized bytes array we have an . Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen_lexer.l | 2 +- trafgen_parser.y | 12 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff

[netsniff-ng] [RFC 0/7] Add DNS proto header support

2017-01-30 Thread Vadim Kochan
;)), ans(name="www.google.com", cname("google.com")), auth(name="aa", ns("bb")), qry(name="www.google.com")) } { dns(qr=1, ans(name="www.google.com", addr(1.2.3.4))) } { dns(qr=1, ans(name="www.google.co

[netsniff-ng] [RFC 3/7] trafgen: proto: Allow to set field with variable length

2017-01-30 Thread Vadim Kochan
bytes and after the field needs to be relocated to the right place. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen_proto.c | 50 ++ 1 file changed, 50 insertions(+) diff --git a/trafgen_proto.c b/trafgen_proto.c index 0530032..8

[netsniff-ng] [RFC 5/7] str: Add function for converting string into DNS name

2017-01-30 Thread Vadim Kochan
Add str2fqdn for converting hostname string into DNS name notation: www..yy.com -> 3www42yy3com0 Returned string must be freed after use by the caller. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- str.c | 37 + str.h | 1 +

[netsniff-ng] Re: [PATCH] trafgen: l3: Fix checksum for UDP/TCP protos

2017-01-25 Thread Vadim Kochan
On Wed, Jan 25, 2017 at 2:24 PM, Tobias Klauser <tklau...@distanz.ch> wrote: > On 2017-01-23 at 22:49:22 +0100, Vadim Kochan <vadi...@gmail.com> wrote: >> While fixing the issue with getting of IPv4 address from device, >> the setting of default src IPv4/IPv6 addr

[netsniff-ng] [PATCH v2 2/2] flowtop: Add process UI tab entry

2017-01-18 Thread Vadim Kochan
flows related to it (flows_count is 0), if the process exists then dst & src rates info is zeroed and summed from the all related flows which are in the proc_entry->flows list. The bytes & pkts amount info is collected during all the time process exists. Signed-off-by: Vadim Kochan <vad

[netsniff-ng] [PATCH v2 1/2] flowtop: Add tab control to switch between tables

2017-01-18 Thread Vadim Kochan
-compat.h header. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- flowtop.c | 26 +-- ui.c | 97 -- ui.h | 34 +-- urcu-list-compat.h | 21 4 files changed, 171 inse

[netsniff-ng] [PATCH v2 0/2] flowtop: Add UI tab control for process stats

2017-01-18 Thread Vadim Kochan
mmit. 4) In flow_entry_find_process(...) use proc_entry->name member instead of local procname string. 5) Rename proc_exist -> proc_exists 6) Rename proc_entry.procnnum -> pid 7) Rename proc_entry.procname -> name Vadim Kochan (2): flowtop: Add tab control to switch between tables

[netsniff-ng] [PATCH 1/2] flowtop: Add tab control to switch between tables

2017-01-18 Thread Vadim Kochan
. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- flowtop.c | 26 +++-- list.h| 19 + ui.c | 95 ++- ui.h | 30 4 files changed, 166 insertions(+), 4 deletions(-) creat

[netsniff-ng] [PATCH 0/2] flowtop: Add UI tab control for process stats

2017-01-18 Thread Vadim Kochan
ains just missing cds_list_{next,prev,last}_entry functions which are needed for navigation over UI tab entries. Vadim Kochan (2): flowtop: Add tab control to switch between tables flowtop: Add process UI tab entry flowtop.c |

[netsniff-ng] Re: list: Remove cds_list_* wrappers

2017-01-17 Thread Vadim Kochan
On Tue, Jan 17, 2017 at 5:30 PM, Vadim Kochan <vadi...@gmail.com> wrote: > Hi Tobias, > > Just some thoughts from me regarding this commit, if the below > can make a sense. > > In case if list_head (now cds_list_head) will be used by other modules > and lets imagine that

[netsniff-ng] Re: flowtop: Example of UI tabs interface

2017-01-13 Thread Vadim Kochan
On Fri, Jan 13, 2017 at 3:07 PM, Daniel Borkmann <dan...@iogearbox.net> wrote: > On 01/13/2017 02:02 PM, Vadim Kochan wrote: >> >> Hi, >> >> I tried to extend flowtop UI to have some aggregated info via tabbed >> panel interface. >> Currently there is

[netsniff-ng] Re: [PATCH] flowtop: Replace single linked list by list_head from list.h

2017-01-13 Thread Vadim Kochan
On Thu, Jan 12, 2017 at 5:20 PM, Tobias Klauser <tklau...@distanz.ch> wrote: > On 2017-01-12 at 15:54:31 +0100, Vadim Kochan <vadi...@gmail.com> wrote: >> On Thu, Jan 12, 2017 at 4:28 PM, Tobias Klauser <tklau...@distanz.ch> wrote: > [...] >> >> enum

[netsniff-ng] [PATCH] flowtop: Replace single linked list by list_head from list.h

2017-01-12 Thread Vadim Kochan
(...) therefor no need to use nfct_clone(n). Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- flowtop.c | 148 -- 1 file changed, 47 insertions(+), 101 deletions(-) diff --git a/flowtop.c b/flowtop.c index f48f5c8..3cee0ec 100644 --- a/flo

[netsniff-ng] Re: [PATCH] flowtop: Replace single linked list by list_head from list.h

2017-01-12 Thread Vadim Kochan
, if you have time could you maybe have a quick look? > > On 2017-01-09 at 07:26:07 +0100, Vadim Kochan <vadi...@gmail.com> wrote: >> list.h provides generic Linux-like linked list API which also supports >> RCU list operations. >> >> Also additionally was removed

[netsniff-ng] Re: [PATCH 0/4] Introduce new pcap io API for pcap r/w accesses

2017-01-12 Thread Vadim Kochan
On Wed, Dec 14, 2016 at 11:33 PM, Vadim Kochan <vadi...@gmail.com> wrote: > On Wed, Dec 14, 2016 at 11:26 PM, Tobias Klauser <tklau...@distanz.ch> wrote: >> On 2016-12-12 at 22:09:52 +0100, Vadim Kochan <vadi...@gmail.com> wrote: >>> Add new pcap io API t

[netsniff-ng] [PATCH] flowtop: Replace single linked list by list_head from list.h

2017-01-08 Thread Vadim Kochan
. Because of full RCU support now flows are freed after grace-period via calling synchronize_rcu() and these removed-and-ready-to-free entries are kept in separate struct list_head. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- flowtop.c

[netsniff-ng] Re: New trafgen syntax and some ICMP examples

2017-01-05 Thread Vadim Kochan
On Thu, Jan 05, 2017 at 04:00:36PM +0100, Jesper Dangaard Brouer wrote: > Hi Vadim, > > I just noticed the new trafgen syntax, I really like it. > > I was playing with testing the kernels ICMP handling code and > validating some change to the icmp rate-limiting, and wrote an trafgen > conf for

[netsniff-ng] [PATCH] flowtop: Minimize delay via halfdelay(1) function

2017-01-02 Thread Vadim Kochan
Use halfdelay(1) to poll keyboard input with delay in 1 tenth of second and get rid of custom usleep(...) using. With this approach (it is also used in htop tool) the key events are more sensitive to user inputs. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- flowtop.c | 3 +--

Re: [netsniff-ng] trafgen cfg: automatically padding dynamic values to sizes larger than 1 octet

2016-12-21 Thread Vadim Kochan
[ IPv4 Addr (127.0.0.1 => 192.170.1.1) As you see you need to 1st set initial field value and then set this field with dynamic function at specific offset, we will try to implement some better short alternative syntax. Let me know if you have some comments/suggestions. Regards, Vadi

[netsniff-ng] [PATCH v3] man: trafgen: Add short description about field offset using

2016-12-21 Thread Vadim Kochan
Add short note about field offset syntax with an example. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- v2: Change commit messages and man file that field offset expression is used with function expression, and added validation for it in trafgen parser. v3: Add some ex

[netsniff-ng] Re: [PATCH v2 6/7] trafgen: parser: Allow to set function at field offset

2016-12-21 Thread Vadim Kochan
On Wed, Dec 21, 2016 at 10:17:17AM +0100, Tobias Klauser wrote: > On 2016-12-20 at 22:10:54 +0100, Vadim Kochan <vadi...@gmail.com> wrote: > > On Tue, Dec 20, 2016 at 12:33:47PM +0100, Tobias Klauser wrote: > > > On 2016-12-18 at 10:52:49 +0100, Vadim Kochan &

[netsniff-ng] Re: [PATCH v2 6/7] trafgen: parser: Allow to set function at field offset

2016-12-20 Thread Vadim Kochan
On Tue, Dec 20, 2016 at 12:33:47PM +0100, Tobias Klauser wrote: > On 2016-12-18 at 10:52:49 +0100, Vadim Kochan <vadi...@gmail.com> wrote: > > Extend proto field expression to: > > > > proto_field[{index}:{len}] = {func} > > I like the idea behind this ve

[netsniff-ng] [PATCH v2 2/7] trafgen: proto: Change __proto_field_set_bytes(...) to take field

2016-12-18 Thread Vadim Kochan
Change __proto_field_set_bytes(...) function to take struct proto_field instead of do looup by hdr & fid. It is needed to able use this function with some custom modified struct proto_field (len, pkt_offset). Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen_pr

[netsniff-ng] [PATCH v2 4/7] trafgen: proto: Add proto field only setters/getters

2016-12-18 Thread Vadim Kochan
Add proto_field_xxx functions to set/get value via specified proto_field only. It is good to have such API in case if application needs to set/get value for some custom proto_field instance. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen_proto.

[netsniff-ng] [PATCH v2 5/7] trafgen: parser: Parse IPv6 address by strict match pattern

2016-12-18 Thread Vadim Kochan
Used IPv6 pattern from nftables project to match valid only IPv6 address to do not mess with MAC or other syntax patterns with ':' symbol. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen_lexer.l | 51 +++ trafgen_parser.y | 2

[netsniff-ng] [PATCH v2 7/7] man: trafgen: Add short description about field offset using

2016-12-18 Thread Vadim Kochan
Add short note about field offset syntax with an example. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen.8 | 25 + 1 file changed, 25 insertions(+) diff --git a/trafgen.8 b/trafgen.8 index 62716bb..d669c2a 100644 --- a/trafgen.8 +++ b/trafgen.8 @@

[netsniff-ng] [PATCH v2 3/7] trafgen: proto: Rename proto_field_xxx -> proto_hdr_field_xxx

2016-12-18 Thread Vadim Kochan
proto_field. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen_l2.c | 44 - trafgen_l3.c | 24 +- trafgen_l4.c | 28 +-- trafgen_parser.y | 64 - trafgen_proto.c

[netsniff-ng] [PATCH v2 0/7] trafgen: Allow set proto field function at specific offset

2016-12-18 Thread Vadim Kochan
ded validation for it in trafgen parser. Vadim Kochan (7): trafgen: parser: Rename field_expr -> field_value_expr rule trafgen: proto: Change __proto_field_set_bytes(...) to take field trafgen: proto: Rename proto_field_xxx -> proto_hdr_field_xxx trafgen: proto: Add proto field only setter

[netsniff-ng] [PATCH v2 1/7] trafgen: parser: Rename field_expr -> field_value_expr rule

2016-12-18 Thread Vadim Kochan
Rename field_expr rule to field_value_expr to indicate the rule relates to field value part in case if there will be added field_expr rule to describe field expression syntax. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen_parser.y | 30 +++--- 1 file c

[netsniff-ng] Re: [PATCH 0/7] trafgen: Allow set proto field value at specific offset

2016-12-18 Thread Vadim Kochan
On Sat, Dec 17, 2016 at 4:37 PM, Vadim Kochan <vadi...@gmail.com> wrote: > Extend field expression with the following syntax: > > [] | [:] > > which allows to specify value or function at specified offset relative to the > field's offset within a header. &g

[netsniff-ng] [PATCH 2/7] trafgen: proto: Change __proto_field_set_bytes(...) to take field

2016-12-17 Thread Vadim Kochan
Change __proto_field_set_bytes(...) function to take struct proto_field instead of do looup by hdr & fid. It is needed to able use this function with some custom modified struct proto_field (len, pkt_offset). Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen_pr

[netsniff-ng] [PATCH 0/7] trafgen: Allow set proto field value at specific offset

2016-12-17 Thread Vadim Kochan
ows to specify different functions for the same field and with different offsets. Vadim Kochan (7): trafgen: parser: Rename field_expr -> field_value_expr rule trafgen: proto: Change __proto_field_set_bytes(...) to take field trafgen: proto: Rename proto_field_xxx -> proto_hdr_field_xxx

[netsniff-ng] [PATCH 1/7] trafgen: parser: Rename field_expr -> field_value_expr rule

2016-12-17 Thread Vadim Kochan
Rename field_expr rule to field_value_expr to indicate the rule relates to field value part in case if there will be added field_expr rule to indicate field expression syntax. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen_parser.y | 30 +++--- 1 file c

[netsniff-ng] [PATCH 5/7] trafgen: parser: Parse IPv6 address by strict match pattern

2016-12-17 Thread Vadim Kochan
Used IPv6 pattern from nftables project to match valid only IPv6 address to do not mess with MAC or other syntax patterns with ':' symbol. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen_lexer.l | 51 +++ trafgen_parser.y | 2

[netsniff-ng] [PATCH 7/7] man: trafgen: Add short description about field offset using

2016-12-17 Thread Vadim Kochan
Add short note about field offset syntax with an example. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen.8 | 25 + 1 file changed, 25 insertions(+) diff --git a/trafgen.8 b/trafgen.8 index 62716bb..c58d429 100644 --- a/trafgen.8 +++ b/trafgen.8 @@

[netsniff-ng] [PATCH 6/7] trafgen: parser: Allow to set value/func at field offset

2016-12-17 Thread Vadim Kochan
ame piece of header. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen_parser.y | 96 +++- trafgen_proto.c | 27 +++- trafgen_proto.h | 8 +++-- 3 files changed, 98 insertions(+), 33 deletions(-) diff --git a/trafgen

[netsniff-ng] [PATCH 3/7] trafgen: proto: Rename proto_field_xxx -> proto_hdr_field_xxx

2016-12-17 Thread Vadim Kochan
proto_field. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- trafgen_l2.c | 44 - trafgen_l3.c | 24 +- trafgen_l4.c | 28 +-- trafgen_parser.y | 64 - trafgen_proto.c

[netsniff-ng] Re: [PATCH v2] flowtop: Move & refactor walk_processes(...) to proc.c

2016-12-14 Thread Vadim Kochan
On Wed, Dec 14, 2016 at 11:44 PM, Vadim Kochan <vadi...@gmail.com> wrote: > Add proc_find_by_inode(...) which finds pid by inode & gets processe's > command line. > > Actually this function was taken from flowtop.c walk_process(...) > and refactored to look more generic.

[netsniff-ng] [PATCH v2] flowtop: Move & refactor walk_processes(...) to proc.c

2016-12-14 Thread Vadim Kochan
Add proc_find_by_inode(...) which finds pid by inode & gets processe's command line. Actually this function was taken from flowtop.c walk_process(...) and refactored to look more generic. Signed-off-by: Vadim Kochan <vadi...@gmail.com> flowtop: Replace walk_processes(...) by proc_fin

[netsniff-ng] Re: [PATCH 0/4] Introduce new pcap io API for pcap r/w accesses

2016-12-14 Thread Vadim Kochan
On Wed, Dec 14, 2016 at 11:26 PM, Tobias Klauser <tklau...@distanz.ch> wrote: > On 2016-12-12 at 22:09:52 +0100, Vadim Kochan <vadi...@gmail.com> wrote: >> Add new pcap io API to make pcap read/write accesses more >> simpler and generic. Added pcap_io & pcap_

[netsniff-ng] Re: [PATCH 0/2] flowtop: Move & refactor walk_processes(...) to proc.c

2016-12-14 Thread Vadim Kochan
Hi Tobias, On Wed, Dec 14, 2016 at 11:16 PM, Tobias Klauser <tklau...@distanz.ch> wrote: > On 2016-12-13 at 02:36:00 +0100, Vadim Kochan <vadi...@gmail.com> wrote: >> Add proc_find_by_inode(...) to find pid & it's command line by inode. >> The main motivation for t

[netsniff-ng] [PATCH 0/2] flowtop: Move & refactor walk_processes(...) to proc.c

2016-12-12 Thread Vadim Kochan
Add proc_find_by_inode(...) to find pid & it's command line by inode. The main motivation for this is to have process specific function located in proc.c and only call it from flowtop.c. proc_find_by_inode(...) its just a refactored version of walk_processes(...) from the flowtop.c. Vadim Ko

[netsniff-ng] [PATCH 1/2] proc: Add function for find process by inode

2016-12-12 Thread Vadim Kochan
Add proc_find_by_inode(...) which finds pid by inode & gets processe's command line. Actually this function was taken from flowtop.c walk_process(...) and refactored to look more generic. Signed-off-by: Vadim Kochan <vadi...@gmail.com> --- p

  1   2   3   4   5   6   >