@@ -40,11 +40,13 @@ public class Requests {
4040 private String data_str ;
4141 @ Column (name = "original_str" )
4242 private String original_str ;
43+ @ Column (name = "protocol" )
44+ private String protocol ;
4345
4446
4547 public Requests (){};
4648
47- public Requests (int Index , byte [] requestResponse , byte [] original , String SrcIp ,int SrcPort , String DstIP , int DstPort , String Direction , Long time , int bytes ){
49+ public Requests (int Index , byte [] requestResponse , byte [] original , String SrcIp ,int SrcPort , String DstIP , int DstPort , String Direction , Long time , int bytes , String protocol ){
4850 this .alt_id = Index ;
4951 this .data = Base64 .getEncoder ().encodeToString (requestResponse );
5052 this .original = Base64 .getEncoder ().encodeToString (original );
@@ -57,6 +59,7 @@ public Requests(int Index, byte[] requestResponse, byte[] original, String SrcIp
5759 this .bytes = original .length ;
5860 this .original_str = new String (original ); //.replaceAll("[^a-zA-Z0-9~!@#$%^&*()_+`\\-=,./<>?\\s]", "");
5961 this .data_str = new String (requestResponse );//.replaceAll("[^a-zA-Z0-9~!@#$%^&*()_+`\\-=,./<>?\\s]", "");
62+ this .protocol = protocol ;
6063
6164
6265 }
@@ -171,6 +174,22 @@ public String getOriginal_str() {
171174 public void setOriginal_str (String original_str ) {
172175 this .original_str = original_str ;
173176 }
177+
178+ public String getProtocol (){
179+ if (this .protocol == null ){
180+ return "TCP" ;
181+ }else {
182+ return this .protocol ;
183+ }
184+ }
185+
186+ public void setProtocol (String protocol ){
187+ if (protocol == null ){
188+ this .protocol = "TCP" ;
189+ }else {
190+ this .protocol = protocol ;
191+ }
192+ }
174193
175194
176195
0 commit comments