From: Anoop Saldanha Date: Sat, 31 Aug 2013 02:36:26 +0000 (+0530) Subject: Rename function pointer var to use the FuncPtr typing convention. Resupply "dns"... X-Git-Tag: suricata-2.0beta2~286 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16144fe38aec318cbb129c566822b487ec715a82;p=thirdparty%2Fsuricata.git Rename function pointer var to use the FuncPtr typing convention. Resupply "dns" as the alproto name for ALPROTO_DNS. --- diff --git a/src/app-layer-detect-proto.c b/src/app-layer-detect-proto.c index 073d598043..76263961cc 100644 --- a/src/app-layer-detect-proto.c +++ b/src/app-layer-detect-proto.c @@ -576,8 +576,8 @@ uint16_t AppLayerDetectGetProto(AlpProtoDetectCtx *ctx, uint16_t pm_matches = AppLayerDetectGetProtoPMParser(ctx, tctx, f, buf, buflen, flags, ipproto, pm_results); uint8_t dir = (flags & STREAM_TOSERVER) ? 0 : 1; for (uint16_t i = 0; i < pm_matches; i++) { - if (al_proto_table[pm_results[i]].pp_alproto_map[dir] != NULL) { - if (pm_results[i] != al_proto_table[pm_results[i]].pp_alproto_map[dir](buf, buflen, NULL)) { + if (al_proto_table[pm_results[i]].PPAlprotoMap[dir] != NULL) { + if (pm_results[i] != al_proto_table[pm_results[i]].PPAlprotoMap[dir](buf, buflen, NULL)) { /* \todo set event - Needs some deliberation */ continue; } diff --git a/src/app-layer-parser.c b/src/app-layer-parser.c index b4f5e7d501..9b86782a7a 100644 --- a/src/app-layer-parser.c +++ b/src/app-layer-parser.c @@ -2280,7 +2280,7 @@ void AppLayerMapProbingParserAgainstAlproto(uint16_t al_proto, uint8_t flags, ProbingParserFPtr ProbingParser) { - al_proto_table[al_proto].pp_alproto_map[(flags & STREAM_TOSERVER) ? 0 : 1] = ProbingParser; + al_proto_table[al_proto].PPAlprotoMap[(flags & STREAM_TOSERVER) ? 0 : 1] = ProbingParser; return; } diff --git a/src/app-layer-parser.h b/src/app-layer-parser.h index 07c42d9097..d7e7b5ab31 100644 --- a/src/app-layer-parser.h +++ b/src/app-layer-parser.h @@ -72,7 +72,7 @@ typedef struct AppLayerProto_ { int (*StateGetEventInfo)(const char *event_name, int *event_id, AppLayerEventType *event_type); - ProbingParserFPtr pp_alproto_map[2]; + ProbingParserFPtr PPAlprotoMap[2]; /* The current values taken are STREAM_TOSERVER, STREAM_TOCLIENT */ uint8_t flags; diff --git a/src/app-layer-protos.c b/src/app-layer-protos.c index 37e3b34999..1bfe8c43ce 100644 --- a/src/app-layer-protos.c +++ b/src/app-layer-protos.c @@ -83,6 +83,8 @@ const char *TmModuleAlprotoToString(enum AppProto proto) proto_name = "dnsudp"; break; case ALPROTO_DNS: + proto_name = "dns"; + break; case ALPROTO_FAILED: case ALPROTO_TEST: case ALPROTO_MAX: