Rename function pointer var to use the FuncPtr typing convention. Resupply "dns" as the alproto name for ALPROTO_DNS.

pull/567/head
Anoop Saldanha 12 years ago
parent 8ae92c7a5e
commit 16144fe38a

@ -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;
}

@ -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;
}

@ -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;

@ -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:

Loading…
Cancel
Save