Weican 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.
;
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 Google Groups
"netsniff-ng&
On Tue, Dec 19, 2017 at 12:30 PM, Tobias Klauser
wrote:
> On 2017-12-19 at 11:24:40 +0100, Vadim Kochan wrote:
> > May it possible that you tried flowtop compiled without the fix ?
>
> No, I made sure to have the patch applied and recompiled flowtop. I can
> still quite reli
May it possible that you tried flowtop compiled without the fix ?
On Tue, Dec 19, 2017 at 12:18 PM, Vadim Kochan wrote:
> 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
&
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
wrote:
> On 2017-12-18 at 23:38:18 +0100, Vadim Kochan wrote:
> > There is missing logic which removes flown entry from
> > relat
ff-by: Vadim Kochan
---
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_find_id(struct
flow
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 move further ?
>
> Thanks,
> Chan
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
---
flowtop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
if its possible.
Regards,
Vadim Kochan
On Thu, Dec 14, 2017 at 2:47 PM, Tobias Klauser wrote:
> On 2017-12-11 at 09:08:15 +0100, Tobias Klauser
> wrote:
> > On 2017-12-08 at 18:30:24 +0100, Vadim Kochan wrote:
> > > Hi All,
> > >
> > > I just noticed ther
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 Klauser wrote:
> > The
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
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 in use: the packet
>
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):
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
---
trafgen.c| 25 -
trafgen_conf.h | 2 +-
trafgen_d
allocated packet.
Signed-off-by: Vadim Kochan
---
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 100644
--- a/trafgen_l3.c
f-by: Vadim Kochan
---
trafgen.8| 4 +-
trafgen.c| 54 ++--
trafgen/Makefile | 1 +
trafgen_conf.h | 2 +
trafgen_dev.c| 36 +++-
trafgen_dev.h| 4 +-
trafgen_dump.c | 258 +++
trafgen_dump.h |
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 prot
f-by: Vadim Kochan
---
trafgen.8| 4 +-
trafgen.c| 54 ++--
trafgen/Makefile | 1 +
trafgen_conf.h | 2 +
trafgen_dev.c| 36 +++-
trafgen_dev.h| 4 +-
trafgen_dump.c | 256 +++
trafgen_dump.h |
allocated packet.
Signed-off-by: Vadim Kochan
---
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 100644
--- a/trafgen_l3.c
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
---
trafgen.c| 25 -
trafgen_conf.h | 2 +-
trafgen_d
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
wrote:
> Hi,
>
> I'm new to netsniff-ng and I find that
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
---
trafgen.8 | 3 ++-
trafgen.c | 25
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
---
trafgen.8 | 3 ++-
trafgen.c | 25
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
On Mon, Jun 12, 2017 at 11:38 PM, 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
&
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
(e.g. wlan packets) w/o having some special setup.
Signed-off-by: Vadim Kochan
---
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 function
4) Removed spac
(e.g. wlan packets) w/o having some special setup.
Signed-off-by: Vadim Kochan
---
trafgen.8| 5 +-
trafgen.c| 102 +
trafgen/Makefile | 1 +
trafgen_dev.c| 263 +++
trafgen_dev.h| 49 +++
Move rate, bytes & pkts stats fields from flow & proc entry
to separate flow_stat struct.
Signed-off-by: Vadim Kochan
---
flowtop.c | 82 +++
1 file changed, 41 insertions(+), 41 deletions(-)
diff --git a/flowtop.c b/flowtop
ired order.
Actually there are only 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
---
trafgen/Makefile | 1 +
trafgen_l4.
ans(name="www.google.com", addr(1.2.3.4)))
}
{
dns(qr=1, ans(name="www.google.com", addr(1::)))
}
RFC -> PATCH:
1) Removed empty lines after 'break' in switch blocks
2) Use xmemdupz instead malloc + memcpy
3) Squash commit with 'len' parame
ng)
type - 12
EXAMPLES:
{
dns(qr=1,
auth(name="ns1", ns("ns1.org")),
ans(name="www.google.com", cname("google.com")),
auth(name="aa", ns("bb")),
qry(name="www.google.com"))
}
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
---
str.c | 37 +
str.h | 1 +
2 files changed, 38 inserti
eal length 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
---
trafgen_l2.c | 6 ++--
trafgen_parser.y | 4 +--
tr
is handled by ui part.
Signed-off-by: Vadim Kochan
---
flowtop.c | 166 --
ui.c | 70 +-
ui.h | 13 +
3 files changed, 157 insertions(+), 92 deletions(-)
diff --git a/flowtop.c b/flowtop.c
index
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
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
---
trafgen_parser.y | 13 ++---
trafgen_proto.c | 5 +
trafgen_proto.h | 1 +
3 files c
On Tue, Mar 14, 2017 at 12:21 PM, Tobias Klauser wrote:
> 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.
>>
&
On Mon, Jan 30, 2017 at 10:33 AM, 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 e
On Mon, Feb 13, 2017 at 11:18 AM, Tobias Klauser wrote:
> 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.
&g
On Thu, Feb 9, 2017 at 1:02 PM, Tobias Klauser wrote:
> 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
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 +
1 file changed, 53 insertions(+)
diff --git a/pcap_io.h b/pcap_io.h
inde
Update -i, --in option with pcap file as input parameter.
Signed-off-by: Vadim Kochan
---
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 +66,13 @@ given scenario
k if 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 ge
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
---
tr
tun interface does not have Ethernet header so lets push Ethernet
header only if device supports this.
Signed-off-by: Vadim Kochan
---
trafgen_l3.c| 15 ---
trafgen_proto.c | 5 +
trafgen_proto.h | 2 ++
3 files changed, 19 insertions(+), 3 deletions(-)
diff --git a
d to also free obtained city/region in netsniff-ng,
astraceroute & flowtop tools.
Fixes: #169
Signed-off-by: Vadim Kochan
---
astraceroute.c | 10 -
flowtop.c | 4 +-
geoip.c| 114 +
geoip.h| 8 ++--
prot
On Thu, Feb 2, 2017 at 6:37 AM, 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
> ---
> dev.c | 18 ++
> dev.h | 4
&g
tun interface does not have Ethernet header so lets push Ethernet
header only if device supports this.
Signed-off-by: Vadim Kochan
---
dev.c | 18 ++
dev.h | 4
trafgen_l3.c| 15 ---
trafgen_proto.c | 5 +
trafgen_proto.h | 2 ++
5
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
---
tr
Update -i, --in option with pcap file as input parameter.
Signed-off-by: Vadim Kochan
---
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 +66,13 @@ given scenario
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 +
1 file changed, 53 insertions(+)
diff --git a/pcap_io.h b/pcap_io.h
inde
Allow to send packets at specified rate from ".pcap" file
which might be speified via -i,--in options.
By default packets will be send at original rate considering packet's
timestamp.
Vadim Kochan (3):
pcap_io: Add function to get packet timestamp
trafgen: Allow send packets
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 wrote:
> On Tue, Jan 31, 2017 at 12:36 PM, Vadim Kochan wrote:
>> On Tue, Jan 31, 2017 at 12:47 AM, Jojonix1-Web wrote:
>>> Hello dear netsniff
On Tue, Jan 31, 2017 at 12:36 PM, Vadim Kochan wrote:
> On Tue, Jan 31, 2017 at 12:47 AM, Jojonix1-Web wrote:
>> Hello dear netsniff team
>>
>>
>>
>> My name is Jonathan, I am an IT specialist from Germany and I have some
>> difficulties with Mausezahn.
&g
; 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 'ip link'
an
ng)
type - 12
EXAMPLES:
{
dns(qr=1,
auth(name="ns1", ns("ns1.org")),
ans(name="www.google.com", cname("google.com")),
auth(name="aa", ns("bb")),
qry(name="www.google.com"))
}
ired order.
Actually there are only 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
---
trafgen/Makefile | 1 +
trafgen_l4
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
---
trafgen_parser.y | 13 ++---
trafgen_proto.c | 5 +
trafgen_proto.h | 1 +
3 files c
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
---
trafgen_lexer.l | 2 +-
trafgen_parser.y | 12 ++--
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/trafgen_lexer.l b
type - 12
EXAMPLES:
{
dns(qr=1,
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,
eal length bytes and after
the field needs to be relocated to the right place.
Signed-off-by: Vadim Kochan
---
trafgen_proto.c | 50 ++
1 file changed, 50 insertions(+)
diff --git a/trafgen_proto.c b/trafgen_proto.c
index 0530032..83a6a7e 10
Add 'len' parameter to *_set_bytes(...) functoins to have better
control over it.
Signed-off-by: Vadim Kochan
---
trafgen_l2.c | 6 +++---
trafgen_parser.y | 4 ++--
trafgen_proto.c | 48
trafgen_proto.h | 4 ++--
4 files c
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
---
str.c | 37 +
str.h | 1 +
2 files changed, 38 inserti
On Wed, Jan 25, 2017 at 2:24 PM, Tobias Klauser wrote:
> 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_i
d5142c8.
Fixes: c4e07d5142c8 ("trafgen: l3: Support interface without IP address")
Signed-off-by: Vadim Kochan
---
trafgen_l3.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/trafgen_l3.c b/trafgen_l3.c
index 4d67f58..70aefb9 100644
--- a/trafgen_l3.c
+++ b/trafgen_l3.c
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
---
-compat.h header.
Signed-off-by: Vadim Kochan
---
flowtop.c | 26 +--
ui.c | 97 --
ui.h | 34 +--
urcu-list-compat.h | 21
4 files changed, 171 insertions(+), 7 deletions
.
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
.
Signed-off-by: Vadim Kochan
---
flowtop.c | 26 +++--
list.h| 19 +
ui.c | 95 ++-
ui.h | 30
4 files changed, 166 insertions(+), 4 deletions(-)
create mode 100644 list.h
diff
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 |
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 is checked if it exists by checking
/proc/ path, and is deleted if there is no any flow
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 cds_list_head) will be used by other modules
> and lets imagine that we will get rid of li
have copy-paste
cds_* API from urcu or have a wrappers for it, so may be it is better
to have generic name w/o cds_ prefix ?
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
On Fri, Jan 13, 2017 at 3:07 PM, Daniel Borkmann 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 only 1 new "Proce
On Thu, Jan 12, 2017 at 5:20 PM, Tobias Klauser wrote:
> On 2017-01-12 at 15:54:31 +0100, Vadim Kochan wrote:
>> On Thu, Jan 12, 2017 at 4:28 PM, Tobias Klauser wrote:
> [...]
>> >> enum flow_direction {
>> >> @@ -355,15 +357,15 @@ static inline struct flow_
(...) therefor no need to use nfct_clone(n).
Signed-off-by: Vadim Kochan
---
v2:
1) Use call_rcu(...) instead of custom free list & synchronize_rcu()
2) Removed locking.h include after get rid of spinlock_xxx usage.
3) Return NFCT_CB_STOLEN status to manually do nfct_destroy(n) for
(...) therefor no need to use nfct_clone(n).
Signed-off-by: Vadim Kochan
---
flowtop.c | 148 --
1 file changed, 47 insertions(+), 101 deletions(-)
diff --git a/flowtop.c b/flowtop.c
index f48f5c8..3cee0ec 100644
--- a/flowtop.c
+++ b/flowtop.c
On Thu, Jan 12, 2017 at 5:20 PM, Tobias Klauser wrote:
> On 2017-01-12 at 15:54:31 +0100, Vadim Kochan wrote:
>> On Thu, Jan 12, 2017 at 4:28 PM, Tobias Klauser wrote:
> [...]
>> >> enum flow_direction {
>> >> @@ -355,15 +357,15 @@ static inline struct flow_
you maybe have a quick look?
>
> On 2017-01-09 at 07:26: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
>>
On Wed, Dec 14, 2016 at 11:33 PM, Vadim Kochan wrote:
> On Wed, Dec 14, 2016 at 11:26 PM, Tobias Klauser wrote:
>> 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_i
.
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
---
flowtop.c | 121 +++---
1 file
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 ge
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
---
flowtop.c | 3 +--
1 file changed, 1 insertion
92.169.1.1)
< lo 54 1482265603s.917127151ns #6
[ 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
Add short note about field offset syntax with an example.
Signed-off-by: Vadim Kochan
---
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 examples with new field
On Wed, Dec 21, 2016 at 10:17:17AM +0100, Tobias Klauser wrote:
> On 2016-12-20 at 22:10:54 +0100, Vadim Kochan 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 wrote:
> > > > Ex
On Tue, Dec 20, 2016 at 12:33:47PM +0100, Tobias Klauser wrote:
> 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 n
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
---
trafgen_proto.c
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
---
trafgen_proto.c | 46
piece of header.
Signed-off-by: Vadim Kochan
---
trafgen_parser.y | 168 +++
trafgen_proto.c | 27 -
trafgen_proto.h | 8 ++-
3 files changed, 136 insertions(+), 67 deletions(-)
diff --git a/trafgen_parser.y b/trafgen_parser.y
index
Add short note about field offset syntax with an example.
Signed-off-by: Vadim Kochan
---
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
@@ -329,6 +329,31 @@ Example of
proto_field.
Signed-off-by: Vadim Kochan
---
trafgen_l2.c | 44 -
trafgen_l3.c | 24 +-
trafgen_l4.c | 28 +--
trafgen_parser.y | 64 -
trafgen_proto.c | 144 ---
trafgen_proto.h
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
---
trafgen_lexer.l | 51 +++
trafgen_parser.y | 2 +-
2 files c
nd added 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 s
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
---
trafgen_parser.y | 30 +++---
1 file changed, 15 insertions
On Sat, Dec 17, 2016 at 4:37 PM, Vadim Kochan 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.
>
> The trick to implem
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
---
v2:
1) Remove sys/stat.h & dirent.h from flowtop.c includes.
2) Add static to __match
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
---
trafgen_proto.c
llows 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
1 - 100 of 779 matches
Mail list logo