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), "
661 "APPLAYER_DETECT_PROTOCOL_ONLY_ONE_DIRECTION set",
669 FlagPacketFlow(p, f,
flags);
671 }
else if (
flags & STREAM_EOF) {
674 AppLayerIncFlowCounter(
tv, f);
685 DisableAppLayer(
tv, f, p);
688 TCPProtoDetectCheckBailConditions(
tv, f, ssn, p);
698 DisableAppLayer(
tv, f, p);
725 SCLogDebug(
"STREAMTCP_FLAG_APP_LAYER_DISABLED is set");
729 const uint8_t direction = (
flags & STREAM_TOSERVER) ? 0 : 1;
731 if (
flags & STREAM_TOSERVER) {
739 if (
flags & STREAM_GAP) {
743 SCLogDebug(
"ALPROTO_UNKNOWN flow %p, due to GAP in stream start", f);
748 AppLayerIncFlowCounter(
tv, f);
752 SCLogDebug(
"Cannot handle gap while changing protocol");
757 flags, data, data_len);
778 if (TCPProtoDetect(
tv, ra_ctx, app_tctx, p, f, ssn, stream, data, data_len,
flags,
779 app_update_dir) != 0) {
784 void *alstate_orig = f->
alstate;
791 int rd = TCPProtoDetect(
792 tv, ra_ctx, app_tctx, p, f, ssn, stream, data, data_len,
flags, app_update_dir);
803 if (alstate_orig == f->
alstate) {
825 SCLogDebug(
"stream data (len %" PRIu32
" alproto "
826 "%"PRIu16
" (flow %p)", data_len, f->
alproto, f);
829 printf(
"=> Stream Data (app layer) -- start %s%s\n",
830 flags & STREAM_TOCLIENT ?
"toclient" :
"",
831 flags & STREAM_TOSERVER ?
"toserver" :
"");
833 printf(
"=> Stream Data -- end\n");
841 flags, data, data_len);
888 flags |= STREAM_TOSERVER;
892 flags |= STREAM_TOCLIENT;
901 SCLogDebug(
"Detecting AL proto on udp mesg (len %" PRIu32
")",
904 bool reverse_flow =
false;
914 f->
alproto = *alproto_otherdir;
916 *alproto = *alproto_otherdir;
928 f->
alproto = *alproto_otherdir;
937 if (*alproto_otherdir != *alproto) {
953 AppLayerIncFlowCounter(
tv, f);
959 SCLogDebug(
"reversing flow after proto detect told us so");
978 FlagPacketFlow(p, f, STREAM_TOSERVER);
979 FlagPacketFlow(p, f, STREAM_TOCLIENT);
981 SCLogDebug(
"data (len %" PRIu32
" ), alproto "
1030 printf(
"=========Supported App Layer Protocols=========\n");
1032 if (alprotos[alproto] == 1)
1040 static void AppLayerNamesSetup(
void)
1087 AppLayerNamesSetup();
1118 if (app_tctx == NULL)
1138 if (app_tctx == NULL)
1179 static bool IsAppLayerErrorExceptionPolicyStatsValid(
enum ExceptionPolicy policy)
1187 static void AppLayerSetupExceptionPolicyPerProtoCounters(
1188 uint8_t ipproto_map,
AppProto alproto,
const char *alproto_str,
const char *ipproto_suffix)
1193 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1196 "app_layer.error.%s%s.exception_policy.%s", alproto_str, ipproto_suffix,
1205 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1207 const char *
str =
"app_layer.flow.";
1208 const char *estr =
"app_layer.error.";
1213 FatalError(
"Unable to alloc applayer_counter_names.");
1217 FatalError(
"Unable to alloc applayer_counters.");
1222 const char *eps_default_str =
"exception_policy.app_layer.error.";
1224 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1235 const uint8_t ipproto = ipprotos[p];
1237 const char *ipproto_suffix = (ipproto == IPPROTO_TCP) ?
"_tcp" :
"_udp";
1238 uint8_t ipprotos_all[256 / 8];
1241 if (alprotos[alproto] == 1) {
1242 const char *tx_str =
"app_layer.tx.";
1245 memset(ipprotos_all, 0,
sizeof(ipprotos_all));
1247 if ((ipprotos_all[IPPROTO_TCP / 8] & (1 << (IPPROTO_TCP % 8))) &&
1248 (ipprotos_all[IPPROTO_UDP / 8] & (1 << (IPPROTO_UDP % 8)))) {
1251 str, alproto_str, ipproto_suffix);
1254 tx_str, alproto_str, ipproto_suffix);
1256 if (ipproto == IPPROTO_TCP) {
1259 "%s%s%s.gap", estr, alproto_str, ipproto_suffix);
1263 "%s%s%s.alloc", estr, alproto_str, ipproto_suffix);
1266 "%s%s%s.parser", estr, alproto_str, ipproto_suffix);
1269 "%s%s%s.internal", estr, alproto_str, ipproto_suffix);
1271 AppLayerSetupExceptionPolicyPerProtoCounters(
1272 ipproto_map, alproto, alproto_str, ipproto_suffix);
1279 tx_str, alproto_str);
1281 if (ipproto == IPPROTO_TCP) {
1284 "%s%s.gap", estr, alproto_str);
1288 "%s%s.alloc", estr, alproto_str);
1291 "%s%s.parser", estr, alproto_str);
1294 "%s%s.internal", estr, alproto_str);
1295 AppLayerSetupExceptionPolicyPerProtoCounters(
1296 ipproto_map, alproto, alproto_str,
"");
1301 "failed", ipproto_suffix);
1302 if (ipproto == IPPROTO_TCP) {
1305 "%sfailed%s.gap", estr, ipproto_suffix);
1314 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1322 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1330 const uint8_t ipproto = ipprotos[p];
1334 if (alprotos[alproto] == 1) {
1344 if (ipproto == IPPROTO_TCP) {
1359 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1371 if (ipproto == IPPROTO_TCP) {
1394 #define TEST_START \
1395 Packet *p = PacketGetFromAlloc(); \
1399 StreamTcpThread *stt = NULL; \
1401 PacketQueueNoLock pq; \
1402 memset(&pq, 0, sizeof(PacketQueueNoLock)); \
1403 memset(&f, 0, sizeof(Flow)); \
1404 memset(&tv, 0, sizeof(ThreadVars)); \
1405 StatsThreadInit(&tv.stats); \
1406 memset(&tcph, 0, sizeof(TCPHdr)); \
1408 FLOW_INITIALIZE(&f); \
1409 f.flags = FLOW_IPV4; \
1410 f.proto = IPPROTO_TCP; \
1412 PacketSetTCP(p, (uint8_t *)&tcph); \
1414 StreamTcpInitConfig(true); \
1415 IPPairInitConfig(true); \
1416 StreamTcpThreadInit(&tv, NULL, (void **)&stt); \
1419 tcph.th_win = htons(5480); \
1420 tcph.th_flags = TH_SYN; \
1421 p->flowflags = FLOW_PKT_TOSERVER; \
1422 p->payload_len = 0; \
1423 p->payload = NULL; \
1424 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1425 TcpSession *ssn = (TcpSession *)f.protoctx; \
1427 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1428 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1429 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1430 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1431 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1432 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1433 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1434 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1435 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1436 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1437 FAIL_IF(ssn->data_first_seen_dir != 0); \
1440 tcph.th_ack = htonl(1); \
1441 tcph.th_flags = TH_SYN | TH_ACK; \
1442 p->flowflags = FLOW_PKT_TOCLIENT; \
1443 p->payload_len = 0; \
1444 p->payload = NULL; \
1445 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1446 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1447 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1448 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1449 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1450 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1451 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1452 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1453 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1454 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1455 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1456 FAIL_IF(ssn->data_first_seen_dir != 0); \
1459 tcph.th_ack = htonl(1); \
1460 tcph.th_seq = htonl(1); \
1461 tcph.th_flags = TH_ACK; \
1462 p->flowflags = FLOW_PKT_TOSERVER; \
1463 p->payload_len = 0; \
1464 p->payload = NULL; \
1465 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1466 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1467 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1468 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1469 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1470 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1471 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1472 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1473 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1474 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1475 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1476 FAIL_IF(ssn->data_first_seen_dir != 0);
1478 StreamTcpSessionClear(p->flow->protoctx); \
1479 StreamTcpThreadDeinit(&tv, (void *)stt); \
1480 StreamTcpFreeConfig(true); \
1484 StatsThreadCleanup(&tv.stats);
1489 static int AppLayerTest01(
void)
1494 uint8_t request[] = {
1495 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1496 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1497 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1498 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1499 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1500 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1501 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1502 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1503 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1504 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1505 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1506 tcph.th_ack = htonl(1);
1507 tcph.th_seq = htonl(1);
1526 uint8_t response[] = {
1527 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1528 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1529 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1530 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1531 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1532 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1533 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1534 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1535 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1536 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1537 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1538 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1539 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1540 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1541 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1542 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1543 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1544 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1545 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1546 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1547 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1548 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1549 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1550 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1551 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1552 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1553 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1554 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1555 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1556 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1557 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1558 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1559 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1560 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1561 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1562 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1563 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1564 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1565 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1566 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1567 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1568 tcph.th_ack = htonl(88);
1569 tcph.th_seq = htonl(1);
1588 tcph.th_ack = htonl(328);
1589 tcph.th_seq = htonl(88);
1614 static int AppLayerTest02(
void)
1619 uint8_t request1[] = { 0x47, 0x45, };
1620 tcph.th_ack = htonl(1);
1621 tcph.th_seq = htonl(1);
1640 tcph.th_ack = htonl(3);
1641 tcph.th_seq = htonl(1);
1660 uint8_t request2[] = {
1661 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1662 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1663 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1664 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1665 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1666 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1667 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1668 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1669 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1670 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1671 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1672 tcph.th_ack = htonl(1);
1673 tcph.th_seq = htonl(3);
1692 uint8_t response[] = {
1693 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1694 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1695 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1696 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1697 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1698 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1699 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1700 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1701 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1702 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1703 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1704 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1705 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1706 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1707 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1708 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1709 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1710 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1711 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1712 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1713 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1714 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1715 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1716 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1717 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1718 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1719 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1720 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1721 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1722 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1723 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1724 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1725 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1726 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1727 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1728 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1729 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1730 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1731 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1732 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1733 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1734 tcph.th_ack = htonl(88);
1735 tcph.th_seq = htonl(1);
1754 tcph.th_ack = htonl(328);
1755 tcph.th_seq = htonl(88);
1780 static int AppLayerTest03(
void)
1785 uint8_t request[] = {
1786 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1787 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1788 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1789 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1790 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1791 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1792 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1793 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1794 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1795 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1796 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1797 tcph.th_ack = htonl(1);
1798 tcph.th_seq = htonl(1);
1817 uint8_t response[] = {
1818 0x58, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1819 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1820 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1821 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1822 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1823 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1824 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1825 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1826 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1827 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1828 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1829 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1830 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1831 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1832 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1833 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1834 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1835 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1836 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1837 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1838 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1839 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1840 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1841 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1842 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1843 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1844 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1845 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1846 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1847 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1848 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1849 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1850 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1851 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1852 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1853 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1854 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1855 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1856 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1857 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1858 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1859 tcph.th_ack = htonl(88);
1860 tcph.th_seq = htonl(1);
1879 tcph.th_ack = htonl(328);
1880 tcph.th_seq = htonl(88);
1905 static int AppLayerTest04(
void)
1910 uint8_t request[] = {
1911 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1912 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1913 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1914 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1915 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1916 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1917 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1918 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1919 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1920 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1921 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1923 tcph.th_ack = htonl(1);
1924 tcph.th_seq = htonl(1);
1943 uint8_t response1[] = { 0x58, 0x54, 0x54, 0x50, };
1945 tcph.th_ack = htonl(88);
1946 tcph.th_seq = htonl(1);
1965 tcph.th_ack = htonl(5);
1966 tcph.th_seq = htonl(88);
1985 uint8_t response2[] = {
1986 0x2f, 0x31, 0x2e, 0x31,
1987 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1988 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1989 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1990 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1991 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1992 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1993 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1994 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1995 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1996 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1997 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1998 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1999 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2000 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2001 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2002 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2003 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2004 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2005 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2006 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2007 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2008 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2009 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2010 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2011 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2012 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2013 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2014 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2015 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2016 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2017 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2018 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2019 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2020 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2021 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2022 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2023 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2024 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2025 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2026 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2028 tcph.th_ack = htonl(88);
2029 tcph.th_seq = htonl(5);
2048 tcph.th_ack = htonl(328);
2049 tcph.th_seq = htonl(88);
2074 static int AppLayerTest05(
void)
2079 uint8_t request[] = {
2080 0x48, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2081 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2082 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2083 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2084 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2085 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2086 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2087 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2088 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2089 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2090 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2092 tcph.th_ack = htonl(1);
2093 tcph.th_seq = htonl(1);
2112 uint8_t response[] = {
2113 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2114 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2115 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2116 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2117 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2118 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2119 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2120 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2121 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2122 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2123 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2124 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2125 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2126 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2127 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2128 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2129 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2130 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2131 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2132 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2133 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2134 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2135 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2136 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2137 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2138 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2139 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2140 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2141 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2142 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2143 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2144 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2145 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2146 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2147 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2148 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2149 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2150 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2151 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2152 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2153 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2155 tcph.th_ack = htonl(88);
2156 tcph.th_seq = htonl(1);
2175 tcph.th_ack = htonl(328);
2176 tcph.th_seq = htonl(88);
2201 static int AppLayerTest06(
void)
2206 uint8_t response[] = {
2207 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2208 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2209 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2210 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2211 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2212 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2213 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2214 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2215 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2216 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2217 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2218 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2219 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2220 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2221 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2222 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2223 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2224 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2225 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2226 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2227 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2228 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2229 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2230 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2231 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2232 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2233 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2234 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2235 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2236 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2237 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2238 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2239 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2240 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2241 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2242 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2243 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2244 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2245 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2246 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2247 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2248 tcph.th_ack = htonl(1);
2249 tcph.th_seq = htonl(1);
2268 uint8_t request[] = {
2269 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2270 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2271 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2272 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2273 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2274 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2275 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2276 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2277 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2278 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2279 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2280 tcph.th_ack = htonl(328);
2281 tcph.th_seq = htonl(1);
2299 tcph.th_ack = htonl(1 +
sizeof(request));
2300 tcph.th_seq = htonl(328);
2325 static int AppLayerTest07(
void)
2330 uint8_t request[] = {
2331 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2332 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2333 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2334 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2335 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2336 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2337 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2338 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2339 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2340 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2341 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2342 tcph.th_ack = htonl(1);
2343 tcph.th_seq = htonl(1);
2362 uint8_t response[] = { 0x05, 0x00, 0x4d, 0x42, 0x00, 0x01, 0x2e, 0x31, 0x20, 0x32, 0x30, 0x30,
2363 0x20, 0x4f, 0x4b, 0x0d, 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46, 0x72, 0x69, 0x2c,
2364 0x20, 0x32, 0x33, 0x20, 0x53, 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20, 0x30, 0x36,
2365 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65, 0x72,
2366 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2367 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69, 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f,
2368 0x32, 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,
2369 0x64, 0x3a, 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34, 0x20, 0x4e, 0x6f, 0x76, 0x20,
2370 0x32, 0x30, 0x31, 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a, 0x34, 0x36, 0x20, 0x47,
2371 0x4d, 0x54, 0x0d, 0x0a, 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61, 0x62, 0x38, 0x39,
2372 0x36, 0x35, 0x2d, 0x32, 0x63, 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61, 0x37, 0x66,
2373 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x52,
2374 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2375 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20,
2376 0x34, 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a,
2377 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
2378 0x2d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d,
2379 0x6c, 0x0d, 0x0a, 0x58, 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76, 0x6f, 0x69, 0x64,
2380 0x20, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d, 0x0a, 0x0d,
2381 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x68,
2382 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2383 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2384 tcph.th_ack = htonl(88);
2385 tcph.th_seq = htonl(1);
2404 tcph.th_ack = htonl(328);
2405 tcph.th_seq = htonl(88);
2432 static int AppLayerTest09(
void)
2437 uint8_t request1[] = {
2438 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64 };
2439 tcph.th_ack = htonl(1);
2440 tcph.th_seq = htonl(1);
2459 tcph.th_ack = htonl(9);
2460 tcph.th_seq = htonl(1);
2479 uint8_t request2[] = {
2480 0x44, 0x44, 0x45, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2481 tcph.th_ack = htonl(1);
2482 tcph.th_seq = htonl(9);
2501 uint8_t response[] = {
2502 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2503 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2504 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2505 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2506 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2507 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2508 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2509 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2510 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2511 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2512 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2513 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2514 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2515 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2516 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2517 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2518 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2519 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2520 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2521 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2522 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2523 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2524 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2525 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2526 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2527 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2528 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2529 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2530 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2531 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2532 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2533 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2534 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2535 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2536 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2537 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2538 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2539 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2540 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2541 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2542 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2543 tcph.th_ack = htonl(18);
2544 tcph.th_seq = htonl(1);
2563 tcph.th_ack = htonl(328);
2564 tcph.th_seq = htonl(18);
2590 static int AppLayerTest10(
void)
2595 uint8_t request1[] = {
2596 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2597 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2598 tcph.th_ack = htonl(1);
2599 tcph.th_seq = htonl(1);
2618 tcph.th_ack = htonl(18);
2619 tcph.th_seq = htonl(1);
2638 uint8_t response[] = {
2639 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2640 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2641 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2642 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2643 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2644 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2645 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2646 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2647 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2648 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2649 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2650 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2651 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2652 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2653 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2654 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2655 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2656 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2657 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2658 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2659 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2660 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2661 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2662 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2663 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2664 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2665 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2666 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2667 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2668 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2669 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2670 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2671 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2672 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2673 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2674 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2675 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2676 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2677 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2678 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2679 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2680 tcph.th_ack = htonl(18);
2681 tcph.th_seq = htonl(1);
2700 tcph.th_ack = htonl(328);
2701 tcph.th_seq = htonl(18);
2728 static int AppLayerTest11(
void)
2733 uint8_t request1[] = {
2734 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2735 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2736 tcph.th_ack = htonl(1);
2737 tcph.th_seq = htonl(1);
2756 tcph.th_ack = htonl(18);
2757 tcph.th_seq = htonl(1);
2776 uint8_t response1[] = {
2777 0x55, 0x74, 0x54, 0x50, };
2778 tcph.th_ack = htonl(18);
2779 tcph.th_seq = htonl(1);
2798 tcph.th_ack = htonl(5);
2799 tcph.th_seq = htonl(18);
2817 uint8_t response2[] = {
2818 0x2f, 0x31, 0x2e, 0x31,
2819 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2820 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2821 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2822 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2823 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2824 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2825 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2826 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2827 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2828 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2829 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2830 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2831 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2832 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2833 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2834 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2835 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2836 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2837 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2838 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2839 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2840 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2841 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2842 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2843 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2844 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2845 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2846 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2847 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2848 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2849 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2850 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2851 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2852 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2853 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2854 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2855 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2856 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2857 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2858 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2859 tcph.th_ack = htonl(18);
2860 tcph.th_seq = htonl(5);
2879 tcph.th_ack = htonl(328);
2880 tcph.th_seq = htonl(18);