76 #define FLOW_PROTO_CHANGE_MAX_DEPTH 4096
78 #define MAX_COUNTER_SIZE 64
120 .valid_settings_ips = {
139 static inline int ProtoDetectDone(
const Flow *f,
const TcpSession *ssn, uint8_t direction) {
225 if (
flags & STREAM_TOSERVER) {
241 if (
flags & STREAM_TOSERVER) {
251 SCLogDebug(
"disable app layer for flow %p alproto %u ts %u tc %u",
258 AppLayerIncFlowCounter(
tv, f);
264 FlagPacketFlow(p, f, STREAM_TOCLIENT);
270 FlagPacketFlow(p, f, STREAM_TOSERVER);
272 SCLogDebug(
"disabled app layer for flow %p alproto %u ts %u tc %u",
295 static void TCPProtoDetectCheckBailConditions(
ThreadVars *
tv,
299 SCLogDebug(
"skip as long as TCP is not ESTABLISHED (TCP fast open)");
305 SCLogDebug(
"size_ts %" PRIu32
", size_tc %" PRIu32, size_ts, size_tc);
309 const uint32_t size_tc_limit =
311 const uint32_t size_ts_limit =
314 if (ProtoDetectDone(f, ssn, STREAM_TOSERVER) &&
315 ProtoDetectDone(f, ssn, STREAM_TOCLIENT))
321 }
else if (size_tc > 2 * size_tc_limit || size_ts > 2 * size_ts_limit) {
326 size_ts > size_ts_limit && size_tc == 0) {
331 size_tc > size_tc_limit && size_ts == 0) {
338 }
else if (size_tc > size_tc_limit &&
FLOW_IS_PP_DONE(f, STREAM_TOSERVER) &&
347 }
else if (size_ts > size_ts_limit &&
FLOW_IS_PP_DONE(f, STREAM_TOCLIENT) &&
356 DisableAppLayer(
tv, f, p);
363 if (stream == &ssn->
client) {
364 opposing_stream = &ssn->
server;
366 opposing_stream = &ssn->
client;
372 SCLogDebug(
"opposing dir has STREAMTCP_STREAM_FLAG_NOREASSEMBLY set");
380 opposing_stream, p, dir);
396 uint8_t direction = (
flags & STREAM_TOSERVER) ? 0 : 1;
398 if (
flags & STREAM_TOSERVER) {
406 SCLogDebug(
"Stream initializer (len %" PRIu32
")", data_len);
409 printf(
"=> Init Stream Data (app layer) -- start %s%s\n",
410 flags & STREAM_TOCLIENT ?
"toclient" :
"",
411 flags & STREAM_TOSERVER ?
"toserver" :
"");
413 printf(
"=> Init Stream Data -- end\n");
417 bool reverse_flow =
false;
422 IPPROTO_TCP,
flags, &reverse_flow);
424 SCLogDebug(
"alproto %u rev %s", *alproto, reverse_flow ?
"true" :
"false");
427 if (*alproto_otherdir !=
ALPROTO_UNKNOWN && *alproto_otherdir != *alproto) {
433 f->
alproto = *alproto_otherdir;
437 if (
flags & STREAM_TOCLIENT)
440 f->
alproto = *alproto_otherdir;
449 FlagPacketFlow(p, f,
flags);
459 SCLogDebug(
"reversing flow after proto detect told us so");
465 if (*stream == &ssn->
client) {
470 direction = 1 - direction;
478 AppLayerIncFlowCounter(
tv, f);
491 SCLogDebug(
"protocol %s needs first data in other direction",
494 if (TCPProtoDetectTriggerOpposingSide(
tv, ra_ctx,
495 p, ssn, *stream) != 0)
527 uint8_t first_data_dir;
542 if (first_data_dir && !(first_data_dir &
flags)) {
558 flags, data, data_len);
567 if (*stream == &ssn->
client) {
568 opposing_stream = &ssn->
server;
570 opposing_stream = &ssn->
client;
574 AppLayerIncFlowCounter(
tv, f);
602 DisableAppLayer(
tv, f, p);
608 uint8_t first_data_dir;
627 (first_data_dir) && !(first_data_dir &
flags))
657 AppLayerIncFlowCounter(
tv, f);
659 *alproto = *alproto_otherdir;
660 SCLogDebug(
"packet %"PRIu64
": pd done(us %u them %u), parser called (r==%d), APPLAYER_DETECT_PROTOCOL_ONLY_ONE_DIRECTION set",
661 p->
pcap_cnt, *alproto, *alproto_otherdir, r);
668 FlagPacketFlow(p, f,
flags);
670 }
else if (
flags & STREAM_EOF) {
673 AppLayerIncFlowCounter(
tv, f);
684 DisableAppLayer(
tv, f, p);
687 TCPProtoDetectCheckBailConditions(
tv, f, ssn, p);
697 DisableAppLayer(
tv, f, p);
724 SCLogDebug(
"STREAMTCP_FLAG_APP_LAYER_DISABLED is set");
728 const uint8_t direction = (
flags & STREAM_TOSERVER) ? 0 : 1;
730 if (
flags & STREAM_TOSERVER) {
738 if (
flags & STREAM_GAP) {
742 SCLogDebug(
"ALPROTO_UNKNOWN flow %p, due to GAP in stream start", f);
747 AppLayerIncFlowCounter(
tv, f);
751 SCLogDebug(
"Cannot handle gap while changing protocol");
756 flags, data, data_len);
777 if (TCPProtoDetect(
tv, ra_ctx, app_tctx, p, f, ssn, stream, data, data_len,
flags,
778 app_update_dir) != 0) {
783 void *alstate_orig = f->
alstate;
790 int rd = TCPProtoDetect(
791 tv, ra_ctx, app_tctx, p, f, ssn, stream, data, data_len,
flags, app_update_dir);
802 if (alstate_orig == f->
alstate) {
824 SCLogDebug(
"stream data (len %" PRIu32
" alproto "
825 "%"PRIu16
" (flow %p)", data_len, f->
alproto, f);
828 printf(
"=> Stream Data (app layer) -- start %s%s\n",
829 flags & STREAM_TOCLIENT ?
"toclient" :
"",
830 flags & STREAM_TOSERVER ?
"toserver" :
"");
832 printf(
"=> Stream Data -- end\n");
840 flags, data, data_len);
887 flags |= STREAM_TOSERVER;
891 flags |= STREAM_TOCLIENT;
900 SCLogDebug(
"Detecting AL proto on udp mesg (len %" PRIu32
")",
903 bool reverse_flow =
false;
913 f->
alproto = *alproto_otherdir;
915 *alproto = *alproto_otherdir;
927 f->
alproto = *alproto_otherdir;
936 if (*alproto_otherdir != *alproto) {
952 AppLayerIncFlowCounter(
tv, f);
958 SCLogDebug(
"reversing flow after proto detect told us so");
973 FlagPacketFlow(p, f, STREAM_TOSERVER);
974 FlagPacketFlow(p, f, STREAM_TOCLIENT);
976 SCLogDebug(
"data (len %" PRIu32
" ), alproto "
1021 printf(
"=========Supported App Layer Protocols=========\n");
1023 if (alprotos[alproto] == 1)
1031 static void AppLayerNamesSetup(
void)
1078 AppLayerNamesSetup();
1109 if (app_tctx == NULL)
1129 if (app_tctx == NULL)
1170 static bool IsAppLayerErrorExceptionPolicyStatsValid(
enum ExceptionPolicy policy)
1178 static void AppLayerSetupExceptionPolicyPerProtoCounters(
1179 uint8_t ipproto_map,
AppProto alproto,
const char *alproto_str,
const char *ipproto_suffix)
1184 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1187 "app_layer.error.%s%s.exception_policy.%s", alproto_str, ipproto_suffix,
1196 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1198 const char *
str =
"app_layer.flow.";
1199 const char *estr =
"app_layer.error.";
1204 FatalError(
"Unable to alloc applayer_counter_names.");
1208 FatalError(
"Unable to alloc applayer_counters.");
1213 const char *eps_default_str =
"exception_policy.app_layer.error.";
1215 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1226 const uint8_t ipproto = ipprotos[p];
1228 const char *ipproto_suffix = (ipproto == IPPROTO_TCP) ?
"_tcp" :
"_udp";
1229 uint8_t ipprotos_all[256 / 8];
1232 if (alprotos[alproto] == 1) {
1233 const char *tx_str =
"app_layer.tx.";
1236 memset(ipprotos_all, 0,
sizeof(ipprotos_all));
1238 if ((ipprotos_all[IPPROTO_TCP / 8] & (1 << (IPPROTO_TCP % 8))) &&
1239 (ipprotos_all[IPPROTO_UDP / 8] & (1 << (IPPROTO_UDP % 8)))) {
1242 str, alproto_str, ipproto_suffix);
1245 tx_str, alproto_str, ipproto_suffix);
1247 if (ipproto == IPPROTO_TCP) {
1250 "%s%s%s.gap", estr, alproto_str, ipproto_suffix);
1254 "%s%s%s.alloc", estr, alproto_str, ipproto_suffix);
1257 "%s%s%s.parser", estr, alproto_str, ipproto_suffix);
1260 "%s%s%s.internal", estr, alproto_str, ipproto_suffix);
1262 AppLayerSetupExceptionPolicyPerProtoCounters(
1263 ipproto_map, alproto, alproto_str, ipproto_suffix);
1270 tx_str, alproto_str);
1272 if (ipproto == IPPROTO_TCP) {
1275 "%s%s.gap", estr, alproto_str);
1279 "%s%s.alloc", estr, alproto_str);
1282 "%s%s.parser", estr, alproto_str);
1285 "%s%s.internal", estr, alproto_str);
1286 AppLayerSetupExceptionPolicyPerProtoCounters(
1287 ipproto_map, alproto, alproto_str,
"");
1292 "failed", ipproto_suffix);
1293 if (ipproto == IPPROTO_TCP) {
1296 "%sfailed%s.gap", estr, ipproto_suffix);
1305 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1313 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1321 const uint8_t ipproto = ipprotos[p];
1325 if (alprotos[alproto] == 1) {
1332 if (ipproto == IPPROTO_TCP) {
1347 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1358 if (ipproto == IPPROTO_TCP) {
1381 #define TEST_START \
1382 Packet *p = PacketGetFromAlloc(); \
1386 StreamTcpThread *stt = NULL; \
1388 PacketQueueNoLock pq; \
1389 memset(&pq, 0, sizeof(PacketQueueNoLock)); \
1390 memset(&f, 0, sizeof(Flow)); \
1391 memset(&tv, 0, sizeof(ThreadVars)); \
1392 memset(&tcph, 0, sizeof(TCPHdr)); \
1394 FLOW_INITIALIZE(&f); \
1395 f.flags = FLOW_IPV4; \
1396 f.proto = IPPROTO_TCP; \
1398 PacketSetTCP(p, (uint8_t *)&tcph); \
1400 StreamTcpInitConfig(true); \
1401 IPPairInitConfig(true); \
1402 StreamTcpThreadInit(&tv, NULL, (void **)&stt); \
1405 tcph.th_win = htons(5480); \
1406 tcph.th_flags = TH_SYN; \
1407 p->flowflags = FLOW_PKT_TOSERVER; \
1408 p->payload_len = 0; \
1409 p->payload = NULL; \
1410 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1411 TcpSession *ssn = (TcpSession *)f.protoctx; \
1413 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1414 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1415 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1416 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1417 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1418 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1419 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1420 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1421 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1422 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1423 FAIL_IF(ssn->data_first_seen_dir != 0); \
1426 tcph.th_ack = htonl(1); \
1427 tcph.th_flags = TH_SYN | TH_ACK; \
1428 p->flowflags = FLOW_PKT_TOCLIENT; \
1429 p->payload_len = 0; \
1430 p->payload = NULL; \
1431 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1432 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1433 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1434 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1435 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1436 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1437 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1438 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1439 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1440 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1441 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1442 FAIL_IF(ssn->data_first_seen_dir != 0); \
1445 tcph.th_ack = htonl(1); \
1446 tcph.th_seq = htonl(1); \
1447 tcph.th_flags = TH_ACK; \
1448 p->flowflags = FLOW_PKT_TOSERVER; \
1449 p->payload_len = 0; \
1450 p->payload = NULL; \
1451 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1452 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1453 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1454 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1455 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1456 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1457 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1458 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1459 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1460 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1461 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1462 FAIL_IF(ssn->data_first_seen_dir != 0);
1464 StreamTcpSessionClear(p->flow->protoctx); \
1465 StreamTcpThreadDeinit(&tv, (void *)stt); \
1466 StreamTcpFreeConfig(true); \
1470 StatsThreadCleanup(&tv);
1475 static int AppLayerTest01(
void)
1480 uint8_t request[] = {
1481 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1482 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1483 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1484 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1485 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1486 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1487 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1488 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1489 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1490 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1491 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1492 tcph.th_ack = htonl(1);
1493 tcph.th_seq = htonl(1);
1512 uint8_t response[] = {
1513 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1514 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1515 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1516 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1517 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1518 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1519 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1520 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1521 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1522 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1523 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1524 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1525 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1526 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1527 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1528 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1529 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1530 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1531 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1532 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1533 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1534 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1535 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1536 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1537 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1538 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1539 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1540 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1541 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1542 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1543 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1544 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1545 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1546 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1547 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1548 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1549 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1550 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1551 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1552 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1553 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1554 tcph.th_ack = htonl(88);
1555 tcph.th_seq = htonl(1);
1574 tcph.th_ack = htonl(328);
1575 tcph.th_seq = htonl(88);
1600 static int AppLayerTest02(
void)
1605 uint8_t request1[] = { 0x47, 0x45, };
1606 tcph.th_ack = htonl(1);
1607 tcph.th_seq = htonl(1);
1626 tcph.th_ack = htonl(3);
1627 tcph.th_seq = htonl(1);
1646 uint8_t request2[] = {
1647 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1648 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1649 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1650 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1651 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1652 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1653 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1654 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1655 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1656 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1657 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1658 tcph.th_ack = htonl(1);
1659 tcph.th_seq = htonl(3);
1678 uint8_t response[] = {
1679 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1680 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1681 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1682 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1683 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1684 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1685 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1686 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1687 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1688 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1689 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1690 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1691 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1692 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1693 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1694 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1695 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1696 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1697 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1698 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1699 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1700 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1701 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1702 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1703 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1704 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1705 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1706 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1707 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1708 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1709 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1710 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1711 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1712 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1713 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1714 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1715 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1716 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1717 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1718 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1719 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1720 tcph.th_ack = htonl(88);
1721 tcph.th_seq = htonl(1);
1740 tcph.th_ack = htonl(328);
1741 tcph.th_seq = htonl(88);
1766 static int AppLayerTest03(
void)
1771 uint8_t request[] = {
1772 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1773 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1774 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1775 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1776 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1777 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1778 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1779 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1780 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1781 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1782 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1783 tcph.th_ack = htonl(1);
1784 tcph.th_seq = htonl(1);
1803 uint8_t response[] = {
1804 0x58, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1805 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1806 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1807 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1808 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1809 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1810 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1811 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1812 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1813 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1814 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1815 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1816 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1817 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1818 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1819 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1820 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1821 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1822 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1823 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1824 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1825 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1826 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1827 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1828 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1829 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1830 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1831 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1832 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1833 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1834 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1835 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1836 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1837 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1838 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1839 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1840 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1841 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1842 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1843 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1844 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1845 tcph.th_ack = htonl(88);
1846 tcph.th_seq = htonl(1);
1865 tcph.th_ack = htonl(328);
1866 tcph.th_seq = htonl(88);
1891 static int AppLayerTest04(
void)
1896 uint8_t request[] = {
1897 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1898 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1899 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1900 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1901 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1902 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1903 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1904 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1905 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1906 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1907 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1909 tcph.th_ack = htonl(1);
1910 tcph.th_seq = htonl(1);
1929 uint8_t response1[] = { 0x58, 0x54, 0x54, 0x50, };
1931 tcph.th_ack = htonl(88);
1932 tcph.th_seq = htonl(1);
1951 tcph.th_ack = htonl(5);
1952 tcph.th_seq = htonl(88);
1971 uint8_t response2[] = {
1972 0x2f, 0x31, 0x2e, 0x31,
1973 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1974 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1975 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1976 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1977 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1978 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1979 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1980 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1981 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1982 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1983 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1984 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1985 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1986 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1987 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1988 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1989 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1990 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1991 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1992 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1993 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1994 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1995 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1996 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1997 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1998 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1999 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2000 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2001 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2002 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2003 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2004 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2005 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2006 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2007 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2008 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2009 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2010 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2011 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2012 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2014 tcph.th_ack = htonl(88);
2015 tcph.th_seq = htonl(5);
2034 tcph.th_ack = htonl(328);
2035 tcph.th_seq = htonl(88);
2060 static int AppLayerTest05(
void)
2065 uint8_t request[] = {
2066 0x48, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2067 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2068 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2069 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2070 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2071 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2072 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2073 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2074 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2075 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2076 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2078 tcph.th_ack = htonl(1);
2079 tcph.th_seq = htonl(1);
2098 uint8_t response[] = {
2099 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2100 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2101 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2102 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2103 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2104 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2105 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2106 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2107 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2108 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2109 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2110 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2111 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2112 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2113 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2114 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2115 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2116 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2117 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2118 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2119 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2120 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2121 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2122 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2123 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2124 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2125 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2126 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2127 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2128 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2129 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2130 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2131 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2132 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2133 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2134 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2135 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2136 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2137 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2138 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2139 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2141 tcph.th_ack = htonl(88);
2142 tcph.th_seq = htonl(1);
2161 tcph.th_ack = htonl(328);
2162 tcph.th_seq = htonl(88);
2187 static int AppLayerTest06(
void)
2192 uint8_t response[] = {
2193 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2194 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2195 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2196 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2197 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2198 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2199 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2200 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2201 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2202 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2203 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2204 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2205 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2206 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2207 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2208 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2209 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2210 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2211 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2212 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2213 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2214 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2215 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2216 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2217 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2218 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2219 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2220 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2221 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2222 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2223 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2224 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2225 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2226 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2227 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2228 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2229 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2230 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2231 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2232 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2233 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2234 tcph.th_ack = htonl(1);
2235 tcph.th_seq = htonl(1);
2254 uint8_t request[] = {
2255 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2256 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2257 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2258 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2259 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2260 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2261 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2262 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2263 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2264 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2265 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2266 tcph.th_ack = htonl(328);
2267 tcph.th_seq = htonl(1);
2285 tcph.th_ack = htonl(1 +
sizeof(request));
2286 tcph.th_seq = htonl(328);
2311 static int AppLayerTest07(
void)
2316 uint8_t request[] = {
2317 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2318 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2319 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2320 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2321 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2322 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2323 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2324 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2325 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2326 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2327 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2328 tcph.th_ack = htonl(1);
2329 tcph.th_seq = htonl(1);
2348 uint8_t response[] = { 0x05, 0x00, 0x4d, 0x42, 0x00, 0x01, 0x2e, 0x31, 0x20, 0x32, 0x30, 0x30,
2349 0x20, 0x4f, 0x4b, 0x0d, 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46, 0x72, 0x69, 0x2c,
2350 0x20, 0x32, 0x33, 0x20, 0x53, 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20, 0x30, 0x36,
2351 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65, 0x72,
2352 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2353 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69, 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f,
2354 0x32, 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,
2355 0x64, 0x3a, 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34, 0x20, 0x4e, 0x6f, 0x76, 0x20,
2356 0x32, 0x30, 0x31, 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a, 0x34, 0x36, 0x20, 0x47,
2357 0x4d, 0x54, 0x0d, 0x0a, 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61, 0x62, 0x38, 0x39,
2358 0x36, 0x35, 0x2d, 0x32, 0x63, 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61, 0x37, 0x66,
2359 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x52,
2360 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2361 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20,
2362 0x34, 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a,
2363 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
2364 0x2d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d,
2365 0x6c, 0x0d, 0x0a, 0x58, 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76, 0x6f, 0x69, 0x64,
2366 0x20, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d, 0x0a, 0x0d,
2367 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x68,
2368 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2369 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2370 tcph.th_ack = htonl(88);
2371 tcph.th_seq = htonl(1);
2390 tcph.th_ack = htonl(328);
2391 tcph.th_seq = htonl(88);
2418 static int AppLayerTest09(
void)
2423 uint8_t request1[] = {
2424 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64 };
2425 tcph.th_ack = htonl(1);
2426 tcph.th_seq = htonl(1);
2445 tcph.th_ack = htonl(9);
2446 tcph.th_seq = htonl(1);
2465 uint8_t request2[] = {
2466 0x44, 0x44, 0x45, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2467 tcph.th_ack = htonl(1);
2468 tcph.th_seq = htonl(9);
2487 uint8_t response[] = {
2488 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2489 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2490 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2491 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2492 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2493 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2494 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2495 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2496 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2497 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2498 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2499 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2500 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2501 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2502 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2503 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2504 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2505 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2506 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2507 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2508 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2509 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2510 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2511 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2512 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2513 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2514 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2515 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2516 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2517 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2518 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2519 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2520 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2521 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2522 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2523 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2524 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2525 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2526 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2527 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2528 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2529 tcph.th_ack = htonl(18);
2530 tcph.th_seq = htonl(1);
2549 tcph.th_ack = htonl(328);
2550 tcph.th_seq = htonl(18);
2576 static int AppLayerTest10(
void)
2581 uint8_t request1[] = {
2582 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2583 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2584 tcph.th_ack = htonl(1);
2585 tcph.th_seq = htonl(1);
2604 tcph.th_ack = htonl(18);
2605 tcph.th_seq = htonl(1);
2624 uint8_t response[] = {
2625 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2626 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2627 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2628 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2629 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2630 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2631 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2632 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2633 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2634 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2635 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2636 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2637 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2638 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2639 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2640 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2641 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2642 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2643 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2644 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2645 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2646 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2647 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2648 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2649 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2650 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2651 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2652 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2653 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2654 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2655 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2656 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2657 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2658 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2659 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2660 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2661 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2662 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2663 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2664 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2665 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2666 tcph.th_ack = htonl(18);
2667 tcph.th_seq = htonl(1);
2686 tcph.th_ack = htonl(328);
2687 tcph.th_seq = htonl(18);
2714 static int AppLayerTest11(
void)
2719 uint8_t request1[] = {
2720 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2721 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2722 tcph.th_ack = htonl(1);
2723 tcph.th_seq = htonl(1);
2742 tcph.th_ack = htonl(18);
2743 tcph.th_seq = htonl(1);
2762 uint8_t response1[] = {
2763 0x55, 0x74, 0x54, 0x50, };
2764 tcph.th_ack = htonl(18);
2765 tcph.th_seq = htonl(1);
2784 tcph.th_ack = htonl(5);
2785 tcph.th_seq = htonl(18);
2803 uint8_t response2[] = {
2804 0x2f, 0x31, 0x2e, 0x31,
2805 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2806 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2807 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2808 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2809 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2810 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2811 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2812 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2813 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2814 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2815 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2816 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2817 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2818 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2819 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2820 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2821 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2822 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2823 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2824 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2825 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2826 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2827 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2828 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2829 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2830 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2831 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2832 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2833 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2834 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2835 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2836 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2837 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2838 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2839 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2840 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2841 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2842 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2843 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2844 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2845 tcph.th_ack = htonl(18);
2846 tcph.th_seq = htonl(5);
2865 tcph.th_ack = htonl(328);
2866 tcph.th_seq = htonl(18);