Hi Vadim
On 2016-02-02 at 20:26:34 +0100, Vadim Kochan wrote:
> I am thinking if it is OK to add automatic padding for Ethernet frames
> by filling 0s if packet len is less than 64 bytes ?
I don't think this is needed. Users might want to send explicitly send
less than 64 bytes on purpose (i.e.
On 2016-02-02 at 17:27:26 +0100, Vadim Kochan wrote:
> On Tue, Feb 2, 2016 at 6:20 PM, Vadim Kochan wrote:
> > On Tue, Feb 2, 2016 at 5:54 PM, Tobias Klauser wrote:
> >> On 2016-02-01 at 18:01:34 +0100, Vadim Kochan wrote:
> >>> Add 'vlan()' function for creating VLAN header 802.1q or 802.1ad.
Add 'mpls()' function to create MPLS header with fields:
Label, TClass, Bottom-Stack, TTL
By default EtherType is set to MPLS Unicast (0x8847).
Added man changes as well. By default bottom-stack (S-flag) is
set to 1 but resets to 0 after the lower MPLS was added. As future
extensions for 'mpl
Add 'mpls()' function for creating MPLS header with parameters:
lbl|label MPLS label
lastIndicates the last label on MPLS stack
tc|tclass Traffic Class
ttl TTL (Time To Live)
Currently only unicast MPLS is supported, but multicas
Add syntax & fields description for 'mpls()' function,
also:
1) add line break for VLAN header notes
2) fixed ip -> ipv4 in UDP echo example
Signed-off-by: Vadim Kochan
---
trafgen.8 | 29 +++--
1 file changed, 27 insertions(+), 2 deletions(-)
diff --gi
Add support for MPLS header creating with fields:
Label, TClass, Bottom-Stack, TTL
By default S-field is set to 1 (last label), but resets to 0
if lower MPLS header is added.
Signed-off-by: Vadim Kochan
---
trafgen_l2.c| 32
trafgen_l2.h| 7 +++
Current logic does OR of existing field value & shift-masked
specified value, which is not enough as 0s bits from
the specified value will be not set (be cause of OR),
so fixed it by reseting original field value by AND with
reverted field mask, in otherwords - bits part of original field
value is