for (i = 0; i < FLOW_PROTO_DEFAULT; i++) {
for (j = 0; j < 2; j++) {
- if (max_pat_id == 0)
- {
- max_pat_id = alpd_ctx.ctx_ipp[i].ctx_pm[j].max_pat_id;
- } else if (alpd_ctx.ctx_ipp[i].ctx_pm[j].max_pat_id &&
- max_pat_id < alpd_ctx.ctx_ipp[i].ctx_pm[j].max_pat_id)
- {
- max_pat_id = alpd_ctx.ctx_ipp[i].ctx_pm[j].max_pat_id;
- }
+ if (max_pat_id == 0) {
+ max_pat_id = alpd_ctx.ctx_ipp[i].ctx_pm[j].max_pat_id;
+
+ } else if (alpd_ctx.ctx_ipp[i].ctx_pm[j].max_pat_id &&
+ max_pat_id < alpd_ctx.ctx_ipp[i].ctx_pm[j].max_pat_id)
+ {
+ max_pat_id = alpd_ctx.ctx_ipp[i].ctx_pm[j].max_pat_id;
+ }
}
}
if (alpd_ctx.alproto_names[a] != NULL &&
strlen(alpd_ctx.alproto_names[a]) == strlen(alproto_name) &&
(SCMemcmp(alpd_ctx.alproto_names[a], alproto_name, strlen(alproto_name)) == 0))
- {
- goto end;
- }
+ {
+ goto end;
+ }
}
end:
return r;
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
typedef struct AppLayerProtoDetectPPTestDataElement_ {
char *alproto_name;
uint16_t alproto;
for (i = 0; i < FLOW_PROTO_DEFAULT; i++) {
for (j = 0; j < ALPROTO_MAX; j++) {
tctx->alproto_local_storage[i][j] =
- AppLayerParserGetProtocolParserLocalStorage(FlowGetReverseProtoMapping(i),
- j);
+ AppLayerParserGetProtocolParserLocalStorage(FlowGetReverseProtoMapping(i), j);
}
}
{
SCEnter();
- AppLayerParserParserState *pstate_1 = (AppLayerParserParserState *)pstate;
+ AppLayerParserParserState *state = (AppLayerParserParserState *)pstate;
uint64_t active_id;
- uint64_t log_id = pstate_1->log_id;
- uint64_t inspect_id = pstate_1->inspect_id[direction & STREAM_TOSERVER ? 0 : 1];
+ uint64_t log_id = state->log_id;
+ uint64_t inspect_id = state->inspect_id[direction & STREAM_TOSERVER ? 0 : 1];
if (alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].logger == TRUE) {
active_id = (log_id < inspect_id) ? log_id : inspect_id;
} else {
if (p->Parser[(flags & STREAM_TOSERVER) ? 0 : 1](f, alstate, pstate,
input, input_len,
alp_tctx->alproto_local_storage[FlowGetProtoMapping(f->proto)][alproto]) < 0)
- {
- goto error;
- }
+ {
+ goto error;
+ }
}
/* set the packets to no inspection and reassembly if required */
* \author Anoop Saldanha <anoopsaldanha@gmail.com>
*/
-#ifndef __APP_LAYER_PARSER__H__
-#define __APP_LAYER_PARSER__H__
+#ifndef __APP_LAYER_PARSER_H__
+#define __APP_LAYER_PARSER_H__
#include "decode-events.h"
#include "util-file.h"
void AppLayerParserRestoreParserTable(void);
#endif
-#endif /* __APP_LAYER_PARSER__H__ */
+#endif /* __APP_LAYER_PARSER_H__ */
* \author Anoop Saldanha <anoopsaldanha@gmail.com>
*/
-#ifndef __APP_LAYER_PROTOS__H__
-#define __APP_LAYER_PROTOS__H__
+#ifndef __APP_LAYER_PROTOS_H__
+#define __APP_LAYER_PROTOS_H__
enum {
ALPROTO_UNKNOWN = 0,
*/
const char *AppProtoToString(AppProto alproto);
-#endif /* __APP_LAYER_PROTOS__H__ */
+#endif /* __APP_LAYER_PROTOS_H__ */
*/
if ((ssn->data_first_seen_dir != APP_LAYER_DATA_ALREADY_SENT_TO_APP_LAYER) &&
(first_data_dir) && !(first_data_dir & flags))
- {
- FlowSetSessionNoApplayerInspectionFlag(f);
- StreamTcpSetStreamFlagAppProtoDetectionCompleted(&ssn->server);
- StreamTcpSetStreamFlagAppProtoDetectionCompleted(&ssn->client);
- goto failure;
- }
+ {
+ FlowSetSessionNoApplayerInspectionFlag(f);
+ StreamTcpSetStreamFlagAppProtoDetectionCompleted(&ssn->server);
+ StreamTcpSetStreamFlagAppProtoDetectionCompleted(&ssn->client);
+ goto failure;
+ }
if (data_len > 0)
ssn->data_first_seen_dir = APP_LAYER_DATA_ALREADY_SENT_TO_APP_LAYER;
* \author Anoop Saldanha <anoopsaldanha@gmail.com>
*/
-#ifndef __APP_LAYER__H__
-#define __APP_LAYER__H__
+#ifndef __APP_LAYER_H__
+#define __APP_LAYER_H__
#include "threadvars.h"
#include "decode.h"