Skip to content

Commit 8e4297a

Browse files
committed
add support for fix_checksum_hw
Signed-off-by: Leo Ma <[email protected]>
1 parent cf00b4a commit 8e4297a

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
package com.cisco.trex.stateless.model.vm;
2+
3+
public class FixChecksumHw extends VMInstruction {
4+
5+
private String type;
6+
private int l2_len;
7+
private int l3_len;
8+
private int l4_type;
9+
10+
public enum L4Type {
11+
UDP(11),
12+
TCP(13),
13+
IP(17);
14+
15+
int value;
16+
17+
L4Type(int value) {
18+
this.value = value;
19+
}
20+
21+
int getValue() {
22+
return value;
23+
}
24+
}
25+
26+
public FixChecksumHw(int l2_len, int l3_len, L4Type l4_type) {
27+
super();
28+
this.type = "fix_checksum_hw";
29+
this.l2_len = l2_len;
30+
this.l3_len = l3_len;
31+
this.l4_type = l4_type.getValue();
32+
}
33+
34+
public String getType() {
35+
return type;
36+
}
37+
38+
public int getL2_len() {
39+
return l2_len;
40+
}
41+
42+
public int getL3_len() {
43+
return l3_len;
44+
}
45+
46+
public int getL4_type() {
47+
return l4_type;
48+
}
49+
}

0 commit comments

Comments
 (0)