Hello Tobias,
I have read the read_pcap function. I am not expert in C just a beginner. I
have understand the basic flow from the read_pcap function but still not fully.
I am using the real time kernel Xenomai 3.0.1 and it uses the real time
Ethernet driver and hence the name of the Ethernet
Move setting next protocol id field from higher protocols (ARP, IPv4)
to Ethernet. It makes code little more generic w/o checking each lower
protocol and setting specific field id.
Signed-off-by: Vadim Kochan
---
trafgen_l2.c | 24 +++-
trafgen_l3.c | 4
Add set_next_proto callback to proto_hdr struct to allow lower
protocol set next protocol id by enum proto_id.
Extended proto_lower_default_add(...) function to take upper protocol
to delegate it's id to lower protocol to set next protocol field.
Signed-off-by: Vadim Kochan
Move setting lower protocol id field value from UDP & TCP
protocols to IPv4 only, so lower layer will know exactly value
to set in protocol id field.
Signed-off-by: Vadim Kochan
---
trafgen_l3.c | 30 --
trafgen_l4.c | 16 ++--
2 files
Change proto_header_init(...) and proto_lower_default_add(...)
functions to return struct proto_hdr * to do not call
proto_current_header(...) after, so it makes more sense to get struct
proto_hdr * right after initializing protocol by id.
Signed-off-by: Vadim Kochan
---
Add 'vlan()' function to generate VLAN header.
Fields supported:
tpid|proto Set TPID (Tag Protocol Identifier) (default 0x8100)
1ad Set TPID field as 0x88a8
1q Set TPID field as 0x8100
tci Set TCI (Tag Control Information)
Add usage, syntax & parameters description for 'vlan()' function.
Signed-off-by: Vadim Kochan
---
trafgen.8 | 43 +++
1 file changed, 43 insertions(+)
diff --git a/trafgen.8 b/trafgen.8
index 207cfc5..1fe5536 100644
--- a/trafgen.8
+++
On 02/01/2016 04:51 PM, Tobias Klauser wrote:
On 2016-02-01 at 15:38:28 +0100, Umair Ali wrote:
[...]
Sorry, but reviewing a random dump of code (that doesn't even compile)
goes beyond the scope of what I'd consider support/help for netsniff-ng.
+1
Ali, I find your
On 2016-02-01 at 15:38:28 +0100, Umair Ali wrote:
> Thanks a lot for the help offer. I can understand what you want to say.
>
> I need your feedback on the code which I have written. The flow of the code
> is as follows
> - Reader the pcap file. the pcap file contained the