73 #define FLOW_PROTO_CHANGE_MAX_DEPTH 4096
75 #define MAX_COUNTER_SIZE 64
104 static inline int ProtoDetectDone(
const Flow *f,
const TcpSession *ssn, uint8_t direction) {
171 if (
flags & STREAM_TOSERVER) {
187 if (
flags & STREAM_TOSERVER) {
197 SCLogDebug(
"disable app layer for flow %p alproto %u ts %u tc %u",
204 AppLayerIncFlowCounter(
tv, f);
210 FlagPacketFlow(p, f, STREAM_TOCLIENT);
216 FlagPacketFlow(p, f, STREAM_TOSERVER);
218 SCLogDebug(
"disabled app layer for flow %p alproto %u ts %u tc %u",
241 static void TCPProtoDetectCheckBailConditions(
ThreadVars *
tv,
245 SCLogDebug(
"skip as long as TCP is not ESTABLISHED (TCP fast open)");
251 SCLogDebug(
"size_ts %" PRIu32
", size_tc %" PRIu32, size_ts, size_tc);
255 const uint32_t size_tc_limit =
257 const uint32_t size_ts_limit =
260 if (ProtoDetectDone(f, ssn, STREAM_TOSERVER) &&
261 ProtoDetectDone(f, ssn, STREAM_TOCLIENT))
267 }
else if (size_tc > 2 * size_tc_limit || size_ts > 2 * size_ts_limit) {
272 size_ts > size_ts_limit && size_tc == 0) {
278 size_tc > size_tc_limit && size_ts == 0) {
286 }
else if (size_tc > size_tc_limit &&
FLOW_IS_PP_DONE(f, STREAM_TOSERVER) &&
296 }
else if (size_ts > size_ts_limit &&
FLOW_IS_PP_DONE(f, STREAM_TOCLIENT) &&
306 DisableAppLayer(
tv, f, p);
314 if (stream == &ssn->
client) {
315 opposing_stream = &ssn->
server;
317 opposing_stream = &ssn->
client;
323 SCLogDebug(
"opposing dir has STREAMTCP_STREAM_FLAG_NOREASSEMBLY set");
331 opposing_stream, p, dir);
347 uint8_t direction = (
flags & STREAM_TOSERVER) ? 0 : 1;
349 if (
flags & STREAM_TOSERVER) {
357 SCLogDebug(
"Stream initializer (len %" PRIu32
")", data_len);
360 printf(
"=> Init Stream Data (app layer) -- start %s%s\n",
361 flags & STREAM_TOCLIENT ?
"toclient" :
"",
362 flags & STREAM_TOSERVER ?
"toserver" :
"");
364 printf(
"=> Init Stream Data -- end\n");
368 bool reverse_flow =
false;
373 IPPROTO_TCP,
flags, &reverse_flow);
375 SCLogDebug(
"alproto %u rev %s", *alproto, reverse_flow ?
"true" :
"false");
378 if (*alproto_otherdir !=
ALPROTO_UNKNOWN && *alproto_otherdir != *alproto) {
384 f->
alproto = *alproto_otherdir;
388 if (
flags & STREAM_TOCLIENT)
391 f->
alproto = *alproto_otherdir;
400 FlagPacketFlow(p, f,
flags);
410 SCLogDebug(
"reversing flow after proto detect told us so");
414 if (*stream == &ssn->
client) {
419 direction = 1 - direction;
427 AppLayerIncFlowCounter(
tv, f);
440 SCLogDebug(
"protocol %s needs first data in other direction",
443 if (TCPProtoDetectTriggerOpposingSide(
tv, ra_ctx,
444 p, ssn, *stream) != 0)
476 uint8_t first_data_dir;
491 if (first_data_dir && !(first_data_dir &
flags)) {
507 flags, data, data_len);
537 DisableAppLayer(
tv, f, p);
543 uint8_t first_data_dir;
562 (first_data_dir) && !(first_data_dir &
flags))
593 *alproto = *alproto_otherdir;
594 SCLogDebug(
"packet %"PRIu64
": pd done(us %u them %u), parser called (r==%d), APPLAYER_DETECT_PROTOCOL_ONLY_ONE_DIRECTION set",
595 p->
pcap_cnt, *alproto, *alproto_otherdir, r);
602 AppLayerIncFlowCounter(
tv, f);
603 FlagPacketFlow(p, f,
flags);
605 }
else if (
flags & STREAM_EOF) {
608 AppLayerIncFlowCounter(
tv, f);
619 DisableAppLayer(
tv, f, p);
622 TCPProtoDetectCheckBailConditions(
tv, f, ssn, p);
631 DisableAppLayer(
tv, f, p);
658 SCLogDebug(
"STREAMTCP_FLAG_APP_LAYER_DISABLED is set");
662 const uint8_t direction = (
flags & STREAM_TOSERVER) ? 0 : 1;
664 if (
flags & STREAM_TOSERVER) {
672 if (
flags & STREAM_GAP) {
675 SCLogDebug(
"ALPROTO_UNKNOWN flow %p, due to GAP in stream start", f);
680 AppLayerIncFlowCounter(
tv, f);
684 SCLogDebug(
"Cannot handle gap while changing protocol");
689 flags, data, data_len);
709 if (TCPProtoDetect(
tv, ra_ctx, app_tctx, p, f, ssn, stream, data, data_len,
flags, dir) !=
715 void *alstate_orig = f->
alstate;
723 TCPProtoDetect(
tv, ra_ctx, app_tctx, p, f, ssn, stream, data, data_len,
flags, dir);
734 if (alstate_orig == f->
alstate) {
758 SCLogDebug(
"stream data (len %" PRIu32
" alproto "
759 "%"PRIu16
" (flow %p)", data_len, f->
alproto, f);
762 printf(
"=> Stream Data (app layer) -- start %s%s\n",
763 flags & STREAM_TOCLIENT ?
"toclient" :
"",
764 flags & STREAM_TOSERVER ?
"toserver" :
"");
766 printf(
"=> Stream Data -- end\n");
774 flags, data, data_len);
820 flags |= STREAM_TOSERVER;
824 flags |= STREAM_TOCLIENT;
829 AppLayerProfilingReset(tctx);
833 SCLogDebug(
"Detecting AL proto on udp mesg (len %" PRIu32
")",
836 bool reverse_flow =
false;
846 f->
alproto = *alproto_otherdir;
848 *alproto = *alproto_otherdir;
860 f->
alproto = *alproto_otherdir;
869 if (*alproto_otherdir != *alproto) {
885 AppLayerIncFlowCounter(
tv, f);
891 SCLogDebug(
"reversing flow after proto detect told us so");
906 FlagPacketFlow(p, f, STREAM_TOSERVER);
907 FlagPacketFlow(p, f, STREAM_TOCLIENT);
909 SCLogDebug(
"data (len %" PRIu32
" ), alproto "
953 printf(
"=========Supported App Layer Protocols=========\n");
954 for (alproto = 0; alproto <
ALPROTO_MAX; alproto++) {
955 if (alprotos[alproto] == 1)
996 if (app_tctx == NULL)
1016 if (app_tctx == NULL)
1051 #define IPPROTOS_MAX 2
1054 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1056 const char *
str =
"app_layer.flow.";
1057 const char *estr =
"app_layer.error.";
1062 const uint8_t ipproto = ipprotos[p];
1064 const uint8_t other_ipproto = ipproto == IPPROTO_TCP ? IPPROTO_UDP : IPPROTO_TCP;
1065 const char *ipproto_suffix = (ipproto == IPPROTO_TCP) ?
"_tcp" :
"_udp";
1068 if (alprotos[alproto] == 1) {
1069 const char *tx_str =
"app_layer.tx.";
1076 "%s%s%s",
str, alproto_str, ipproto_suffix);
1079 "%s%s%s", tx_str, alproto_str, ipproto_suffix);
1081 if (ipproto == IPPROTO_TCP) {
1084 "%s%s%s.gap", estr, alproto_str, ipproto_suffix);
1088 "%s%s%s.alloc", estr, alproto_str, ipproto_suffix);
1091 "%s%s%s.parser", estr, alproto_str, ipproto_suffix);
1094 "%s%s%s.internal", estr, alproto_str, ipproto_suffix);
1098 "%s%s",
str, alproto_str);
1101 "%s%s", tx_str, alproto_str);
1103 if (ipproto == IPPROTO_TCP) {
1106 "%s%s.gap", estr, alproto_str);
1110 "%s%s.alloc", estr, alproto_str);
1113 "%s%s.parser", estr, alproto_str);
1116 "%s%s.internal", estr, alproto_str);
1121 "%s%s%s",
str,
"failed", ipproto_suffix);
1122 if (ipproto == IPPROTO_TCP) {
1125 "%sfailed%s.gap", estr, ipproto_suffix);
1134 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1139 const uint8_t ipproto = ipprotos[p];
1143 if (alprotos[alproto] == 1) {
1150 if (ipproto == IPPROTO_TCP) {
1164 if (ipproto == IPPROTO_TCP) {
1187 #define TEST_START \
1188 Packet *p = PacketGetFromAlloc(); \
1192 StreamTcpThread *stt = NULL; \
1194 PacketQueueNoLock pq; \
1195 memset(&pq, 0, sizeof(PacketQueueNoLock)); \
1196 memset(&f, 0, sizeof(Flow)); \
1197 memset(&tv, 0, sizeof(ThreadVars)); \
1198 memset(&tcph, 0, sizeof(TCPHdr)); \
1200 FLOW_INITIALIZE(&f); \
1201 f.flags = FLOW_IPV4; \
1202 f.proto = IPPROTO_TCP; \
1206 StreamTcpInitConfig(true); \
1207 IPPairInitConfig(true); \
1208 StreamTcpThreadInit(&tv, NULL, (void **)&stt); \
1211 tcph.th_win = htons(5480); \
1212 tcph.th_flags = TH_SYN; \
1213 p->flowflags = FLOW_PKT_TOSERVER; \
1214 p->payload_len = 0; \
1215 p->payload = NULL; \
1216 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1217 TcpSession *ssn = (TcpSession *)f.protoctx; \
1219 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1220 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1221 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1222 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1223 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1224 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1225 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1226 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1227 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1228 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1229 FAIL_IF(ssn->data_first_seen_dir != 0); \
1232 p->tcph->th_ack = htonl(1); \
1233 p->tcph->th_flags = TH_SYN | TH_ACK; \
1234 p->flowflags = FLOW_PKT_TOCLIENT; \
1235 p->payload_len = 0; \
1236 p->payload = NULL; \
1237 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1238 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1239 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1240 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1241 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1242 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1243 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1244 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1245 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1246 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1247 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1248 FAIL_IF(ssn->data_first_seen_dir != 0); \
1251 p->tcph->th_ack = htonl(1); \
1252 p->tcph->th_seq = htonl(1); \
1253 p->tcph->th_flags = TH_ACK; \
1254 p->flowflags = FLOW_PKT_TOSERVER; \
1255 p->payload_len = 0; \
1256 p->payload = NULL; \
1257 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1258 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1259 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1260 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1261 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1262 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1263 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1264 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1265 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1266 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1267 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1268 FAIL_IF(ssn->data_first_seen_dir != 0);
1270 StreamTcpSessionClear(p->flow->protoctx); \
1271 StreamTcpThreadDeinit(&tv, (void *)stt); \
1272 StreamTcpFreeConfig(true); \
1275 StatsThreadCleanup(&tv);
1280 static int AppLayerTest01(
void)
1285 uint8_t request[] = {
1286 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1287 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1288 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1289 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1290 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1291 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1292 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1293 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1294 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1295 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1296 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1297 p->
tcph->th_ack = htonl(1);
1298 p->
tcph->th_seq = htonl(1);
1317 uint8_t response[] = {
1318 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1319 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1320 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1321 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1322 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1323 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1324 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1325 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1326 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1327 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1328 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1329 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1330 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1331 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1332 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1333 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1334 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1335 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1336 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1337 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1338 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1339 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1340 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1341 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1342 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1343 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1344 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1345 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1346 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1347 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1348 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1349 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1350 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1351 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1352 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1353 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1354 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1355 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1356 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1357 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1358 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1359 p->
tcph->th_ack = htonl(88);
1360 p->
tcph->th_seq = htonl(1);
1379 p->
tcph->th_ack = htonl(328);
1380 p->
tcph->th_seq = htonl(88);
1405 static int AppLayerTest02(
void)
1410 uint8_t request1[] = { 0x47, 0x45, };
1411 p->
tcph->th_ack = htonl(1);
1412 p->
tcph->th_seq = htonl(1);
1431 p->
tcph->th_ack = htonl(3);
1432 p->
tcph->th_seq = htonl(1);
1451 uint8_t request2[] = {
1452 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1453 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1454 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1455 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1456 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1457 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1458 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1459 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1460 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1461 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1462 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1463 p->
tcph->th_ack = htonl(1);
1464 p->
tcph->th_seq = htonl(3);
1483 uint8_t response[] = {
1484 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1485 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1486 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1487 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1488 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1489 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1490 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1491 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1492 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1493 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1494 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1495 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1496 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1497 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1498 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1499 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1500 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1501 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1502 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1503 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1504 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1505 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1506 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1507 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1508 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1509 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1510 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1511 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1512 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1513 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1514 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1515 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1516 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1517 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1518 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1519 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1520 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1521 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1522 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1523 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1524 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1525 p->
tcph->th_ack = htonl(88);
1526 p->
tcph->th_seq = htonl(1);
1545 p->
tcph->th_ack = htonl(328);
1546 p->
tcph->th_seq = htonl(88);
1571 static int AppLayerTest03(
void)
1576 uint8_t request[] = {
1577 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1578 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1579 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1580 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1581 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1582 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1583 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1584 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1585 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1586 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1587 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1588 p->
tcph->th_ack = htonl(1);
1589 p->
tcph->th_seq = htonl(1);
1608 uint8_t response[] = {
1609 0x58, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1610 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1611 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1612 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1613 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1614 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1615 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1616 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1617 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1618 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1619 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1620 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1621 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1622 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1623 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1624 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1625 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1626 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1627 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1628 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1629 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1630 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1631 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1632 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1633 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1634 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1635 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1636 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1637 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1638 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1639 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1640 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1641 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1642 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1643 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1644 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1645 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1646 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1647 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1648 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1649 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1650 p->
tcph->th_ack = htonl(88);
1651 p->
tcph->th_seq = htonl(1);
1670 p->
tcph->th_ack = htonl(328);
1671 p->
tcph->th_seq = htonl(88);
1696 static int AppLayerTest04(
void)
1701 uint8_t request[] = {
1702 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1703 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1704 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1705 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1706 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1707 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1708 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1709 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1710 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1711 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1712 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1714 p->
tcph->th_ack = htonl(1);
1715 p->
tcph->th_seq = htonl(1);
1734 uint8_t response1[] = { 0x58, 0x54, 0x54, 0x50, };
1736 p->
tcph->th_ack = htonl(88);
1737 p->
tcph->th_seq = htonl(1);
1756 p->
tcph->th_ack = htonl(5);
1757 p->
tcph->th_seq = htonl(88);
1776 uint8_t response2[] = {
1777 0x2f, 0x31, 0x2e, 0x31,
1778 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1779 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1780 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1781 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1782 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1783 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1784 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1785 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1786 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1787 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1788 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1789 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1790 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1791 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1792 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1793 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1794 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1795 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1796 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1797 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1798 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1799 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1800 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1801 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1802 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1803 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1804 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1805 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1806 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1807 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1808 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1809 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1810 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1811 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1812 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1813 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1814 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1815 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1816 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1817 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1819 p->
tcph->th_ack = htonl(88);
1820 p->
tcph->th_seq = htonl(5);
1839 p->
tcph->th_ack = htonl(328);
1840 p->
tcph->th_seq = htonl(88);
1865 static int AppLayerTest05(
void)
1870 uint8_t request[] = {
1871 0x48, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1872 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1873 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1874 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1875 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1876 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1877 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1878 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1879 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1880 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1881 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1883 p->
tcph->th_ack = htonl(1);
1884 p->
tcph->th_seq = htonl(1);
1903 uint8_t response[] = {
1904 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1905 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1906 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1907 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1908 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1909 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1910 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1911 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1912 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1913 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1914 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1915 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1916 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1917 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1918 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1919 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1920 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1921 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1922 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1923 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1924 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1925 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1926 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1927 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1928 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1929 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1930 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1931 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1932 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1933 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1934 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1935 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1936 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1937 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1938 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1939 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1940 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1941 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1942 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1943 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1944 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1946 p->
tcph->th_ack = htonl(88);
1947 p->
tcph->th_seq = htonl(1);
1966 p->
tcph->th_ack = htonl(328);
1967 p->
tcph->th_seq = htonl(88);
1992 static int AppLayerTest06(
void)
1997 uint8_t response[] = {
1998 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1999 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2000 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2001 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2002 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2003 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2004 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2005 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2006 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2007 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2008 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2009 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2010 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2011 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2012 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2013 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2014 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2015 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2016 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2017 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2018 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2019 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2020 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2021 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2022 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2023 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2024 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2025 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2026 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2027 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2028 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2029 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2030 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2031 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2032 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2033 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2034 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2035 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2036 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2037 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2038 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2039 p->
tcph->th_ack = htonl(1);
2040 p->
tcph->th_seq = htonl(1);
2059 uint8_t request[] = {
2060 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2061 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2062 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2063 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2064 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2065 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2066 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2067 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2068 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2069 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2070 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2071 p->
tcph->th_ack = htonl(328);
2072 p->
tcph->th_seq = htonl(1);
2090 p->
tcph->th_ack = htonl(1 +
sizeof(request));
2091 p->
tcph->th_seq = htonl(328);
2116 static int AppLayerTest07(
void)
2121 uint8_t request[] = {
2122 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2123 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2124 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2125 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2126 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2127 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2128 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2129 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2130 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2131 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2132 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2133 p->
tcph->th_ack = htonl(1);
2134 p->
tcph->th_seq = htonl(1);
2153 uint8_t response[] = { 0x05, 0x00, 0x4d, 0x42, 0x00, 0x01, 0x2e, 0x31, 0x20, 0x32, 0x30, 0x30,
2154 0x20, 0x4f, 0x4b, 0x0d, 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46, 0x72, 0x69, 0x2c,
2155 0x20, 0x32, 0x33, 0x20, 0x53, 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20, 0x30, 0x36,
2156 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65, 0x72,
2157 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2158 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69, 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f,
2159 0x32, 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,
2160 0x64, 0x3a, 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34, 0x20, 0x4e, 0x6f, 0x76, 0x20,
2161 0x32, 0x30, 0x31, 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a, 0x34, 0x36, 0x20, 0x47,
2162 0x4d, 0x54, 0x0d, 0x0a, 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61, 0x62, 0x38, 0x39,
2163 0x36, 0x35, 0x2d, 0x32, 0x63, 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61, 0x37, 0x66,
2164 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x52,
2165 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2166 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20,
2167 0x34, 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a,
2168 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
2169 0x2d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d,
2170 0x6c, 0x0d, 0x0a, 0x58, 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76, 0x6f, 0x69, 0x64,
2171 0x20, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d, 0x0a, 0x0d,
2172 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x68,
2173 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2174 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2175 p->
tcph->th_ack = htonl(88);
2176 p->
tcph->th_seq = htonl(1);
2195 p->
tcph->th_ack = htonl(328);
2196 p->
tcph->th_seq = htonl(88);
2221 static int AppLayerTest08(
void)
2226 uint8_t request[] = { 0x05, 0x00, 0x54, 0x20, 0x00, 0x01, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x68,
2227 0x74, 0x6d, 0x6c, 0x20, 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30, 0x0d, 0x0a, 0x48,
2228 0x6f, 0x73, 0x74, 0x3a, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x0d,
2229 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41, 0x70,
2230 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2231 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20, 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2232 p->
tcph->th_ack = htonl(1);
2233 p->
tcph->th_seq = htonl(1);
2252 uint8_t response[] = {
2253 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2254 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2255 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2256 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2257 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2258 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2259 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2260 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2261 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2262 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2263 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2264 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2265 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2266 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2267 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2268 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2269 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2270 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2271 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2272 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2273 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2274 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2275 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2276 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2277 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2278 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2279 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2280 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2281 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2282 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2283 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2284 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2285 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2286 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2287 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2288 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2289 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2290 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2291 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2292 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2293 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2294 p->
tcph->th_ack = htonl(88);
2295 p->
tcph->th_seq = htonl(1);
2314 p->
tcph->th_ack = htonl(328);
2315 p->
tcph->th_seq = htonl(88);
2342 static int AppLayerTest09(
void)
2347 uint8_t request1[] = {
2348 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64 };
2349 p->
tcph->th_ack = htonl(1);
2350 p->
tcph->th_seq = htonl(1);
2369 p->
tcph->th_ack = htonl(9);
2370 p->
tcph->th_seq = htonl(1);
2389 uint8_t request2[] = {
2390 0x44, 0x44, 0x45, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2391 p->
tcph->th_ack = htonl(1);
2392 p->
tcph->th_seq = htonl(9);
2411 uint8_t response[] = {
2412 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2413 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2414 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2415 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2416 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2417 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2418 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2419 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2420 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2421 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2422 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2423 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2424 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2425 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2426 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2427 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2428 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2429 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2430 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2431 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2432 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2433 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2434 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2435 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2436 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2437 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2438 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2439 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2440 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2441 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2442 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2443 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2444 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2445 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2446 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2447 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2448 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2449 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2450 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2451 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2452 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2453 p->
tcph->th_ack = htonl(18);
2454 p->
tcph->th_seq = htonl(1);
2473 p->
tcph->th_ack = htonl(328);
2474 p->
tcph->th_seq = htonl(18);
2500 static int AppLayerTest10(
void)
2505 uint8_t request1[] = {
2506 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2507 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2508 p->
tcph->th_ack = htonl(1);
2509 p->
tcph->th_seq = htonl(1);
2528 p->
tcph->th_ack = htonl(18);
2529 p->
tcph->th_seq = htonl(1);
2548 uint8_t response[] = {
2549 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2550 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2551 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2552 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2553 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2554 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2555 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2556 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2557 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2558 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2559 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2560 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2561 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2562 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2563 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2564 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2565 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2566 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2567 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2568 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2569 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2570 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2571 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2572 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2573 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2574 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2575 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2576 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2577 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2578 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2579 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2580 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2581 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2582 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2583 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2584 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2585 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2586 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2587 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2588 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2589 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2590 p->
tcph->th_ack = htonl(18);
2591 p->
tcph->th_seq = htonl(1);
2610 p->
tcph->th_ack = htonl(328);
2611 p->
tcph->th_seq = htonl(18);
2638 static int AppLayerTest11(
void)
2643 uint8_t request1[] = {
2644 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2645 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2646 p->
tcph->th_ack = htonl(1);
2647 p->
tcph->th_seq = htonl(1);
2666 p->
tcph->th_ack = htonl(18);
2667 p->
tcph->th_seq = htonl(1);
2686 uint8_t response1[] = {
2687 0x55, 0x74, 0x54, 0x50, };
2688 p->
tcph->th_ack = htonl(18);
2689 p->
tcph->th_seq = htonl(1);
2708 p->
tcph->th_ack = htonl(5);
2709 p->
tcph->th_seq = htonl(18);
2727 uint8_t response2[] = {
2728 0x2f, 0x31, 0x2e, 0x31,
2729 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2730 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2731 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2732 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2733 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2734 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2735 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2736 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2737 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2738 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2739 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2740 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2741 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2742 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2743 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2744 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2745 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2746 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2747 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2748 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2749 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2750 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2751 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2752 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2753 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2754 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2755 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2756 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2757 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2758 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2759 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2760 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2761 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2762 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2763 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2764 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2765 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2766 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2767 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2768 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2769 p->
tcph->th_ack = htonl(18);
2770 p->
tcph->th_seq = htonl(5);
2789 p->
tcph->th_ack = htonl(328);
2790 p->
tcph->th_seq = htonl(18);