[netsniff-ng] [PATCH] mz: Dont bind to dev if help was specified

2015-02-20 Thread Vadim Kochan
Fixed warnings: Warning: [lookupdev.c get_dev_params()] Cannot open socket! when specify help for packet type: # mz -t tcp help Also fixes delayed output of the same command if user is root. Signed-off-by: Vadim Kochan vadi...@gmail.com --- staging/mausezahn.c | 18

[netsniff-ng] [PATCH] netsniff: Allow filter input pcap file to output pcap

2015-01-26 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com It might be useful to filter out interesting traffic from input pcap to output pcap file which will contain only filtered packets: $ netsniff-ng -i input.pcap -o output.pcap ip src 192.168.1.198 Now it is possible by specifying output pcap file

[netsniff-ng] which code style use for mz?

2015-02-19 Thread Vadim Kochan
Hi All, I am trying to make some changes to mz and mz has the really (for me) specific code style, so which code style should I use ? I suppose it should be kernel style coding ? Thanks, -- You received this message because you are subscribed to the Google Groups netsniff-ng group. To

[netsniff-ng] [PATCH] mz cli: Make pcap init funcs thread safer

2015-03-22 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com mz fails start in cli mode and prints each time different pcap errors: $ mz -x -V fatal flex scanner internal error--end of buffer missed rx_arp: [ERROR] Error calling pcap_compile or simply shutdowns. Sometimes it successfully gets

[netsniff-ng] [RFC] trafgen: Alloc cpus regarding to number of packets

2015-03-24 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Trafgen uses all the online cpus even if number of packets specified by -n is less than numbers of selected cpus. Such behaviour leads to issues: - trafgen re-calculates number of packets per cpu which leads to rounding it to 0 then no packets

[netsniff-ng] Re: [PATCH] mz cli: Make pcap init funcs thread safer

2015-03-30 Thread Vadim Kochan
On Sun, Mar 22, 2015 at 01:48:50PM +0200, Vadim Kochan wrote: From: Vadim Kochan vadi...@gmail.com mz fails start in cli mode and prints each time different pcap errors: $ mz -x -V fatal flex scanner internal error--end of buffer missed rx_arp: [ERROR] Error calling

[netsniff-ng] [PATCH] trafgen: Alloc cpus according to specified number of packets

2015-03-31 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Trafgen uses all the online cpus even if number of packets specified by -n is less than numbers of selected cpus. Such behaviour leads to issues: - trafgen re-calculates number of packets per cpu which leads to rounding it to 0 then no packets

Re: [netsniff-ng] trafgen seems broken on kernel 3.19

2015-03-23 Thread Vadim Kochan
On Mon, Mar 23, 2015 at 02:03:54PM +0200, Vadim Kochan wrote: On Mon, Mar 23, 2015 at 01:07:24PM +0200, Vadim Kochan wrote: On Mon, Mar 23, 2015 at 12:12:54PM +0100, Daniel Borkmann wrote: On 03/23/2015 11:37 AM, Vadim Kochan wrote: On Mon, Mar 23, 2015 at 11:25:26AM +0100, Lorenzo

Re: [netsniff-ng] trafgen seems broken on kernel 3.19

2015-03-23 Thread Vadim Kochan
On Mon, Mar 23, 2015 at 12:12:54PM +0100, Daniel Borkmann wrote: On 03/23/2015 11:37 AM, Vadim Kochan wrote: On Mon, Mar 23, 2015 at 11:25:26AM +0100, Lorenzo Pistone wrote: ... Thats what I got on 3.18 with the same cfg file: $ trafgen/trafgen -c ~/trafgen.cfg -o wlp3s0 -n 1 4

Re: [netsniff-ng] trafgen seems broken on kernel 3.19

2015-03-23 Thread Vadim Kochan
On Mon, Mar 23, 2015 at 11:25:26AM +0100, Lorenzo Pistone wrote: I was hoping you could give me debugging tips. I checked all I could (dmesg, echo 1 rp_filter, strace -f), and I couldn't see anything suspicious. I have nothing in my iptables or tc, and tso is off.The exact command line is

Re: [netsniff-ng] trafgen seems broken on kernel 3.19

2015-03-23 Thread Vadim Kochan
On Mon, Mar 23, 2015 at 01:07:24PM +0200, Vadim Kochan wrote: On Mon, Mar 23, 2015 at 12:12:54PM +0100, Daniel Borkmann wrote: On 03/23/2015 11:37 AM, Vadim Kochan wrote: On Mon, Mar 23, 2015 at 11:25:26AM +0100, Lorenzo Pistone wrote: ... Thats what I got on 3.18 with the same cfg file

[netsniff-ng] Re: [PATCH] mz: Allow to print packet types by '-t help'

2015-02-28 Thread Vadim Kochan
On Mon, Feb 23, 2015 at 02:11:57PM +0200, Vadim Kochan wrote: From: Vadim Kochan vadi...@gmail.com Changed to print packet types by '-t help' earlier bofore mz will try to identify link device to bind. Signed-off-by: Vadim Kochan vadi...@gmail.com --- Hi, Just pinging about this patch

[netsniff-ng] [PATCH] mz: Add igmp v1/v2 packet type crafting support

2015-03-02 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Signed-off-by: Vadim Kochan vadi...@gmail.com --- staging/layer3.c| 20 +-- staging/layer4.c| 101 staging/mausezahn.c | 28 +-- staging/mz.h| 38

[netsniff-ng] [PATCH] mz: Allow to print packet types by '-t help'

2015-02-23 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Changed to print packet types by '-t help' earlier bofore mz will try to identify link device to bind. Signed-off-by: Vadim Kochan vadi...@gmail.com --- mausezahn.8 | 2 +- staging/mausezahn.c | 138

[netsniff-ng] [PATCH] geoip: Fix update failing

2015-01-29 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com I have no enough arguments for this fix but it fixes the failing of geoip updating. Seems shutdown(..) closes socket too early. So shutdown(...) is removed and added Connection: close http header which says http server to close connection after response

[netsniff-ng] [PATCH] netsniff: Dump basic radiotap header info

2015-04-20 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Signed-off-by: Vadim Kochan vadi...@gmail.com --- proto_80211_mac_hdr.c | 9 + str.c | 8 str.h | 1 + 3 files changed, 18 insertions(+) diff --git a/proto_80211_mac_hdr.c b/proto_80211_mac_hdr.c index 9bd6ee1

[netsniff-ng] [PATCH] netsniff: Del rfmon mac80211 dev in case of panic

2015-04-20 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com netsniff does not delete created rfmon device in case of panic (for example - bad pcap filter expression), so added ability to add callback func when panic will be happen and delete rfmon device. Signed-off-by: Vadim Kochan vadi...@gmail.com

[netsniff-ng] [PATCH] mac80211: Check existing of generated monX device

2015-04-20 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Fixed case when netsniff fails if there is already existing monX device while generating. Signed-off-by: Vadim Kochan vadi...@gmail.com --- dev.c | 15 --- dev.h | 1 + mac80211.c | 4 3 files changed, 17 insertions(+), 3

[netsniff-ng] Re: [PATCH] netsniff: Dump basic radiotap header info

2015-04-21 Thread Vadim Kochan
On Tue, Apr 21, 2015 at 03:24:33PM +0200, Tobias Klauser wrote: On 2015-04-20 at 13:51:40 +0200, Vadim Kochan vadi...@gmail.com wrote: From: Vadim Kochan vadi...@gmail.com Please always add a short description, even if it's restating what subject already says. I added one for this. Also

[netsniff-ng] Re: [PATCH] netsniff-ng: Show packet number

2015-04-25 Thread Vadim Kochan
On Thu, Apr 23, 2015 at 02:24:16PM +0300, Vadim Kochan wrote: static inline void __show_frame_hdr(uint8_t *packet, size_t len, int linktype, struct sockaddr_ll *s_ll, void *raw_hdr, - int mode, bool v3

[netsniff-ng] [PATCH] netsniff-ng: Seems typo in getting current group id

2015-04-22 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Changed to use ctx-gid when call getgid() on init_ctx. Signed-off-by: Vadim Kochan vadi...@gmail.com --- netsniff-ng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netsniff-ng.c b/netsniff-ng.c index c0d70c8..4ad8b19 100644

[netsniff-ng] [PATCH] iosched: Print error cause if setting io prio failed

2015-04-22 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Add error cause message when ioprio_setpid fails. Signed-off-by: Vadim Kochan vadi...@gmail.com --- iosched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iosched.c b/iosched.c index 7417973..ff82126 100644 --- a/iosched.c +++ b

Re: [netsniff-ng] netsniff-ng: Do we need to set IO prio when do only read from pcap ?

2015-04-22 Thread Vadim Kochan
On Wed, Apr 22, 2015 at 05:02:52PM +0200, Daniel Borkmann wrote: On 04/22/2015 05:00 PM, Vadim Kochan wrote: Hi, It is not possible to just read pcap by netsniff-ng if user permissions does not allow to set processes IO prio, so it is really needed to do it just for print pcap file

[netsniff-ng] netsniff-ng: Do we need to set IO prio when do only read from pcap ?

2015-04-22 Thread Vadim Kochan
Hi, It is not possible to just read pcap by netsniff-ng if user permissions does not allow to set processes IO prio, so it is really needed to do it just for print pcap file ? Thanks, Vadim Kochan -- You received this message because you are subscribed to the Google Groups netsniff-ng group

Re: [netsniff-ng] netsniff-ng: Do we need to set IO prio when do only read from pcap ?

2015-04-22 Thread Vadim Kochan
On Wed, Apr 22, 2015 at 05:37:42PM +0200, Daniel Borkmann wrote: On 04/22/2015 05:09 PM, Vadim Kochan wrote: ... Sure, I will try to fix it, really I dont have a fix yet. The issue goes from pcap ops in init one function, where IO prio is set, the first think which came up in my mind

Re: [netsniff-ng] netsniff-ng: Do we need to set IO prio when do only read from pcap ?

2015-04-22 Thread Vadim Kochan
On Wed, Apr 22, 2015 at 05:37:42PM +0200, Daniel Borkmann wrote: On 04/22/2015 05:09 PM, Vadim Kochan wrote: ... Sure, I will try to fix it, really I dont have a fix yet. The issue goes from pcap ops in init one function, where IO prio is set, the first think which came up in my mind

[netsniff-ng] [PATCH] netsniff-ng: Dont set IO prio when reading pcap file

2015-04-22 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com It allows to read pcap file for users who have no permissions to set process IO prio. Signed-off-by: Vadim Kochan vadi...@gmail.com --- netsniff-ng.c | 6 +++--- pcap_io.h | 2 +- pcap_mm.c | 5 +++-- pcap_rw.c | 5 +++-- pcap_sg.c | 5

[netsniff-ng] [PATCH] netsniff-ng nlmsg: Print netlink protocol name

2015-04-24 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com nlmsg proto handler can't identify Netlink protocol from nlmsghdr, so sockaddr_ll can be used to get it. Also renamed [proto - handler] member in pkt_buff struct, which is more understandable. Example: U nlmon0 4756 1429891435s.14505747ns [ NLMSG Proto 0

[netsniff-ng] netsniff-ng: mac80211: Better print layout for HT Capabilities element ?

2015-04-22 Thread Vadim Kochan
(0), Ant Indic Feedb Cap (0), Rec ASEL Cap (0), Transm Sound PPDUs Cap (0), Res (0x0) Reserved (21, Len (110)): Failed to dissect Subtype ] Regards, Vadim Kochan -- You received this message because you

Re: [netsniff-ng] netsniff-ng: mac80211: Better print layout for HT Capabilities element ?

2015-04-23 Thread Vadim Kochan
On Thu, Apr 23, 2015 at 12:05:55AM +0200, Daniel Borkmann wrote: On 04/22/2015 11:50 PM, Vadim Kochan wrote: ... I think that HT Capabilities element info should be showed in more structured view so it will be more readable what do you think ? Does someone have a better option ? Yes

[netsniff-ng] [PATCH] netsniff-ng mac80211: Print HT Capabilities more structurd

2015-04-23 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Now it looks like: [ Subtype Beacon: Timestamp 0x74c5c180, Beacon Interval (0.102400s), Capabilities (0x431 - ESS; Privacy; Short Preamble; Short Slot Time;) Parameters: SSID (0, Len (6)): D07F82 Supp. Rates

[netsniff-ng] [PATCH] netsniff-ng: Show packet number

2015-04-23 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com ? 100 1429707903s.33856000ns (#1) [ Radiotap Version (0), Length (26), Flags (0x482f) ] [ 802.11 Frame Control (0x0040)] [ Proto Version (0), Type (0, Management), Duration (0), Destination (ff:ff:ff:ff:ff:ff) Source (00:23:14:da:1c:fc

Re: [netsniff-ng] [PATCH] mac80211: Check existing of generated monX device

2015-04-21 Thread Vadim Kochan
On Tue, Apr 21, 2015 at 12:30:07PM +0200, Daniel Borkmann wrote: Hi Vadim, On 04/17/2015 09:04 PM, Vadim Kochan wrote: From: Vadim Kochan vadi...@gmail.com Fixed case when netsniff fails if there is already existing monX device while generating. Signed-off-by: Vadim Kochan vadi

[netsniff-ng] Re: [PATCH] netsniff-ng nlmsg: Print type for NETLINK_ROUTE

2015-04-28 Thread Vadim Kochan
On Mon, Apr 27, 2015 at 04:29:40PM +0300, Vadim Kochan wrote: From: Vadim Kochan vadi...@gmail.com Print nlmsg type name for rtnetlink messages Signed-off-by: Vadim Kochan vadi...@gmail.com --- proto_nlmsg.c | 84 +-- 1 file

[netsniff-ng] [PATCH] netsniff-ng: Fix capturing extra packets from other dev

2015-04-29 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com It might be related to the issue #73 noticed by Jon Schipp jonsch...@gmail.com where he pointed that netsniff-ng captures some extra packets. I observed this issue when I captured few Ethernet frames from wireless device while I was sniffing Netlink

[netsniff-ng] [PATCH] netsniff-ng: Fix capturing extra packets from other dev

2015-04-29 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com It might be related to the issue #73 noticed by Jon Schipp jonsch...@gmail.com where he pointed that netsniff-ng captures some extra packets. I observed this issue when I captured few Ethernet frames from wireless device while I was sniffing Netlink

[netsniff-ng] [PATCH v3] netsniff-ng nlmsg: Print type for NETLINK_ROUTE

2015-05-02 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Print nlmsg type name for rtnetlink messages Signed-off-by: Vadim Kochan vadi...@gmail.com --- proto_nlmsg.c | 89 +-- 1 file changed, 87 insertions(+), 2 deletions(-) diff --git a/proto_nlmsg.c b

Re: [netsniff-ng] [PATCH] netsniff-ng: Fix capturing extra packets from other dev

2015-05-03 Thread Vadim Kochan
On Sat, May 02, 2015 at 07:00:53PM +0200, Tobias Klauser wrote: On 2015-04-29 at 21:18:24 +0200, Vadim Kochan vadi...@gmail.com wrote: From: Vadim Kochan vadi...@gmail.com It might be related to the issue #73 noticed by Jon Schipp jonsch...@gmail.com where he pointed

[netsniff-ng] [PATCH] trafgen: Del rfmon mac80211 device on panic

2015-05-03 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Fixed case when rfmon mac80211 created device remains after trafgen failed (for ex. - incorrect cfg file), so just delete it when panic occured. Also made panic handlers invoking per process and only once. Signed-off-by: Vadim Kochan vadi...@gmail.com

[netsniff-ng] [PATCH] die: Rename panic func - panic handler

2015-05-04 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Rename xxx_panic_func(s) to xxx_panic_handler(s) which is more understandable than 'func'. Signed-off-by: Vadim Kochan vadi...@gmail.com --- die.c | 4 ++-- die.h | 8 netsniff-ng.c | 2 +- trafgen.c | 2 +- 4 files changed, 8

[netsniff-ng] Re: [PATCH] die: Rename panic func - panic handler

2015-05-04 Thread Vadim Kochan
On Mon, May 04, 2015 at 11:11:21AM +0300, Vadim Kochan wrote: From: Vadim Kochan vadi...@gmail.com Rename xxx_panic_func(s) to xxx_panic_handler(s) which is more understandable than 'func'. Signed-off-by: Vadim Kochan vadi...@gmail.com --- die.c | 4 ++-- die.h | 8

[netsniff-ng] [PATCH] netsniff-ng nlmsg: Print more fields in less mode

2015-05-04 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Print similar header fields in less mode as it is done in full mode. Signed-off-by: Vadim Kochan vadi...@gmail.com --- proto_nlmsg.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/proto_nlmsg.c b

[netsniff-ng] tprintf breaks color terminal sequence

2015-05-04 Thread Vadim Kochan
this issue before making a next release, or if you can make a fast fix :-) 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

Re: [netsniff-ng] multiple instances of netsniff-ng with AF_PACKET hash fanout

2015-05-01 Thread Vadim Kochan
or time interval then netsniff-ng creates another subdir and switches there, then you can you probably can collect the captured files from these subdirectories ... well I hope my explanation is basically clear ... sorry if you did not understand my poor English:) Regards, Vadim Kochan -- You

[netsniff-ng] Re: [PATCH] netsniff-ng nlmsg: Print type for NETLINK_ROUTE

2015-04-28 Thread Vadim Kochan
On Mon, Apr 27, 2015 at 04:29:40PM +0300, Vadim Kochan wrote: From: Vadim Kochan vadi...@gmail.com Print nlmsg type name for rtnetlink messages Signed-off-by: Vadim Kochan vadi...@gmail.com --- proto_nlmsg.c | 84 +-- 1 file

[netsniff-ng] Re: [PATCH] netsniff-ng nlmsg: Print type for NETLINK_ROUTE

2015-04-28 Thread Vadim Kochan
On Tue, Apr 28, 2015 at 01:27:19PM +0300, Vadim Kochan wrote: On Mon, Apr 27, 2015 at 04:29:40PM +0300, Vadim Kochan wrote: From: Vadim Kochan vadi...@gmail.com Print nlmsg type name for rtnetlink messages Signed-off-by: Vadim Kochan vadi...@gmail.com --- proto_nlmsg.c | 84

[netsniff-ng] [PATCH v2] netsniff-ng: Show packet number

2015-04-27 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com wlp3s0 107 1430159373s.693002029ns (#5) [ Eth MAC (6c:88:14:ac:51:e4 = 10:fe:ed:90:22:12), Proto (0x0800, IPv4) ] Signed-off-by: Vadim Kochan vadi...@gmail.com --- dissector.h | 18 +++--- netsniff-ng.c | 13 - 2 files changed

Re: [netsniff-ng] multiple instances of netsniff-ng with AF_PACKET hash fanout

2015-04-30 Thread Vadim Kochan
in specified directory and at the end after all children done then the main netsniff-ng will merge these files into one, and remove the files which were generated by children... Just thoughts ... Regards, Vadim Kochan -- You received this message because you are subscribed to the Google Groups

Re: [netsniff-ng] netsniff-ng: wireshark does not understand pcap file with Netlink frames

2015-05-06 Thread Vadim Kochan
On Tue, May 05, 2015 at 01:13:04PM +0200, Daniel Borkmann wrote: On 05/05/2015 12:59 PM, Vadim Kochan wrote: Wireshark does not understand netsniff-ng's pcap file with Netlink frames, I assume thats because W-shark expects that each Netlink frame should have additional header on-top described

Re: [netsniff-ng] [PATCH] netsniff-ng: Fix capturing extra packets from other dev

2015-05-05 Thread Vadim Kochan
On Tue, May 05, 2015 at 04:39:51PM +0200, Daniel Borkmann wrote: On 05/05/2015 12:10 PM, Daniel Borkmann wrote: On 05/05/2015 11:26 AM, Tobias Klauser wrote: On 2015-05-02 at 22:54:50 +0200, Vadim Kochan vadi...@gmail.com wrote: On Sat, May 02, 2015 at 07:00:53PM +0200, Tobias Klauser wrote

[netsniff-ng] netsniff-ng: Regular user can't read pcap which was created by root

2015-05-06 Thread Vadim Kochan
to open the file w/o admin permissions ? 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...@googlegroups.com. For more options

[netsniff-ng] [PATCH] netsniff-ng: Open pcap w/o O_NOATIME on 2nd try

2015-05-07 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com If the file open fails with O_NOATIME option then try to open it w/o this option in case if the user does not have enough prvileges to use O_NOATIME. It fixes the case when user made pcap file in sudo mode but after it should still use sudo to read it because

[netsniff-ng] [PATCH] authors: Fix Daniel's email

2015-05-07 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Use actual Daniel's borkm...@iogearbox.net email. Signed-off-by: Vadim Kochan vadi...@gmail.com --- AUTHORS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index ec95d91..f9471db 100644 --- a/AUTHORS +++ b/AUTHORS

[netsniff-ng] [PATCH] netsniff-ng: Do not use O_NOATIME when read pcap

2015-05-06 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com It fixes the case when user made pcap file in sudo mode but after it should still use sudo to read it because of setting O_NOATIME option requires higher privileges. Signed-off-by: Vadim Kochan vadi...@gmail.com --- netsniff-ng.c | 2 +- 1 file changed, 1

[netsniff-ng] [PATCH] netsniff-ng: Fix color breaking in less mode

2015-05-05 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Automatic new line indentation can break terminal ESC color sequence by inserting new line within it. Fixed by considering that color ESC sequence is not closed by 'm' and only after it is closed - print new line with spaces. Signed-off-by: Vadim Kochan vadi

[netsniff-ng] [PATCH] sock: Fix capturing extra packets from other dev

2015-05-05 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Create PF socket with proto=0 which does not setup packet handler and will not capture packets until bind() will be invoked. Also replaced pf_tx_socket by pf_socket as these funcs became the same, as proto arg is set to 0. Suggested-by: Daniel Borkmann borkm

Re: [netsniff-ng] [PATCH] netsniff-ng: Fix capturing extra packets from other dev

2015-05-05 Thread Vadim Kochan
On Tue, May 05, 2015 at 04:39:51PM +0200, Daniel Borkmann wrote: On 05/05/2015 12:10 PM, Daniel Borkmann wrote: On 05/05/2015 11:26 AM, Tobias Klauser wrote: On 2015-05-02 at 22:54:50 +0200, Vadim Kochan vadi...@gmail.com wrote: On Sat, May 02, 2015 at 07:00:53PM +0200, Tobias Klauser wrote

Re: [netsniff-ng] [PATCH] netsniff-ng nlmsg: Print more fields in less mode

2015-05-05 Thread Vadim Kochan
On Tue, May 05, 2015 at 11:48:55AM +0200, Tobias Klauser wrote: On 2015-05-05 at 11:43:03 +0200, Vadim Kochan vadi...@gmail.com wrote: On Tue, May 05, 2015 at 11:20:42AM +0200, Tobias Klauser wrote: On 2015-05-04 at 11:32:33 +0200, Vadim Kochan vadi...@gmail.com wrote: From: Vadim Kochan

Re: [netsniff-ng] tprintf breaks color terminal sequence

2015-05-05 Thread Vadim Kochan
On Tue, May 05, 2015 at 12:10:54PM +0200, Tobias Klauser wrote: On 2015-05-04 at 19:16:39 +0200, Vadim Kochan vadi...@gmail.com wrote: Hi, In less mode (netsniff-ng -i dev --less) the color ESC terminal sequences can be broken by automatic indentation made in tprintf.c

Re: [netsniff-ng] [PATCH] netsniff-ng nlmsg: Print more fields in less mode

2015-05-05 Thread Vadim Kochan
On Tue, May 05, 2015 at 11:20:42AM +0200, Tobias Klauser wrote: On 2015-05-04 at 11:32:33 +0200, Vadim Kochan vadi...@gmail.com wrote: From: Vadim Kochan vadi...@gmail.com Print similar header fields in less mode as it is done in full mode. In my opinion it's fine as it is now and I'd

[netsniff-ng] [PATCH] netsniff-ng nlmsg: Print family type in less mode

2015-05-05 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Print 'Family' and 'Type' (considering family) fields in less mode. Signed-off-by: Vadim Kochan vadi...@gmail.com --- proto_nlmsg.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/proto_nlmsg.c b/proto_nlmsg.c index e8706a2

[netsniff-ng] netsniff-ng: wireshark does not understand pcap file with Netlink frames

2015-05-05 Thread Vadim Kochan
Wireshark does not understand netsniff-ng's pcap file with Netlink frames, I assume thats because W-shark expects that each Netlink frame should have additional header on-top described here: http://www.tcpdump.org/linktypes/LINKTYPE_NETLINK.html it shows this is a Netlink type link but

Re: [netsniff-ng] [RFC] netsniff-ng: Add support of pcap cooked header

2015-05-13 Thread Vadim Kochan
On Wed, May 13, 2015 at 11:08:01AM +0200, Daniel Borkmann wrote: On 05/10/2015 02:37 PM, Vadim Kochan wrote: From: Vadim Kochan vadi...@gmail.com Since Netlink messages are written in default pcap format there is no way to identify Netlink family by socket protocol number, so use pcap

Re: [netsniff-ng] [RFC] netsniff-ng: Add support of pcap cooked header

2015-05-13 Thread Vadim Kochan
On Wed, May 13, 2015 at 12:18:37PM +0300, Vadim Kochan wrote: On Wed, May 13, 2015 at 11:08:01AM +0200, Daniel Borkmann wrote: On 05/10/2015 02:37 PM, Vadim Kochan wrote: From: Vadim Kochan vadi...@gmail.com Since Netlink messages are written in default pcap format there is no way

[netsniff-ng] [PATCH] netsniff-ng nlmsg: Print multi-part messages

2015-05-13 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Pull print more Netlink messages from one packet which can be sent with MULTI flag. Signed-off-by: Vadim Kochan vadi...@gmail.com --- proto_nlmsg.c | 52 +--- 1 file changed, 37 insertions(+), 15 deletions

[netsniff-ng] [PATCH v2] netsniff-ng nlmsg: Print multi-part messages

2015-05-18 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Pull print more Netlink messages from one packet which can be sent with MULTI flag. Signed-off-by: Vadim Kochan vadi...@gmail.com --- proto_nlmsg.c | 44 ++-- 1 file changed, 30 insertions(+), 14 deletions(-) diff

[netsniff-ng] [PATCH] netsniff-ng nlmsg: Dissect rtnl link type messages

2015-05-18 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Dump RTnetlink interface related info with attributes. Signed-off-by: Vadim Kochan vadi...@gmail.com --- netsniff-ng/Makefile | 2 + proto_nlmsg.c| 232 +++ 2 files changed, 234 insertions(+) diff

[netsniff-ng] [PATCH] netsniff: Fix process name when sniff nlmon device

2015-04-07 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com While sniffing nlmon device the procness name can be printed with non-letter characters because readlink does not put line ending '\0' Signed-off-by: Vadim Kochan vadi...@gmail.com --- proto_nlmsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[netsniff-ng] [PATCH v2] netsniff-ng nlmsg: Dissect rtnl link type messages

2015-05-19 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Dump RTnetlink interface related info with attributes. Signed-off-by: Vadim Kochan vadi...@gmail.com --- netsniff-ng/Makefile | 2 + proto_nlmsg.c| 233 +++ 2 files changed, 235 insertions(+) diff

[netsniff-ng] [PATCH] netsniff-ng mac80211: Align country channels info

2015-05-20 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Print each country channel info on separated line to make it more readable: IE: Country (7, Len(66)): Country String: US First Ch Nr: 36, Nr of Ch: 1, Max Transmit Pwr Lvl: 24 First Ch Nr: 40, Nr of Ch: 1, Max Transmit Pwr Lvl: 24

Re: [netsniff-ng] [PATCH] netsniff-ng: Add support of pcap cooked header

2015-06-02 Thread Vadim Kochan
On Tue, Jun 02, 2015 at 10:51:01AM +0200, Daniel Borkmann wrote: On 06/02/2015 10:44 AM, Vadim Kochan wrote: On Tue, Jun 02, 2015 at 10:36:12AM +0200, Daniel Borkmann wrote: On 06/01/2015 05:43 PM, Vadim Kochan wrote: On Mon, Jun 01, 2015 at 05:14:10PM +0200, Daniel Borkmann wrote: On 06/01

Re: [netsniff-ng] [PATCH] netsniff-ng: Add support of pcap cooked header

2015-06-02 Thread Vadim Kochan
On Tue, Jun 02, 2015 at 10:36:12AM +0200, Daniel Borkmann wrote: On 06/01/2015 05:43 PM, Vadim Kochan wrote: On Mon, Jun 01, 2015 at 05:14:10PM +0200, Daniel Borkmann wrote: On 06/01/2015 04:23 PM, Vadim Kochan wrote: ... I checked that in this case Ethernet Netlink frames will be mixed

[netsniff-ng] netsniff-ng: Is it needed to handle SIGSEGV when using sudo ?

2015-06-03 Thread Vadim Kochan
HI, I was faced with case when netsniff-ng silently was killed by SIGSEGV but w/o message, I investigated that it was caused by 'sudo' which seems for me somehow aborts this signal, but registering the SIGSEGV handler (which printed the expected Segmentation fault message) in netsniff-ng fixed

Fwd: [netsniff-ng] error when running trafgen for the first time.

2015-06-05 Thread Vadim Kochan
CC to Perf Tech -- Forwarded message -- From: Vadim Kochan vadi...@gmail.com Date: Thu, Jun 4, 2015 at 11:11 PM Subject: Re: [netsniff-ng] error when running trafgen for the first time. To: netsniff-ng@googlegroups.com On Wed, Jun 3, 2015 at 7:05 PM, Perf Tech perfte

Re: [netsniff-ng] error when running trafgen for the first time.

2015-06-05 Thread Vadim Kochan
On Fri, Jun 05, 2015 at 03:04:24PM -0700, Perf Tech wrote: Sorry, I meant to say I got the following. I am stuck with syntax errors :-( # ./trafgen --dev eth0 --conf tmp2.txt --rand --gap 1000us --cpp Syntax error at line6, at char 't'! syntax error, unexpected number! # ./trafgen --dev eth0

Re: Fwd: [netsniff-ng] error when running trafgen for the first time.

2015-06-05 Thread Vadim Kochan
On Sat, Jun 06, 2015 at 12:27:46AM +0200, Daniel Borkmann wrote: On 06/06/2015 12:16 AM, Vadim Kochan wrote: ... Do you have cpp installed on your machine? I think in that case there could be a message like: sh: cpp: command not found Failed to invoke C preprocessor! Yes, agreed. Want

Re: Fwd: [netsniff-ng] error when running trafgen for the first time.

2015-06-05 Thread Vadim Kochan
On Sat, Jun 06, 2015 at 12:08:58AM +0200, Daniel Borkmann wrote: On 06/06/2015 12:02 AM, Perf Tech wrote: Thanks Guys for the reply. The following is what I got, any idea why? # ./trafgen --dev eth0 --conf tmp2.txt --rand --gap 1000us --cpp Syntax error at line6, at char 't'! syntax error,

Re: [netsniff-ng] error when running trafgen for the first time.

2015-06-05 Thread Vadim Kochan
On Fri, Jun 05, 2015 at 03:31:30PM -0700, Perf Tech wrote: Did that but still get the same problem. # ls /etc/netsniff-ng/ rules trafgen_stddef.h It should be as stddef.h in /etc/netsniff-ng -- You received this message because you are subscribed to the Google Groups netsniff-ng group.

[netsniff-ng] [PATCH] netsniff-ng nlmsg: Dissect rtnl route type messages

2015-06-04 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Dump RTnetlink routing related info with attributes. Signed-off-by: Vadim Kochan vadi...@gmail.com --- proto_nlmsg.c | 227 ++ timer.c | 6 ++ timer.h | 2 + 3 files changed, 222

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

2015-06-18 Thread Vadim Kochan
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 let know if I will have some real ideas regarding implementation. Sounds good! Some 1st though which I came up is may

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 (unlikely(hdr

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, couple

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 till 'diff

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 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, couple

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

2015-06-21 Thread Vadim Kochan
On Sat, Jun 20, 2015 at 01:10:45AM +0200, Daniel Borkmann wrote: 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

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

2015-06-26 Thread Vadim Kochan
On Mon, Jun 22, 2015 at 03:55:01PM +0200, Daniel Borkmann wrote: On 06/21/2015 07:02 PM, Vadim Kochan wrote: ... Not sure if it is necessary to use libnet by trafgen as it is used by mz to generate packets ? It will add the new dependency, but seems it can simplify generation of the proto

Re: [netsniff-ng] Installation error - netsniff-ng-0.5.9 / Debian 7.8

2015-06-24 Thread Vadim Kochan
On Wed, Jun 24, 2015 at 09:25:12AM +0300, Vadim Kochan wrote: On Tue, Jun 23, 2015 at 05:40:03PM +, James Burnett wrote: Hi team, I’m using Netsniff (primarily for mausezahn) in a large lab setup. I’ve installed it successfully from source on Ubuntu 14.04 this morning, but when

Re: [netsniff-ng] Installation error - netsniff-ng-0.5.9 / Debian 7.8

2015-06-24 Thread Vadim Kochan
On Tue, Jun 23, 2015 at 05:40:03PM +, James Burnett wrote: Hi team, I’m using Netsniff (primarily for mausezahn) in a large lab setup. I’ve installed it successfully from source on Ubuntu 14.04 this morning, but when trying to do the same on Debian 7.8 (wheezy), I run into the

Re: [netsniff-ng] Installation error - netsniff-ng-0.5.9 / Debian 7.8

2015-06-24 Thread Vadim Kochan
On Wed, Jun 24, 2015 at 09:25:12AM +0300, Vadim Kochan wrote: On Tue, Jun 23, 2015 at 05:40:03PM +, James Burnett wrote: Hi team, I’m using Netsniff (primarily for mausezahn) in a large lab setup. I’ve installed it successfully from source on Ubuntu 14.04 this morning, but when

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 let know

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

2015-06-22 Thread Vadim Kochan
On Sun, Jun 21, 2015 at 08:02:40PM +0300, Vadim Kochan wrote: On Sat, Jun 20, 2015 at 01:10:45AM +0200, Daniel Borkmann wrote: 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

[netsniff-ng] [PATCH] trafgen: Print min packet size in error message

2015-06-27 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Print minimum needed packet size in case if validation error. Signed-off-by: Vadim Kochan vadi...@gmail.com --- trafgen.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/trafgen.c b/trafgen.c index 53320fe..93bb1b4 100644

[netsniff-ng] Re: [RFC 0/6] trafgen: Proto generation from command like

2015-06-27 Thread Vadim Kochan
On Sat, Jun 27, 2015 at 04:57:10AM +0300, Vadim Kochan wrote: Hi, This is the 1-st try version of how I see the protocol generation API for the trafgen util as mz replacement (at least for better performance). I am sending this just because to get your feedback about conceptual idea

[netsniff-ng] [RFC 2/6] str: Add converting cmdline args vector to str

2015-06-26 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Move piece of code from netsniff-ng.c to str.c as func which converts cmdline args vector to string. Signed-off-by: Vadim Kochan vadi...@gmail.com --- netsniff-ng.c | 18 ++ str.c | 23 +++ str.h | 1 + 3

[netsniff-ng] [RFC 6/6] trafgen: Add basic protocol generation feature

2015-06-26 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Added high-level command line protocol packet building intreface, which allows to specify specified protocol parameters to build the protocol specific header. Each protocol is represented by proto_gen struct which is responsible only for providing field

[netsniff-ng] [RFC 4/6] trafgen: Add helper to get current packet

2015-06-26 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Add current_packet() helper for getting current used packet and make it public to other modules. Signed-off-by: Vadim Kochan vadi...@gmail.com --- trafgen_conf.h | 2 ++ trafgen_parser.y | 5 + 2 files changed, 7 insertions(+) diff --git

[netsniff-ng] [RFC 3/6] trafgen: Export packet manipulation funcs for proto gen

2015-06-26 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Make public such funcs: set_byte, set_fill, set_multi_byte, realloc_packet to be used by proto gen code. Signed-off-by: Vadim Kochan vadi...@gmail.com --- trafgen_conf.h | 5 + trafgen_parser.y | 8 2 files changed, 9 insertions(+), 4

[netsniff-ng] [RFC 5/6] str: Add funcs for converting hex string to bytes

2015-06-26 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Add str2bytes func for converting hexadecimal string to bytes: abcd a AA:BB - { 0xab 0xcd 0x0a 0xaa 0xbb } It is needed to be used when specifying protocol payload for trafgen proto command line. Signed-off-by: Vadim Kochan vadi...@gmail.com

[netsniff-ng] [RFC 1/6] trafgen: Move ctx struct to separated header

2015-06-26 Thread Vadim Kochan
From: Vadim Kochan vadi...@gmail.com Move ctx struct to trafgen.h to be used from other modules. Signed-off-by: Vadim Kochan vadi...@gmail.com --- trafgen.c | 16 +--- trafgen.h | 21 + 2 files changed, 22 insertions(+), 15 deletions(-) create mode 100644

  1   2   3   4   5   6   7   >