From 60a99915c1452d04da8cae100b82f4a2c8dcc3bd Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Sun, 9 Oct 2011 20:34:42 +0200 Subject: [PATCH] doc: create http support group This patch create an httplayer group and adds related files to it. It also fixes some typo in documentation string and format. --- src/app-layer-htp.c | 9 +++++++++ src/app-layer-htp.h | 9 +++++++++ src/decode.h | 2 +- src/detect-engine-alert.c | 2 +- src/detect-engine-hcbd.c | 10 ++++++++++ src/detect-engine-hcd.c | 10 ++++++++++ src/detect-engine-hhd.c | 10 ++++++++++ src/detect-engine-hmd.c | 10 ++++++++++ src/detect-engine-hrhd.c | 10 ++++++++++ src/detect-engine-hrud.c | 10 ++++++++++ src/detect-http-client-body.c | 10 ++++++++++ src/detect-http-cookie.c | 10 ++++++++++ src/detect-http-header.c | 10 ++++++++++ src/detect-http-method.c | 10 ++++++++++ src/detect-http-raw-header.c | 10 ++++++++++ src/detect-http-raw-uri.c | 10 ++++++++++ src/detect-http-stat-code.c | 10 ++++++++++ src/detect-http-stat-msg.c | 10 ++++++++++ src/detect-http-uri.c | 10 ++++++++++ src/detect.c | 4 ++-- 20 files changed, 172 insertions(+), 4 deletions(-) diff --git a/src/app-layer-htp.c b/src/app-layer-htp.c index f63d817ea0..29bc5a2ca3 100644 --- a/src/app-layer-htp.c +++ b/src/app-layer-htp.c @@ -15,6 +15,12 @@ * 02110-1301, USA. */ +/** + * \ingroup httplayer + * + * @{ + */ + /** * \file * @@ -2369,3 +2375,6 @@ void HTPParserRegisterTests(void) { #endif /* UNITTESTS */ } +/** + * @} + */ diff --git a/src/app-layer-htp.h b/src/app-layer-htp.h index 0a14f11549..78040b819d 100644 --- a/src/app-layer-htp.h +++ b/src/app-layer-htp.h @@ -15,6 +15,12 @@ * 02110-1301, USA. */ +/** + * \defgroup httplayer HTTP layer support + * + * @{ + */ + /** * \file * @@ -123,3 +129,6 @@ void AppLayerHtpPrintStats(void); #endif /* __APP_LAYER_HTP_H__ */ +/** + * @} + */ diff --git a/src/decode.h b/src/decode.h index 4213f252cf..5e18d71946 100644 --- a/src/decode.h +++ b/src/decode.h @@ -223,7 +223,7 @@ typedef struct PacketAlert_ { uint8_t action; /* Internal num, used for sorting */ uint8_t flags; - /** Pointer to smsg this signature matched on, or + /** Pointer to stream message this signature matched on, or * NULL if the sig didn't match on a smsg */ void *alert_msg; diff --git a/src/detect-engine-alert.c b/src/detect-engine-alert.c index bb8b3831f0..14666949fa 100644 --- a/src/detect-engine-alert.c +++ b/src/detect-engine-alert.c @@ -167,7 +167,7 @@ int PacketAlertAppend(DetectEngineThreadCtx *det_ctx, Signature *s, Packet *p, u p->alerts.alerts[p->alerts.cnt].s = s; } else { /* We need to make room for this s->num - (a bit ugly with mamcpy but we are planning changes here)*/ + (a bit ugly with memcpy but we are planning changes here)*/ for (i = p->alerts.cnt - 1; i >= 0 && p->alerts.alerts[i].order_id > s->order_id; i--) { memcpy(&p->alerts.alerts[i + 1], &p->alerts.alerts[i], sizeof(PacketAlert)); } diff --git a/src/detect-engine-hcbd.c b/src/detect-engine-hcbd.c index 4393379c46..e2c7115a47 100644 --- a/src/detect-engine-hcbd.c +++ b/src/detect-engine-hcbd.c @@ -15,6 +15,13 @@ * 02110-1301, USA. */ +/** + * \ingroup httplayer + * + * @{ + */ + + /** \file * * \author Anoop Saldanha @@ -3759,3 +3766,6 @@ void DetectEngineHttpClientBodyRegisterTests(void) return; } +/** + * @} + */ diff --git a/src/detect-engine-hcd.c b/src/detect-engine-hcd.c index bd771468ad..253946c221 100644 --- a/src/detect-engine-hcd.c +++ b/src/detect-engine-hcd.c @@ -15,6 +15,13 @@ * 02110-1301, USA. */ +/** + * \ingroup httplayer + * + * @{ + */ + + /** \file * * \author Anoop Saldanha @@ -2067,3 +2074,6 @@ void DetectEngineHttpCookieRegisterTests(void) return; } +/** + * @} + */ diff --git a/src/detect-engine-hhd.c b/src/detect-engine-hhd.c index a5b69592c7..fb3cc927af 100644 --- a/src/detect-engine-hhd.c +++ b/src/detect-engine-hhd.c @@ -15,6 +15,13 @@ * 02110-1301, USA. */ +/** + * \ingroup httplayer + * + * @{ + */ + + /** \file * * \author Anoop Saldanha @@ -3218,3 +3225,6 @@ void DetectEngineHttpHeaderRegisterTests(void) return; } +/** + * @} + */ diff --git a/src/detect-engine-hmd.c b/src/detect-engine-hmd.c index 3b76b3e095..a5ad7c75ba 100644 --- a/src/detect-engine-hmd.c +++ b/src/detect-engine-hmd.c @@ -15,6 +15,13 @@ * 02110-1301, USA. */ +/** + * \ingroup httplayer + * + * @{ + */ + + /** \file * * \author Anoop Saldanha @@ -2037,3 +2044,6 @@ void DetectEngineHttpMethodRegisterTests(void) return; } +/** + * @} + */ diff --git a/src/detect-engine-hrhd.c b/src/detect-engine-hrhd.c index b3464fc3bc..13fa9a904d 100644 --- a/src/detect-engine-hrhd.c +++ b/src/detect-engine-hrhd.c @@ -15,6 +15,13 @@ * 02110-1301, USA. */ +/** + * \ingroup httplayer + * + * @{ + */ + + /** \file * * \author Anoop Saldanha @@ -3129,3 +3136,6 @@ void DetectEngineHttpRawHeaderRegisterTests(void) return; } +/** + * @} + */ diff --git a/src/detect-engine-hrud.c b/src/detect-engine-hrud.c index 6a50ed5d61..8cccde208f 100644 --- a/src/detect-engine-hrud.c +++ b/src/detect-engine-hrud.c @@ -15,6 +15,13 @@ * 02110-1301, USA. */ +/** + * \ingroup httplayer + * + * @{ + */ + + /** \file * * \author Anoop Saldanha @@ -3875,3 +3882,6 @@ void DetectEngineHttpRawUriRegisterTests(void) return; } +/** + * @} + */ diff --git a/src/detect-http-client-body.c b/src/detect-http-client-body.c index 6592552a05..17860729b3 100644 --- a/src/detect-http-client-body.c +++ b/src/detect-http-client-body.c @@ -15,6 +15,13 @@ * 02110-1301, USA. */ +/** + * \ingroup httplayer + * + * @{ + */ + + /** * \file * @@ -2632,3 +2639,6 @@ void DetectHttpClientBodyRegisterTests(void) return; } +/** + * @} + */ diff --git a/src/detect-http-cookie.c b/src/detect-http-cookie.c index c17baa69d9..06c1082748 100644 --- a/src/detect-http-cookie.c +++ b/src/detect-http-cookie.c @@ -15,6 +15,13 @@ * 02110-1301, USA. */ +/** + * \ingroup httplayer + * + * @{ + */ + + /** * \file * @@ -1287,3 +1294,6 @@ void DetectHttpCookieRegisterTests (void) #endif /* UNITTESTS */ } +/** + * @} + */ diff --git a/src/detect-http-header.c b/src/detect-http-header.c index f9d763b1b2..db60a29bc9 100644 --- a/src/detect-http-header.c +++ b/src/detect-http-header.c @@ -15,6 +15,13 @@ * 02110-1301, USA. */ +/** + * \ingroup httplayer + * + * @{ + */ + + /** * \file * @@ -1835,3 +1842,6 @@ void DetectHttpHeaderRegisterTests(void) return; } +/** + * @} + */ diff --git a/src/detect-http-method.c b/src/detect-http-method.c index 13a3f86c99..915ce618f4 100644 --- a/src/detect-http-method.c +++ b/src/detect-http-method.c @@ -15,6 +15,13 @@ * 02110-1301, USA. */ +/** + * \ingroup httplayer + * + * @{ + */ + + /** * \file * @@ -1041,3 +1048,6 @@ void DetectHttpMethodRegisterTests(void) { #endif /* UNITTESTS */ } +/** + * @} + */ diff --git a/src/detect-http-raw-header.c b/src/detect-http-raw-header.c index c14f7bd089..63f18f7de0 100644 --- a/src/detect-http-raw-header.c +++ b/src/detect-http-raw-header.c @@ -15,6 +15,13 @@ * 02110-1301, USA. */ +/** + * \ingroup httplayer + * + * @{ + */ + + /** * \file * @@ -1831,3 +1838,6 @@ void DetectHttpRawHeaderRegisterTests(void) return; } +/** + * @} + */ diff --git a/src/detect-http-raw-uri.c b/src/detect-http-raw-uri.c index 01bd8b16d9..0ce8dbaade 100644 --- a/src/detect-http-raw-uri.c +++ b/src/detect-http-raw-uri.c @@ -15,6 +15,13 @@ * 02110-1301, USA. */ +/** + * \ingroup httplayer + * + * @{ + */ + + /** * \file * @@ -903,3 +910,6 @@ static void DetectHttpRawUriRegisterTests (void) return; } +/** + * @} + */ diff --git a/src/detect-http-stat-code.c b/src/detect-http-stat-code.c index 601a9e9d1c..e935d28a7d 100644 --- a/src/detect-http-stat-code.c +++ b/src/detect-http-stat-code.c @@ -15,6 +15,13 @@ * 02110-1301, USA. */ +/** + * \ingroup httplayer + * + * @{ + */ + + /** * \file * @@ -835,3 +842,6 @@ void DetectHttpStatCodeRegisterTests (void) #endif /* UNITTESTS */ } +/** + * @} + */ diff --git a/src/detect-http-stat-msg.c b/src/detect-http-stat-msg.c index 83fd2104ec..4c3d3e3845 100644 --- a/src/detect-http-stat-msg.c +++ b/src/detect-http-stat-msg.c @@ -15,6 +15,13 @@ * 02110-1301, USA. */ +/** + * \ingroup httplayer + * + * @{ + */ + + /** * \file * @@ -712,3 +719,6 @@ void DetectHttpStatMsgRegisterTests (void) #endif /* UNITTESTS */ } +/** + * @} + */ diff --git a/src/detect-http-uri.c b/src/detect-http-uri.c index 0d998705d7..4cbd72a280 100644 --- a/src/detect-http-uri.c +++ b/src/detect-http-uri.c @@ -15,6 +15,13 @@ * 02110-1301, USA. */ +/** + * \ingroup httplayer + * + * @{ + */ + + /** * \file * @@ -848,3 +855,6 @@ void DetectHttpUriRegisterTests (void) #endif /* UNITTESTS */ } +/** + * @} + */ diff --git a/src/detect.c b/src/detect.c index 59c99d510f..f809ebde3b 100644 --- a/src/detect.c +++ b/src/detect.c @@ -1404,7 +1404,7 @@ int SigMatchSignatures(ThreadVars *th_v, DetectEngineCtx *de_ctx, DetectEngineTh det_ctx->sgh = SigMatchSignaturesGetSgh(de_ctx, det_ctx, p); PACKET_PROFILING_DETECT_END(p, PROF_DETECT_GETSGH); } - } else { + } else { /* p->flags & PKT_HAS_FLOW */ /* no flow */ /* Even without flow we should match the packet src/dst */ @@ -1558,7 +1558,7 @@ int SigMatchSignatures(ThreadVars *th_v, DetectEngineCtx *de_ctx, DetectEngineTh if (DetectEngineInspectStreamPayload(de_ctx, det_ctx, s, p->flow, smsg_inspect->data.data, smsg_inspect->data.data_len) == 1) { SCLogDebug("match in smsg %p", smsg); pmatch = 1; - /* Tell the enigne that this reassembled stream can drop the + /* Tell the engine that this reassembled stream can drop the * rest of the pkts with no further inspection */ if (s->action == ACTION_DROP) alert_flags |= PACKET_ALERT_FLAG_DROP_FLOW;