Go to the documentation of this file.
   65 static void DetectHttpUARegisterTests(
void);
 
   67 static int g_http_ua_buffer_id = 0;
 
   71         Flow *_f, 
const uint8_t _flow_flags,
 
   72         void *txv, 
const int list_id);
 
   85             "content modifier to match only on the HTTP User-Agent header";
 
  160         const uint8_t _flow_flags, 
void *txv, 
const int list_id)
 
  164         htp_tx_t *tx = (htp_tx_t *)txv;
 
  166         if (htp_tx_request_headers(tx) == NULL)
 
  169         const htp_header_t *h = htp_tx_request_header(tx, 
"User-Agent");
 
  170         if (h == NULL || htp_header_value(h) == NULL) {
 
  171             SCLogDebug(
"HTTP UA header not present in this request");
 
  175         const uint32_t data_len = (uint32_t)htp_header_value_len(h);
 
  176         const uint8_t *data = htp_header_value_ptr(h);
 
  179                 det_ctx, list_id, buffer, data, data_len, transforms);
 
  194         const uint8_t *b = NULL;
 
  196         if (SCHttp2TxGetUserAgent(txv, &b, &b_len) != 1)
 
  198         if (b == NULL || b_len == 0)
 
  
 
#define SIGMATCH_INFO_STICKY_BUFFER
SigTableElmt * sigmatch_table
uint8_t DetectEngineInspectBufferGeneric(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, const DetectEngineAppInspectionEngine *engine, const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id)
Do the content inspection & validation for a signature.
#define SIGMATCH_INFO_CONTENT_MODIFIER
main detection engine ctx
int SCDetectBufferSetActiveList(DetectEngineCtx *de_ctx, Signature *s, const int list)
int SCDetectSignatureSetAppProto(Signature *s, AppProto alproto)
InspectionBuffer * InspectionBufferGet(DetectEngineThreadCtx *det_ctx, const int list_id)
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
int DetectBufferTypeGetByName(const char *name)
#define SIG_FLAG_TOSERVER
void DetectHttpUARegister(void)
Registers the keyword handlers for the "http_user_agent" keyword.
int PrefilterGenericMpmRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id)
void DetectAppLayerMpmRegister(const char *name, int direction, int priority, PrefilterRegisterFunc PrefilterRegister, InspectionBufferGetDataPtr GetData, AppProto alproto, int tx_min_progress)
register an app layer keyword for mpm
int DetectEngineContentModifierBufferSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg, int sm_type, int sm_list, AppProto alproto)
Data structures and function prototypes for keeping state for the detection engine.
void InspectionBufferSetupAndApplyTransforms(DetectEngineThreadCtx *det_ctx, const int list_id, InspectionBuffer *buffer, const uint8_t *data, const uint32_t data_len, const DetectEngineTransforms *transforms)
setup the buffer with our initial data
void DetectAppLayerInspectEngineRegister(const char *name, AppProto alproto, uint32_t dir, int progress, InspectEngineFuncPtr Callback, InspectionBufferGetDataPtr GetData)
Registers an app inspection engine.
void DetectBufferTypeSetDescriptionByName(const char *name, const char *desc)
Handle HTTP user agent match.
void(* RegisterTests)(void)