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) {
1335 if (ipproto == IPPROTO_TCP) {
1350 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1362 if (ipproto == IPPROTO_TCP) {
1385 #define TEST_START \
1386 Packet *p = PacketGetFromAlloc(); \
1390 StreamTcpThread *stt = NULL; \
1392 PacketQueueNoLock pq; \
1393 memset(&pq, 0, sizeof(PacketQueueNoLock)); \
1394 memset(&f, 0, sizeof(Flow)); \
1395 memset(&tv, 0, sizeof(ThreadVars)); \
1396 StatsThreadInit(&tv.stats); \
1397 memset(&tcph, 0, sizeof(TCPHdr)); \
1399 FLOW_INITIALIZE(&f); \
1400 f.flags = FLOW_IPV4; \
1401 f.proto = IPPROTO_TCP; \
1403 PacketSetTCP(p, (uint8_t *)&tcph); \
1405 StreamTcpInitConfig(true); \
1406 IPPairInitConfig(true); \
1407 StreamTcpThreadInit(&tv, NULL, (void **)&stt); \
1410 tcph.th_win = htons(5480); \
1411 tcph.th_flags = TH_SYN; \
1412 p->flowflags = FLOW_PKT_TOSERVER; \
1413 p->payload_len = 0; \
1414 p->payload = NULL; \
1415 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1416 TcpSession *ssn = (TcpSession *)f.protoctx; \
1418 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1419 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1420 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1421 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1422 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1423 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1424 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1425 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1426 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1427 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1428 FAIL_IF(ssn->data_first_seen_dir != 0); \
1431 tcph.th_ack = htonl(1); \
1432 tcph.th_flags = TH_SYN | TH_ACK; \
1433 p->flowflags = FLOW_PKT_TOCLIENT; \
1434 p->payload_len = 0; \
1435 p->payload = NULL; \
1436 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1437 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1438 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1439 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1440 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1441 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1442 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1443 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1444 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1445 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1446 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1447 FAIL_IF(ssn->data_first_seen_dir != 0); \
1450 tcph.th_ack = htonl(1); \
1451 tcph.th_seq = htonl(1); \
1452 tcph.th_flags = TH_ACK; \
1453 p->flowflags = FLOW_PKT_TOSERVER; \
1454 p->payload_len = 0; \
1455 p->payload = NULL; \
1456 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1457 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1458 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1459 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1460 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1461 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1462 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1463 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1464 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1465 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1466 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1467 FAIL_IF(ssn->data_first_seen_dir != 0);
1469 StreamTcpSessionClear(p->flow->protoctx); \
1470 StreamTcpThreadDeinit(&tv, (void *)stt); \
1471 StreamTcpFreeConfig(true); \
1475 StatsThreadCleanup(&tv.stats);
1480 static int AppLayerTest01(
void)
1485 uint8_t request[] = {
1486 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1487 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1488 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1489 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1490 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1491 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1492 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1493 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1494 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1495 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1496 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1497 tcph.th_ack = htonl(1);
1498 tcph.th_seq = htonl(1);
1517 uint8_t response[] = {
1518 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1519 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1520 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1521 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1522 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1523 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1524 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1525 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1526 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1527 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1528 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1529 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1530 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1531 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1532 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1533 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1534 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1535 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1536 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1537 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1538 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1539 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1540 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1541 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1542 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1543 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1544 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1545 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1546 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1547 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1548 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1549 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1550 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1551 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1552 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1553 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1554 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1555 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1556 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1557 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1558 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1559 tcph.th_ack = htonl(88);
1560 tcph.th_seq = htonl(1);
1579 tcph.th_ack = htonl(328);
1580 tcph.th_seq = htonl(88);
1605 static int AppLayerTest02(
void)
1610 uint8_t request1[] = { 0x47, 0x45, };
1611 tcph.th_ack = htonl(1);
1612 tcph.th_seq = htonl(1);
1631 tcph.th_ack = htonl(3);
1632 tcph.th_seq = htonl(1);
1651 uint8_t request2[] = {
1652 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1653 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1654 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1655 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1656 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1657 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1658 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1659 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1660 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1661 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1662 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1663 tcph.th_ack = htonl(1);
1664 tcph.th_seq = htonl(3);
1683 uint8_t response[] = {
1684 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1685 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1686 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1687 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1688 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1689 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1690 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1691 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1692 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1693 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1694 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1695 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1696 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1697 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1698 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1699 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1700 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1701 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1702 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1703 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1704 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1705 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1706 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1707 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1708 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1709 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1710 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1711 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1712 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1713 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1714 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1715 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1716 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1717 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1718 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1719 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1720 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1721 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1722 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1723 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1724 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1725 tcph.th_ack = htonl(88);
1726 tcph.th_seq = htonl(1);
1745 tcph.th_ack = htonl(328);
1746 tcph.th_seq = htonl(88);
1771 static int AppLayerTest03(
void)
1776 uint8_t request[] = {
1777 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1778 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1779 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1780 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1781 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1782 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1783 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1784 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1785 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1786 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1787 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1788 tcph.th_ack = htonl(1);
1789 tcph.th_seq = htonl(1);
1808 uint8_t response[] = {
1809 0x58, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1810 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1811 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1812 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1813 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1814 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1815 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1816 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1817 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1818 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1819 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1820 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1821 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1822 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1823 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1824 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1825 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1826 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1827 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1828 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1829 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1830 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1831 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1832 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1833 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1834 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1835 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1836 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1837 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1838 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1839 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1840 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1841 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1842 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1843 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1844 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1845 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1846 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1847 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1848 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1849 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1850 tcph.th_ack = htonl(88);
1851 tcph.th_seq = htonl(1);
1870 tcph.th_ack = htonl(328);
1871 tcph.th_seq = htonl(88);
1896 static int AppLayerTest04(
void)
1901 uint8_t request[] = {
1902 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1903 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1904 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1905 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1906 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1907 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1908 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1909 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1910 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1911 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1912 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1914 tcph.th_ack = htonl(1);
1915 tcph.th_seq = htonl(1);
1934 uint8_t response1[] = { 0x58, 0x54, 0x54, 0x50, };
1936 tcph.th_ack = htonl(88);
1937 tcph.th_seq = htonl(1);
1956 tcph.th_ack = htonl(5);
1957 tcph.th_seq = htonl(88);
1976 uint8_t response2[] = {
1977 0x2f, 0x31, 0x2e, 0x31,
1978 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1979 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1980 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1981 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1982 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1983 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1984 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1985 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1986 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1987 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1988 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1989 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1990 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1991 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1992 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1993 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1994 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1995 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1996 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1997 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1998 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1999 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2000 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2001 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2002 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2003 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2004 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2005 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2006 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2007 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2008 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2009 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2010 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2011 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2012 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2013 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2014 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2015 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2016 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2017 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2019 tcph.th_ack = htonl(88);
2020 tcph.th_seq = htonl(5);
2039 tcph.th_ack = htonl(328);
2040 tcph.th_seq = htonl(88);
2065 static int AppLayerTest05(
void)
2070 uint8_t request[] = {
2071 0x48, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2072 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2073 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2074 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2075 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2076 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2077 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2078 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2079 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2080 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2081 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2083 tcph.th_ack = htonl(1);
2084 tcph.th_seq = htonl(1);
2103 uint8_t response[] = {
2104 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2105 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2106 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2107 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2108 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2109 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2110 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2111 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2112 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2113 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2114 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2115 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2116 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2117 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2118 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2119 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2120 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2121 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2122 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2123 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2124 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2125 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2126 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2127 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2128 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2129 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2130 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2131 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2132 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2133 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2134 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2135 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2136 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2137 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2138 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2139 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2140 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2141 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2142 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2143 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2144 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2146 tcph.th_ack = htonl(88);
2147 tcph.th_seq = htonl(1);
2166 tcph.th_ack = htonl(328);
2167 tcph.th_seq = htonl(88);
2192 static int AppLayerTest06(
void)
2197 uint8_t response[] = {
2198 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2199 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2200 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2201 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2202 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2203 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2204 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2205 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2206 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2207 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2208 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2209 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2210 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2211 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2212 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2213 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2214 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2215 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2216 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2217 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2218 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2219 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2220 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2221 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2222 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2223 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2224 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2225 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2226 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2227 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2228 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2229 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2230 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2231 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2232 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2233 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2234 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2235 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2236 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2237 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2238 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2239 tcph.th_ack = htonl(1);
2240 tcph.th_seq = htonl(1);
2259 uint8_t request[] = {
2260 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2261 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2262 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2263 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2264 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2265 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2266 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2267 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2268 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2269 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2270 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2271 tcph.th_ack = htonl(328);
2272 tcph.th_seq = htonl(1);
2290 tcph.th_ack = htonl(1 +
sizeof(request));
2291 tcph.th_seq = htonl(328);
2316 static int AppLayerTest07(
void)
2321 uint8_t request[] = {
2322 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2323 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2324 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2325 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2326 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2327 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2328 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2329 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2330 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2331 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2332 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2333 tcph.th_ack = htonl(1);
2334 tcph.th_seq = htonl(1);
2353 uint8_t response[] = { 0x05, 0x00, 0x4d, 0x42, 0x00, 0x01, 0x2e, 0x31, 0x20, 0x32, 0x30, 0x30,
2354 0x20, 0x4f, 0x4b, 0x0d, 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46, 0x72, 0x69, 0x2c,
2355 0x20, 0x32, 0x33, 0x20, 0x53, 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20, 0x30, 0x36,
2356 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65, 0x72,
2357 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2358 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69, 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f,
2359 0x32, 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,
2360 0x64, 0x3a, 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34, 0x20, 0x4e, 0x6f, 0x76, 0x20,
2361 0x32, 0x30, 0x31, 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a, 0x34, 0x36, 0x20, 0x47,
2362 0x4d, 0x54, 0x0d, 0x0a, 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61, 0x62, 0x38, 0x39,
2363 0x36, 0x35, 0x2d, 0x32, 0x63, 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61, 0x37, 0x66,
2364 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x52,
2365 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2366 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20,
2367 0x34, 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a,
2368 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
2369 0x2d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d,
2370 0x6c, 0x0d, 0x0a, 0x58, 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76, 0x6f, 0x69, 0x64,
2371 0x20, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d, 0x0a, 0x0d,
2372 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x68,
2373 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2374 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2375 tcph.th_ack = htonl(88);
2376 tcph.th_seq = htonl(1);
2395 tcph.th_ack = htonl(328);
2396 tcph.th_seq = htonl(88);
2423 static int AppLayerTest09(
void)
2428 uint8_t request1[] = {
2429 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64 };
2430 tcph.th_ack = htonl(1);
2431 tcph.th_seq = htonl(1);
2450 tcph.th_ack = htonl(9);
2451 tcph.th_seq = htonl(1);
2470 uint8_t request2[] = {
2471 0x44, 0x44, 0x45, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2472 tcph.th_ack = htonl(1);
2473 tcph.th_seq = htonl(9);
2492 uint8_t response[] = {
2493 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2494 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2495 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2496 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2497 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2498 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2499 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2500 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2501 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2502 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2503 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2504 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2505 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2506 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2507 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2508 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2509 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2510 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2511 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2512 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2513 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2514 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2515 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2516 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2517 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2518 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2519 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2520 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2521 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2522 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2523 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2524 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2525 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2526 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2527 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2528 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2529 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2530 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2531 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2532 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2533 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2534 tcph.th_ack = htonl(18);
2535 tcph.th_seq = htonl(1);
2554 tcph.th_ack = htonl(328);
2555 tcph.th_seq = htonl(18);
2581 static int AppLayerTest10(
void)
2586 uint8_t request1[] = {
2587 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2588 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2589 tcph.th_ack = htonl(1);
2590 tcph.th_seq = htonl(1);
2609 tcph.th_ack = htonl(18);
2610 tcph.th_seq = htonl(1);
2629 uint8_t response[] = {
2630 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2631 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2632 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2633 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2634 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2635 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2636 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2637 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2638 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2639 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2640 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2641 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2642 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2643 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2644 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2645 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2646 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2647 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2648 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2649 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2650 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2651 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2652 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2653 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2654 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2655 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2656 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2657 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2658 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2659 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2660 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2661 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2662 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2663 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2664 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2665 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2666 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2667 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2668 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2669 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2670 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2671 tcph.th_ack = htonl(18);
2672 tcph.th_seq = htonl(1);
2691 tcph.th_ack = htonl(328);
2692 tcph.th_seq = htonl(18);
2719 static int AppLayerTest11(
void)
2724 uint8_t request1[] = {
2725 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2726 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2727 tcph.th_ack = htonl(1);
2728 tcph.th_seq = htonl(1);
2747 tcph.th_ack = htonl(18);
2748 tcph.th_seq = htonl(1);
2767 uint8_t response1[] = {
2768 0x55, 0x74, 0x54, 0x50, };
2769 tcph.th_ack = htonl(18);
2770 tcph.th_seq = htonl(1);
2789 tcph.th_ack = htonl(5);
2790 tcph.th_seq = htonl(18);
2808 uint8_t response2[] = {
2809 0x2f, 0x31, 0x2e, 0x31,
2810 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2811 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2812 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2813 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2814 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2815 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2816 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2817 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2818 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2819 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2820 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2821 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2822 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2823 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2824 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2825 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2826 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2827 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2828 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2829 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2830 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2831 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2832 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2833 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2834 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2835 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2836 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2837 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2838 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2839 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2840 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2841 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2842 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2843 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2844 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2845 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2846 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2847 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2848 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2849 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2850 tcph.th_ack = htonl(18);
2851 tcph.th_seq = htonl(5);
2870 tcph.th_ack = htonl(328);
2871 tcph.th_seq = htonl(18);