]> git.ipfire.org Git - people/ms/suricata.git/commitdiff
rust/applayer: split EOF flag per direction
authorShivani Bhardwaj <shivanib134@gmail.com>
Sat, 20 Feb 2021 06:31:20 +0000 (12:01 +0530)
committerVictor Julien <victor@inliniac.net>
Mon, 22 Feb 2021 10:16:40 +0000 (11:16 +0100)
rust/src/applayer.rs
rust/src/applayertemplate/template.rs

index c7356228c2cdbdc960549651cde28f9e6d1b8adb..35bb1865085341398775cd8d35b89a39d9008088 100644 (file)
@@ -303,7 +303,8 @@ extern {
 }
 
 // Defined in app-layer-parser.h
-pub const APP_LAYER_PARSER_EOF : u8 = 0b0;
+pub const APP_LAYER_PARSER_EOF_TS : u8 = 0b0101;
+pub const APP_LAYER_PARSER_EOF_TC : u8 = 0b0110;
 pub const APP_LAYER_PARSER_NO_INSPECTION : u8 = 0b1;
 pub const APP_LAYER_PARSER_NO_REASSEMBLY : u8 = 0b10;
 pub const APP_LAYER_PARSER_NO_INSPECTION_PAYLOAD : u8 = 0b100;
index feabfc65686bf181533d6f70f9a0f2158da8d65b..e331779c8440b1456113800d5a88efdaf4f0f215 100644 (file)
@@ -327,7 +327,7 @@ pub extern "C" fn rs_template_parse_request(
     _flags: u8,
 ) -> AppLayerResult {
     let eof = unsafe {
-        if AppLayerParserStateIssetFlag(pstate, APP_LAYER_PARSER_EOF) > 0 {
+        if AppLayerParserStateIssetFlag(pstate, APP_LAYER_PARSER_EOF_TS) > 0 {
             true
         } else {
             false
@@ -363,7 +363,7 @@ pub extern "C" fn rs_template_parse_response(
     _flags: u8,
 ) -> AppLayerResult {
     let _eof = unsafe {
-        if AppLayerParserStateIssetFlag(pstate, APP_LAYER_PARSER_EOF) > 0 {
+        if AppLayerParserStateIssetFlag(pstate, APP_LAYER_PARSER_EOF_TC) > 0 {
             true
         } else {
             false