app-layer: function to register ci pattern + probe

Ticket: 6591
pull/14739/head
Philippe Antoine 8 months ago committed by Victor Julien
parent 81572cb457
commit 7dbe033ae0

@ -916,6 +916,13 @@ extern "C" {
offset: u16, direction: u8, offset: u16, direction: u8,
) -> ::std::os::raw::c_int; ) -> ::std::os::raw::c_int;
} }
extern "C" {
pub fn SCAppLayerProtoDetectPMRegisterPatternCIwPP(
ipproto: u8, alproto: AppProto, pattern: *const ::std::os::raw::c_char, depth: u16,
offset: u16, direction: u8, PPFunc: ProbingParserFPtr, pp_min_depth: u16,
pp_max_depth: u16,
) -> ::std::os::raw::c_int;
}
extern "C" { extern "C" {
pub fn SCAppLayerRequestProtocolTLSUpgrade(f: *mut Flow) -> bool; pub fn SCAppLayerRequestProtocolTLSUpgrade(f: *mut Flow) -> bool;
} }

@ -1645,6 +1645,16 @@ int SCAppLayerProtoDetectPMRegisterPatternCSwPP(uint8_t ipproto, AppProto alprot
SCReturnInt(r); SCReturnInt(r);
} }
int SCAppLayerProtoDetectPMRegisterPatternCIwPP(uint8_t ipproto, AppProto alproto,
const char *pattern, uint16_t depth, uint16_t offset, uint8_t direction,
ProbingParserFPtr PPFunc, uint16_t pp_min_depth, uint16_t pp_max_depth)
{
SCEnter();
int r = AppLayerProtoDetectPMRegisterPattern(ipproto, alproto, pattern, depth, offset,
direction, 0 /* case-insensitive */, PPFunc, pp_min_depth, pp_max_depth);
SCReturnInt(r);
}
int SCAppLayerProtoDetectPMRegisterPatternCI(uint8_t ipproto, AppProto alproto, const char *pattern, int SCAppLayerProtoDetectPMRegisterPatternCI(uint8_t ipproto, AppProto alproto, const char *pattern,
uint16_t depth, uint16_t offset, uint8_t direction) uint16_t depth, uint16_t offset, uint8_t direction)
{ {

@ -89,6 +89,9 @@ int SCAppLayerProtoDetectPMRegisterPatternCSwPP(uint8_t ipproto, AppProto alprot
*/ */
int SCAppLayerProtoDetectPMRegisterPatternCI(uint8_t ipproto, AppProto alproto, const char *pattern, int SCAppLayerProtoDetectPMRegisterPatternCI(uint8_t ipproto, AppProto alproto, const char *pattern,
uint16_t depth, uint16_t offset, uint8_t direction); uint16_t depth, uint16_t offset, uint8_t direction);
int SCAppLayerProtoDetectPMRegisterPatternCIwPP(uint8_t ipproto, AppProto alproto,
const char *pattern, uint16_t depth, uint16_t offset, uint8_t direction,
ProbingParserFPtr PPFunc, uint16_t pp_min_depth, uint16_t pp_max_depth);
/***** Setup/General Registration *****/ /***** Setup/General Registration *****/

Loading…
Cancel
Save