[netsniff-ng] Re: [PATCH] trafgen: Fix documentation for seqinc and seqdec

2021-12-09 Thread Tobias Klauser
On 2021-12-07 at 20:55:10 +0100, Sean Anderson wrote: > These functions take the "times" argument as the second parameter, not > the third. > > Fixes: 00e83a5 ("man: trafgen: finish syntax section") > Signed-off-by: Sean Anderson Applied, thank you! -- You received this message because you

[netsniff-ng] Re: [PATCH] trafgen.8: fix typo in example packet

2021-09-02 Thread Tobias Klauser
On 2021-09-02 at 13:01:10 +0200, Baruch Siach wrote: > First MAC address is destination, but the second is source. > > Signed-off-by: Baruch Siach Applied, thanks. -- You received this message because you are subscribed to the Google Groups "netsniff-ng" group. To unsubscribe from this

[netsniff-ng] Re: [PATCH] Detect libpcap dependencies using pkg-config

2021-09-02 Thread Tobias Klauser
On 2021-09-02 at 11:56:00 +0200, Baruch Siach wrote: > When building statically the link command line must include all > dependencies of all libraries. libpcap can optionally depend on libnl. > mausezahn can't build statically in this case. > > Use pkg-config in configure and in the link command

[netsniff-ng] [ANNOUNCE] netsniff-ng v0.6.8

2021-01-11 Thread Tobias Klauser
with GCC 10. Contributions since last release: 11 Tobias Klauser 2 uno20001 1 Rosen Penev Git changelog since last release: Tobias Klauser (11): mausezahn: remove unused MZ_SIZE_LONG_INT astraceroute.8: use more sensitive terminology trafgen: remove write-only

[netsniff-ng] [ANNOUNCE] netsniff-ng v0.6.7

2020-05-04 Thread Tobias Klauser
v0.6.7 Major high-level changes since the last release (v0.6.6) are: *** BLURB HERE (specific bits) *** Contributions since last release: 5 Tobias Klauser 4 Nathaniel Ferguson 2 Petr Machata 1 uno20001 1 Michael R. Torres 1 Michael R Torres 1

Re: [netsniff-ng] [PATCH 2/2] mausezahn: Support -R to set packet priority

2019-10-04 Thread Tobias Klauser
On 2019-10-01 at 18:40:11 +0200, Petr Machata wrote: > Add a command line option -R to specify SO_PRIORITY socket option. This > then sets priority of the generated SKBs, which is handy for testing Qdiscs > and other priority-dependent functionality. > > Signed-off-by: Petr Machata Both

[netsniff-ng] [ANNOUNCE] netsniff-ng v0.6.6

2019-05-09 Thread Tobias Klauser
v0.6.6 Major high-level changes since the last release (v0.6.5) are: *** BLURB HERE (specific bits) *** Contributions since last release: 14 Tobias Klauser 2 Mandar Gokhale 1 Whang Choi 1 uno20001 1 Quentin Chateau 1 Kartik Mistry 1 Jaroslav

[netsniff-ng] [ANNOUNCE] netsniff-ng v0.6.5

2018-09-20 Thread Tobias Klauser
Git (see README): git tag -v v0.6.5 Contributions since last release: 16 Tobias Klauser 2 Daniel Roberson 1 Radoslav Bodo 1 Petr Machata 1 Nick Grauel 1 Matteo Croce 1 Markus Amend Git changelog since last release: Tobias Klauser (16

Re: [netsniff-ng] [PATCH] mausezahn: Fix IPv6 address comparison

2018-05-15 Thread Tobias Klauser
On 2018-05-14 at 23:59:59 +0200, Petr Machata wrote: > CMP_INT evaluates its arguments more than once, and thus passing a > post-incremented pointer as an argument causes double increments and > hence buffer overruns. This can be observed by erratic behavior of IPv6 > address

[netsniff-ng] [ANNOUNCE] netsniff-ng v0.6.4

2018-01-05 Thread Tobias Klauser
() to properly respect min/max range and avoid counter corruption (Paolo Abeni) 4. Fixes for NULL pointer dereferences and resource leaks in trafgen (Tobias Klauser) and mausezahn (Jia Zhouyang) 5. Build fixes for various compiler versions, libc implementations and distributions (Baruch Siach

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

2018-01-02 Thread Tobias Klauser
On 2017-12-29 at 10:17:09 +0100, Vadim Kochan <vadi...@gmail.com> wrote: > 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 possib

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

2017-12-19 Thread Tobias Klauser
segfaults on startup before displaying anything. > 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 T

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

2017-12-19 Thread Tobias Klauser
On 2017-12-18 at 23:38:18 +0100, Vadim Kochan wrote: > There is missing logic which removes flown entry from > related proc's entry while destroying global flows list on > filter reloading, hence add common __flow_list_del_entry which > handles this logic for both cases - when

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

2017-12-18 Thread Tobias Klauser
On 2017-12-17 at 22:25:40 +0100, Vadim Kochan wrote: > 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

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

2017-12-14 Thread Tobias Klauser
moving & freeing from the global list, plz give > me few more days for testing & fixing > if its possible. Thanks a lot for the follow up. Will hold off the release until next week then. Thanks! > Regards, > Vadim Kochan > > On Thu, Dec 14, 2017 at 2:47 PM, Tobias Klauser

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

2017-12-14 Thread Tobias Klauser
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: > > Hi All, > > > > I just noticed there some bug reports, I will look on them on weekend, I > > assum

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

2017-12-11 Thread Tobias Klauser
On 2017-12-08 at 18:30:24 +0100, Vadim Kochan wrote: > 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 ? Yes, in particular

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

2017-10-20 Thread Tobias Klauser
with new gcc Jia Zhouyang (1): mausezahn: fix segmentation fault Paolo Abeni (1): trafgen: fix packet socket initialization with multiple CPUs Tobias Klauser (20): netsniff-ng: remove unnecessary zeroing of packet counters in init_ctx() make: use sed instead of perl to extract

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

2017-09-15 Thread Tobias Klauser
On 2017-09-14 at 10:13:17 +0200, Paolo Abeni wrote: > On Thu, 2017-09-14 at 10:40 +0300, Vadim Kochan wrote: > > Thanks Paolo! Shame on me, I did not test it properly :( > > No problem at all, I guess. After all, bugs are the only feature shared > by all kind of software ;-)

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

2017-09-15 Thread Tobias Klauser
On 2017-09-13 at 17:54:52 +0200, 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 in use: the packet > socket is created before fork() and

[netsniff-ng] Re: Question on Curvetun

2017-09-07 Thread Tobias Klauser
Hi On 2017-09-06 at 21:33:39 +0200, sandman wrote: > Hi Tobias > > Thanks for your work on curvetun! I just exploring it and I wanted to check > with you on potential usage. Would help me a great deal if you can help > with me with following queries. In general, please ask

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

2017-08-10 Thread Tobias Klauser
On 2017-07-29 at 11:46:06 +0200, Vadim Kochan wrote: > Added trafgen_dump.c module which dumps headers from packet > in .cfg format. Packet is dumped if -o .cfg was specified, > it might be useful to specify *.pcap file as input and convert it > into .cfg file to edit proto

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

2017-07-17 Thread Tobias Klauser
On 2017-07-17 at 08:06:36 +0200, Vadim Kochan wrote: > 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

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

2017-06-19 Thread Tobias Klauser
On 2017-06-12 at 22:55:37 +0200, Vadim Kochan 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 '{ udp() }' -o

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

2017-06-19 Thread Tobias Klauser
On 2017-06-13 at 06:13:58 +0200, Vadim Kochan wrote: > 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

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

2017-06-09 Thread Tobias Klauser
On 2017-06-07 at 21:24:52 +0200, Vadim Kochan wrote: > Add trafgen_dev.c module which provides generic way of > reading and writing packets to/from networking device or a pcap file. > > Also allow to handle output pcap file via '-o, --out, --dev' option. > > It might be

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

2017-06-07 Thread Tobias Klauser
On 2017-06-06 at 22:30:36 +0200, Vadim Kochan wrote: > Add trafgen_dev.c module which provides generic way of > reading and writing packets to/from networking device or a pcap file. > > Also allow to handle output pcap file via '-o, --out, --dev' option. > > It might be

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

2017-05-30 Thread Tobias Klauser
On 2017-05-27 at 17:30:08 +0200, Vadim Kochan wrote: > Move scrolling logic to the ui.c module, it requires to have > some data iteration provided in flowtop.c and delegated to ui.c part. > > So approach is that now flowtop provides 2 additional callbacks for: > > 1)

Re: [netsniff-ng] [PATCH v2] pcap_io.h: fix if_arp.h musl libc/kernel headers conflict

2017-05-23 Thread Tobias Klauser
On 2017-04-16 at 13:34:00 +0200, Baruch Siach wrote: > Use libc provided arp definitions to avoid build failure with musl libc: > > In file included from pcap_io.h:19:0, > from trafgen.c:59: >

Re: [netsniff-ng] [PATCH 1/2] proc.h: add missing headers

2017-05-23 Thread Tobias Klauser
Hi Baruch On 2017-04-16 at 07:22:20 +0200, Baruch Siach wrote: > ino_t and pid_t require stat.h and types.h, respectively. Fixes the following > build failure with musl libc: > > In file included from cpp.c:7:0: > proc.h:11:31: error: unknown type name ‘ino_t’ > extern int

Re: [netsniff-ng] [PATCH] flowtop: take PKG_CONFIG into account for libnetfilter_conntrack

2017-05-23 Thread Tobias Klauser
Hi Baruch On 2017-04-16 at 06:49:27 +0200, Baruch Siach wrote: > Use $PKG_CONFIG to determine the linker flags for libnetfilter_conntrack. This > fixes static link failure like the following: > > LD flowtop >

[netsniff-ng] [ANNOUNCE] netsniff-ng v0.6.3 released

2017-04-11 Thread Tobias Klauser
) Fixed buffer overflow in device_addr2str() causing Linux cooked header dissector to crash. Reported by @jamieparfet, fixed by Tobias Klauser. 7) Fixed build due to missing GENL_ID_GENERATE if compiling against kernel headers >= 4.10 (see issue #171). Reported by Jaroslav Škarvada, fi

[netsniff-ng] [ANNOUNCE] Tree closed for new features until v0.6.3

2017-03-22 Thread Tobias Klauser
page mausezahn: Use all-nodes link local address for IPv6 mausezahn: Add error handling for mismatched address families Tobias Klauser (23): AUTHORS: Add Mandar Gokhale build: configure: clearify missing defs warning build: configure: rewrap missing defs warning AUT

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

2017-03-15 Thread Tobias Klauser
On 2017-03-14 at 20:15:45 +0100, Vadim Kochan <vadi...@gmail.com> wrote: > 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 mod

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

2017-03-14 Thread Tobias Klauser
On 2017-01-30 at 09:33:29 +0100, Vadim Kochan 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 needed to easy handle

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

2017-02-23 Thread Tobias Klauser
Hi Vadim On 2017-02-21 at 16:35:12 +0100, Vadim Kochan wrote: > On Mon, Jan 30, 2017 at 10:33 AM, Vadim Kochan wrote: [...] > > Vadim Kochan (7): > > trafgen: parser: Rename bytes -> mac > > trafgen: proto: Add 'len' parameter to *_set_bytes(...)

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

2017-02-13 Thread Tobias Klauser
On 2017-01-30 at 09:33:27 +0100, Vadim Kochan wrote: > 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 This does not strictly

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

2017-02-09 Thread Tobias Klauser
On 2017-01-30 at 09:33:24 +0100, Vadim Kochan wrote: > 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 Applied, as this is not directly related to the rest of

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

2017-02-09 Thread Tobias Klauser
On 2017-01-30 at 09:33:25 +0100, Vadim Kochan wrote: > Add 'len' parameter to *_set_bytes(...) functoins to have better > control over it. While this is certainly a good idea (and you are also going to use it in the following patch), the current patch doesn't use the passed

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

2017-02-06 Thread Tobias Klauser
On 2017-02-06 at 17:23:11 +0100, Vadim Kochan wrote: > tun interface does not have Ethernet header so lets push Ethernet > header only if device supports this. > > Signed-off-by: Vadim Kochan Applied, thank you. -- You received this message because you

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

2017-02-06 Thread Tobias Klauser
On 2017-02-04 at 10:56:14 +0100, Vadim Kochan wrote: > GeoIP_record_by_ipnum{,_v6} returns allocated pointer to > GeoIPRecord with allocated city, region & postal_code which is > not freed after the call. > > Fixed by xstrdup-ing required GeoIPRecord member (city/region) and >

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

2017-02-06 Thread Tobias Klauser
On 2017-01-31 at 23:31:35 +0100, Vadim Kochan wrote: > 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

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

2017-02-06 Thread Tobias Klauser
On 2017-01-31 at 23:31:34 +0100, Vadim Kochan wrote: > Add pcap_get_tstamp(...) function to get packet's timestamp considering > different packet types & bytes order. > > Signed-off-by: Vadim Kochan > --- > pcap_io.h | 53

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

2017-01-25 Thread Tobias Klauser
On 2017-01-25 at 13:34:54 +0100, Vadim Kochan <vadi...@gmail.com> wrote: > 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

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

2017-01-25 Thread Tobias Klauser
On 2017-01-23 at 22:49:22 +0100, Vadim Kochan wrote: > While fixing the issue with getting of IPv4 address from device, > the setting of default src IPv4/IPv6 addresses was moved from > hdr->header_init(...) callback to hdr->packet_finish(...), but > packet_finish(...) is

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

2017-01-25 Thread Tobias Klauser
On 2017-01-19 at 00:09:02 +0100, Vadim Kochan wrote: > Add UI tab control to switch between tabbed windows for dirrent flows table > statistics info per pid/peer/port. > > The tab entries are switched by TAB keypress. > > Introduced proc_entry which holds aggregated related

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

2017-01-18 Thread Tobias Klauser
On 2017-01-18 at 14:00:25 +0100, Vadim Kochan wrote: > Add process UI tab entry to show flows statistics per pid. > > Also changed flow_entry which now has pointer to new struct proc_entry > object which contains process related info. > > On each 1 second refresh proc_entry

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

2017-01-18 Thread Tobias Klauser
On 2017-01-18 at 14:00:24 +0100, Vadim Kochan wrote: > Add ui_tab API to create ui tab control to switch between > different ui tables which may contain different aggregated > info per unique pid/port/proto/dst/src. > > Meanwhile there is only 1 ui tab entry for flows table. >

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

2017-01-17 Thread Tobias Klauser
On 2017-01-17 at 16:36:53 +0100, Vadim Kochan wrote: > On Tue, Jan 17, 2017 at 5:30 PM, Vadim Kochan wrote: > > Hi Tobias, > > > > Just some thoughts from me regarding this commit, if the below > > can make a sense. > > > > In case if list_head (now

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

2017-01-17 Thread Tobias Klauser
On 2017-01-13 at 12:06:07 +0100, Vadim Kochan wrote: > list.h provides generic Linux-like linked list API which also supports > RCU list operations. > > Also additionally was removed the spinlock which is not needed for > RCU-list operations, for the list_del_rcu(...) case it

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

2017-01-12 Thread Tobias Klauser
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 flow_direction { > >> @@ -355,15 +357,15 @@ static inline struct flow_entry > >> *f

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

2017-01-12 Thread Tobias Klauser
Thanks for the patch and sorry for the delay in reply. I'm not too familiar with the RCU list interface, but from a quick glance this looks OK in general. A few remarks below. Daniel, if you have time could you maybe have a quick look? On 2017-01-09 at 07:26:07 +0100, Vadim Kochan

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

2017-01-12 Thread Tobias Klauser
On 2017-01-12 at 13:59:05 +0100, Vadim Kochan <vadi...@gmail.com> wrote: > 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-1

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

2017-01-05 Thread Tobias Klauser
On 2016-12-21 at 19:33:33 +0100, Vadim Kochan wrote: > Add short note about field offset syntax with an example. > > Signed-off-by: Vadim Kochan Applied, thanks! -- You received this message because you are subscribed to the Google Groups "netsniff-ng"

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

2016-12-21 Thread Tobias Klauser
On 2016-12-21 at 10:13:03 +0100, Vadim Kochan <vadi...@gmail.com> wrote: > 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:47

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

2016-12-20 Thread Tobias Klauser
On 2016-12-18 at 10:52:49 +0100, Vadim Kochan wrote: > Extend proto field expression to: > > proto_field[{index}:{len}] = {func} I like the idea behind this very much, but I'm not particularly happy with the syntax of this. First, I find it a bit confusing that the

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

2016-12-20 Thread Tobias Klauser
On 2016-12-18 at 10:52:48 +0100, Vadim Kochan wrote: > Used IPv6 pattern from nftables project to match valid only IPv6 > address to do not mess with MAC or other syntax patterns with ':' symbol. Please mention the nftables source where you took this from in a comment in the

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

2016-12-19 Thread Tobias Klauser
On 2016-12-17 at 16:57:22 +0100, Vadim Kochan wrote: > Add proc_find_by_inode(...) in proc.c which finds pid by inode & gets > processe's command line and use it in the flowtop.c instead of > walk_processes(...). > > Signed-off-by: Vadim Kochan Applied,

[netsniff-ng] Re: [PATCH 2/2] flowtop: Replace walk_processes(...) by proc_find_by_inode(...)

2016-12-14 Thread Tobias Klauser
On 2016-12-13 at 02:36:02 +0100, Vadim Kochan wrote: > Use proc_find_by_inode(...) from proc.c to find pid by inode > and it's command line instead of having own specific process walker. > > Signed-off-by: Vadim Kochan > --- > flowtop.c | 76 >

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

2016-12-14 Thread Tobias Klauser
On 2016-12-12 at 22:09:52 +0100, Vadim Kochan wrote: > Add new pcap io API to make pcap read/write accesses more > simpler and generic. Added pcap_io & pcap_packet struct's to > keep some internal pcap state like magic, link type & packet header > instead of to pass them like

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

2016-12-14 Thread Tobias Klauser
On 2016-12-13 at 02:36:01 +0100, Vadim Kochan 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. > > Signed-off-by: Vadim

[netsniff-ng] Re: [PATCH] ring_rx: Fix warning message if PACKET_FANOUT is not defined

2016-11-23 Thread Tobias Klauser
On 2016-11-22 at 00:09:32 +0100, Vadim Kochan wrote: > Move #ifdef PACKET_FANOUT at begining of join_fanout_group(...) function > to fix warning message that 'fanout_opt' & 'ret' variables are not used > if PACKET_FANOUT is not defined. > > It may happen on 2.6.x Linux

Re: [netsniff-ng] [ANNOUNCE] netsniff-ng 0.6.2

2016-11-07 Thread Tobias Klauser
On 2016-11-07 at 14:58:24 +0100, Tobias Klauser <tklau...@distanz.ch> wrote: > It is our pleasure to announce the release of netsniff-ng 0.6.2. > > The summary of changes and the short log of all changes since v0.6.1 can > be found below and also on github at > https://g

[netsniff-ng] [ANNOUNCE] netsniff-ng 0.6.2

2016-11-07 Thread Tobias Klauser
functions to generate IPv6, ICMPv4/v6, PFC, and IEEE 802.3X PAUSH headers. From Vadim Kochan and Tobias Klauser. 2) flowtop UI improvements. From Vadim Kochan. 3) Packet counting fixes, e.g. to not account for duplicate packets received over the loopüback interface. From Paolo Abeni. 4) Allow IPv6

[netsniff-ng] [ANNOUNCE] Tree closed for new features until v0.6.2 release

2016-10-04 Thread Tobias Klauser
packets on loopback device netsniff-ng: Increment pkts_seen after packet type check netsniff-ng: Account skipped packets as 'seen' and 'dropped' Tobias Klauser (41): AUTHORS: Add Tommy for his contribution AUTHORS: Add Arch3y for his contribution trafgen: proto: Inline

[netsniff-ng] Re: [PATCH] trafgen: man: Fix Jesper's example link

2016-09-23 Thread Tobias Klauser
Signed-off-by: Vadim Kochan <vadi...@gmail.com> > Suggested-by: Tobias Klauser <tklau...@distanz.ch> Applied, thanks. -- You received this message because you are subscribed to the Google Groups "netsniff-ng" group. To unsubscribe from this group and stop receiv

[netsniff-ng] Re: [PATCH v2 0/2] build: configure: Add support for '--prefix' & '--sysconfdir' options

2016-09-15 Thread Tobias Klauser
On 2016-08-22 at 23:17:10 +0200, Vadim Kochan wrote: > Add new 'configure' options: > > --prefix - to control of installation of binaries & shared files > --sysconfdir - to control of installation of config files > > The old 'make VAR=VALUE' should still work. >

[netsniff-ng] Re: [PATCH 0/3] flowtop: Add horizontal scrolling over flows

2016-09-15 Thread Tobias Klauser
On 2016-09-12 at 16:47:12 +0200, Vadim Kochan wrote: > On Tue, Aug 23, 2016 at 12:06 AM, Vadim Kochan wrote: > > In case of smaller than 130 chars display, some of the fields might > > be hidden, therefore add ability to scroll to left/right over the end > >

[netsniff-ng] Re: [PATCH] build: configure: Add option to enable debug symbols

2016-08-17 Thread Tobias Klauser
On 2016-08-13 at 01:39:33 +0200, Vadim Kochan wrote: > Add '--enable-debug' option to enable debugging symbols, > the reason is to simplify it by ./configure it once and > do not execute 'make DEBUG=1 ...' each time for a long > debug session. > > Signed-off-by: Vadim Kochan

[netsniff-ng] Re: [PATCH] tstamping: Move code to the sock.c

2016-08-17 Thread Tobias Klauser
On 2016-08-12 at 23:09:28 +0200, Vadim Kochan wrote: > Move hw timestamp enable/disable code to sock.c as > it is a socket related functionality, and it makes > have less files in source tree. > > Move tstamping related includes under HAVE_TSTAMPING config > to compile them

[netsniff-ng] Re: [RFC PATCH] trafgen: proto: Split static protocol definition out of struct proto_hdr

2016-08-12 Thread Tobias Klauser
On 2016-08-11 at 20:11:02 +0200, Vadim Kochan <vadi...@gmail.com> wrote: > On Thu, Aug 11, 2016 at 06:16:27PM +0200, Tobias Klauser wrote: > > Currently struct proto_hdr is used twofold: > > > > 1) Statically define protocol behavior, i.e. all the *_hdr definitions

[netsniff-ng] Re: [PATCH] colorize: Squash into colors.h

2016-08-12 Thread Tobias Klauser
On 2016-08-12 at 00:42:24 +0200, Vadim Kochan wrote: > Move colorize_xxx macroses to colors.h, the reason > is to have one file for coloring stuff and have less > files as possible in the source tree. > > Signed-off-by: Vadim Kochan Applied, thanks! --

[netsniff-ng] [RFC PATCH] trafgen: proto: Split static protocol definition out of struct proto_hdr

2016-08-11 Thread Tobias Klauser
/forum/#!msg/netsniff-ng/20RvwJdh50Y/eMkbmKSaBgAJ Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- trafgen_l2.c | 24 ++--- trafgen_l3.c | 8 +++ trafgen_l4.c | 22 +-- trafgen_parser.y | 2 +- trafgen_proto.c

[netsniff-ng] Re: [PATCH v2 05/14] trafgen: icmpv6: Update csum at runtime if needed

2016-08-11 Thread Tobias Klauser
On 2016-08-11 at 00:57:07 +0200, Vadim Kochan wrote: > Use same function to calculate csum for packet_update > and for packet_finish events. > > Allow update csum if one of the ICMPv6 fields was changed. > > Signed-off-by: Vadim Kochan > --- >

[netsniff-ng] Re: [PATCH v2 03/14] trafgen: ipv4: Update csum at runtime if needed

2016-08-11 Thread Tobias Klauser
On 2016-08-11 at 00:57:05 +0200, Vadim Kochan wrote: > Handle 'field_changed' callback to check if IPv4 csum is needed > to be recalculated, if so - update it on 'packet_update' event. > > Added 'is_csum_valid' to proto_hdr struct to check if csum needs to > be updated. > >

[netsniff-ng] Re: [PATCH v2 02/14] trafgen: proto: Randomize proto field at runtime

2016-08-11 Thread Tobias Klauser
On 2016-08-11 at 00:57:04 +0200, Vadim Kochan wrote: > Add dynamic proto field function which can generate > random value in specified range (default 0 - MAX_UINT32). > > Signed-off-by: Vadim Kochan > --- > trafgen_proto.c | 27 +++

[netsniff-ng] Re: [PATCH 00/15] trafgen: Support dinc & drnd for proto fields

2016-08-09 Thread Tobias Klauser
Hi Vadim On 2016-07-26 at 21:35:05 +0200, Vadim Kochan wrote: > Implemented 'dinc' and 'drnd' functions to be used for proto fields, > and generate values at runtime. Parsing of proto field values > for unified to make extending of field functions more easier w/o > copy/paste

[netsniff-ng] Re: [PATCH 04/15] trafgen: proto: Force field id to be index in array

2016-08-09 Thread Tobias Klauser
On 2016-07-26 at 21:35:09 +0200, Vadim Kochan wrote: > Usually proto fields array is sorted in the same order as related enum, > so id may be used as index for faster lookup, it will make > csum field calculation little faster at runtime. > > Signed-off-by: Vadim Kochan

[netsniff-ng] Re: [PATCH 05/15] trafgen: proto: Increment proto field at runtime

2016-08-09 Thread Tobias Klauser
On 2016-08-08 at 21:04:20 +0200, Vadim Kochan <vadi...@gmail.com> wrote: > On Sat, Aug 06, 2016 at 01:36:26AM +0300, Vadim Kochan wrote: > > On Wed, Aug 03, 2016 at 04:27:14PM +0200, Tobias Klauser wrote: > > > On 2016-07-26 at 21:35:10 +0200, Vadim Kochan &

[netsniff-ng] Re: [PATCH v3 3/3] configure: Add option to compile tools without libnl dependency

2016-08-09 Thread Tobias Klauser
On 2016-08-08 at 16:31:11 +0200, Vadim Kochan <vadi...@gmail.com> wrote: > On Mon, Aug 8, 2016 at 5:24 PM, Tobias Klauser <tklau...@distanz.ch> wrote: > > On 2016-08-06 at 11:59:05 +0200, Vadim Kochan <vadi...@gmail.com> wrote: > >> On Sat, Aug 6, 201

[netsniff-ng] Re: [PATCH v3 3/3] configure: Add option to compile tools without libnl dependency

2016-08-08 Thread Tobias Klauser
On 2016-08-06 at 11:59:05 +0200, Vadim Kochan <vadi...@gmail.com> wrote: > On Sat, Aug 6, 2016 at 12:41 PM, Tobias Klauser <tklau...@distanz.ch> wrote: > > On 2016-08-05 at 22:51:54 +0200, Vadim Kochan <vadi...@gmail.com> wrote: > >> Hm, > >> > >

[netsniff-ng] Re: [PATCH 06/15] trafgen: proto: Randomize proto field at runtime

2016-08-06 Thread Tobias Klauser
On 2016-08-06 at 01:44:42 +0200, Vadim Kochan <vadi...@gmail.com> wrote: > On Fri, Aug 05, 2016 at 09:26:24AM +0200, Tobias Klauser wrote: > > On 2016-07-26 at 21:35:11 +0200, Vadim Kochan <vadi...@gmail.com> wrote: > > > +static inline unsigned int field_

[netsniff-ng] Re: [PATCH 13/15] trafgen: parser: Add support of 'dinc' function for proto fields

2016-08-06 Thread Tobias Klauser
On 2016-08-06 at 00:43:56 +0200, Vadim Kochan <vadi...@gmail.com> wrote: > On Wed, Aug 03, 2016 at 04:32:06PM +0200, Tobias Klauser wrote: > > On 2016-07-26 at 21:35:18 +0200, Vadim Kochan <vadi...@gmail.com> wrote: > > > +static void proto_field_func_setup(str

[netsniff-ng] Re: [PATCH v3 2/3] netsniff-ng: Allow compile without libnl

2016-08-05 Thread Tobias Klauser
On 2016-08-04 at 18:30:19 +0200, Vadim Kochan wrote: > There is reason to do not install libnl-xxx packages just > for sniffing packets, for example if netsniff-ng will be compiled > on embedded or switch system. > > Hide libnl depended code if CONFIG_LIBNL=0. > > In case if

[netsniff-ng] Re: [PATCH v3 1/3] trafgen: Allow to compile without libnl

2016-08-05 Thread Tobias Klauser
On 2016-08-04 at 18:30:18 +0200, Vadim Kochan wrote: > trafgen uses libnl only to inject mac80211 frames but > it might be not needed in some embedded or switch environments, > so lets make possible to disable this feature. > > In case if --rfraw option will be used - user

[netsniff-ng] Re: [PATCH v3 3/3] configure: Add option to compile tools without libnl dependency

2016-08-05 Thread Tobias Klauser
On 2016-08-04 at 18:30:20 +0200, Vadim Kochan wrote: > Add command line parsing function which allows to compile tools > (trafgen, netsniff-ng) without libnl-xxx libraries. But it does in its current state not allow to compile netsniff-ng/trafgen without libnl if libnl is not

[netsniff-ng] Re: [PATCH 06/15] trafgen: proto: Randomize proto field at runtime

2016-08-05 Thread Tobias Klauser
On 2016-07-26 at 21:35:11 +0200, Vadim Kochan wrote: > Add dynamic proto field function which can generate > random value in specified range (default 0 - MAX_UINT32). > > Signed-off-by: Vadim Kochan > --- > trafgen_proto.c | 29

[netsniff-ng] Re: [PATCH v2 0/3] build: Allow compile trafgen & netsniff-ng without libnl

2016-08-04 Thread Tobias Klauser
On 2016-08-03 at 10:58:00 +0200, Vadim Kochan wrote: > It might be useful only if to compile trafgen or netsniff-ng in environment > (or manually w/o needs for rfraw) where is no needed libnl (embedded/switch > server), > and it would be good to have ability to disable libnl

[netsniff-ng] Re: [PATCH 13/15] trafgen: parser: Add support of 'dinc' function for proto fields

2016-08-03 Thread Tobias Klauser
On 2016-07-26 at 21:35:18 +0200, Vadim Kochan wrote: > Add 'dinc()' function in 'field_expr' rules to be used for dynamically > incrementing of any specified field: > > SYNTAX := dinc() | dinc(inc) | dinc(min, max) | dinc(inc, min, max) This should definitely follow the same

[netsniff-ng] Re: [PATCH 05/15] trafgen: proto: Increment proto field at runtime

2016-08-03 Thread Tobias Klauser
On 2016-07-26 at 21:35:10 +0200, Vadim Kochan wrote: > Extended 'struct packet_dyn' with proto fields which has > dynamically changing values at runtime. > > Implement incrementing of proto field at runtime with min & max > parameters, by default if the 'min' parameter is not

[netsniff-ng] Re: [PATCH 04/15] trafgen: proto: Force field id to be index in array

2016-08-03 Thread Tobias Klauser
On 2016-08-02 at 22:26:28 +0200, Vadim Kochan wrote: > Yes, bug_on(x) is good point, so I am expecting you will continue > review the rest patches ? Yes -- You received this message because you are subscribed to the Google Groups "netsniff-ng" group. To unsubscribe from

[netsniff-ng] Re: [PATCH 1/3] trafgen: Allow to compile without libnl

2016-08-03 Thread Tobias Klauser
On 2016-08-02 at 22:17:41 +0200, Vadim Kochan <vadi...@gmail.com> wrote: > On Tue, Aug 2, 2016 at 11:23 AM, Tobias Klauser <tklau...@distanz.ch> wrote: > > On 2016-07-31 at 23:13:16 +0200, Vadim Kochan <vadi...@gmail.com> wrote: > >> trafgen uses

[netsniff-ng] Re: [PATCH 04/15] trafgen: proto: Force field id to be index in array

2016-08-02 Thread Tobias Klauser
On 2016-07-26 at 21:35:09 +0200, Vadim Kochan wrote: > Usually proto fields array is sorted in the same order as related enum, > so id may be used as index for faster lookup, it will make > csum field calculation little faster at runtime. > > Signed-off-by: Vadim Kochan

[netsniff-ng] Re: [PATCH 03/15] trafgen: proto: Move proto headers into packet

2016-08-02 Thread Tobias Klauser
On 2016-07-26 at 21:35:08 +0200, Vadim Kochan wrote: > Till now headers were used only for packet creation at compile time > only, which does not allow to handle dynamic fields update at runtime. > It needs that proto_hdr entries will be not freed after compile is done. > >

[netsniff-ng] Re: [PATCH 02/15] trafgen: proto: Reference to packet from proto_hdr struct

2016-08-02 Thread Tobias Klauser
On 2016-07-26 at 21:35:07 +0200, Vadim Kochan wrote: > Using of current_packet() is not relevant for dynamically updated > fields so lets keep packet index in proto_hdr struct. > > Signed-off-by: Vadim Kochan Applied, thanks! -- You received this message

[netsniff-ng] Re: [PATCH 3/3] configure: Add option to compile tools without libnl dependency

2016-08-02 Thread Tobias Klauser
On 2016-07-31 at 23:13:18 +0200, Vadim Kochan wrote: > Add command line parsing function which allows to compile tools (trafgen, > netsniff-ng) > without libnl-xxx libraries. > > Option --no-libnl sets CONFIG_NO_LIBNL=1. > > Signed-off-by: Vadim Kochan >

[netsniff-ng] Re: [PATCH 1/3] trafgen: Allow to compile without libnl

2016-08-02 Thread Tobias Klauser
On 2016-07-31 at 23:13:16 +0200, Vadim Kochan wrote: > trafgen uses libnl only to inject mac80211 frames but > it might be not needed in some embedded or switch environments, > so lets make possible to disable this feature. > > In case if --rfraw option will be used - user

Re: [netsniff-ng] [PATCH] netsniff-ng: account skipped packets as 'seen' and 'dropped'

2016-07-29 Thread Tobias Klauser
On 2016-07-27 at 15:59:08 +0200, Paolo Abeni wrote: > The packets filtered out due to pkt_type are incoming packets > effectively dropped and should be accounted as such. > This patch explicitly accounts the skipped packets number in > skip_packet() and add such number to the

Re: [netsniff-ng] [PATCH 01/15] trafgen: Move applying dynamic elements to function

2016-07-27 Thread Tobias Klauser
On 2016-07-26 at 21:35:06 +0200, Vadim Kochan wrote: > Same code for applying dynamic elements is used in both places > for slow & fast path modes, lets move them into one inlined function. > > Signed-off-by: Vadim Kochan Applied, thanks. -- You received

Re: [netsniff-ng] Re: [PATCH 00/15] trafgen: Support dinc & drnd for proto fields

2016-07-27 Thread Tobias Klauser
Nice work Vadim! This looks good from a bird's-eye view, but due to the size of the changes it will probably take me some time to review it completely and give you feedback (with the exception of patch 1/15 which is a no-brainer and I already applied it). On 2016-07-27 at 13:04:45 +0200, Vadim

  1   2   3   >