75 #define FLOW_PROTO_CHANGE_MAX_DEPTH 4096
77 #define MAX_COUNTER_SIZE 64
118 .valid_settings_ips = {
136 static inline int ProtoDetectDone(
const Flow *f,
const TcpSession *ssn, uint8_t direction) {
222 if (
flags & STREAM_TOSERVER) {
238 if (
flags & STREAM_TOSERVER) {
248 SCLogDebug(
"disable app layer for flow %p alproto %u ts %u tc %u",
255 AppLayerIncFlowCounter(
tv, f);
261 FlagPacketFlow(p, f, STREAM_TOCLIENT);
267 FlagPacketFlow(p, f, STREAM_TOSERVER);
269 SCLogDebug(
"disabled app layer for flow %p alproto %u ts %u tc %u",
292 static void TCPProtoDetectCheckBailConditions(
ThreadVars *
tv,
296 SCLogDebug(
"skip as long as TCP is not ESTABLISHED (TCP fast open)");
302 SCLogDebug(
"size_ts %" PRIu32
", size_tc %" PRIu32, size_ts, size_tc);
306 const uint32_t size_tc_limit =
308 const uint32_t size_ts_limit =
311 if (ProtoDetectDone(f, ssn, STREAM_TOSERVER) &&
312 ProtoDetectDone(f, ssn, STREAM_TOCLIENT))
318 }
else if (size_tc > 2 * size_tc_limit || size_ts > 2 * size_ts_limit) {
323 size_ts > size_ts_limit && size_tc == 0) {
329 size_tc > size_tc_limit && size_ts == 0) {
337 }
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) &&
357 DisableAppLayer(
tv, f, p);
364 if (stream == &ssn->
client) {
365 opposing_stream = &ssn->
server;
367 opposing_stream = &ssn->
client;
373 SCLogDebug(
"opposing dir has STREAMTCP_STREAM_FLAG_NOREASSEMBLY set");
381 opposing_stream, p, dir);
397 uint8_t direction = (
flags & STREAM_TOSERVER) ? 0 : 1;
399 if (
flags & STREAM_TOSERVER) {
407 SCLogDebug(
"Stream initializer (len %" PRIu32
")", data_len);
410 printf(
"=> Init Stream Data (app layer) -- start %s%s\n",
411 flags & STREAM_TOCLIENT ?
"toclient" :
"",
412 flags & STREAM_TOSERVER ?
"toserver" :
"");
414 printf(
"=> Init Stream Data -- end\n");
418 bool reverse_flow =
false;
423 IPPROTO_TCP,
flags, &reverse_flow);
425 SCLogDebug(
"alproto %u rev %s", *alproto, reverse_flow ?
"true" :
"false");
428 if (*alproto_otherdir !=
ALPROTO_UNKNOWN && *alproto_otherdir != *alproto) {
434 f->
alproto = *alproto_otherdir;
438 if (
flags & STREAM_TOCLIENT)
441 f->
alproto = *alproto_otherdir;
450 FlagPacketFlow(p, f,
flags);
460 SCLogDebug(
"reversing flow after proto detect told us so");
466 if (*stream == &ssn->
client) {
471 direction = 1 - direction;
479 AppLayerIncFlowCounter(
tv, f);
492 SCLogDebug(
"protocol %s needs first data in other direction",
495 if (TCPProtoDetectTriggerOpposingSide(
tv, ra_ctx,
496 p, ssn, *stream) != 0)
528 uint8_t first_data_dir;
543 if (first_data_dir && !(first_data_dir &
flags)) {
559 flags, data, data_len);
568 if (*stream == &ssn->
client) {
569 opposing_stream = &ssn->
server;
571 opposing_stream = &ssn->
client;
575 AppLayerIncFlowCounter(
tv, f);
603 DisableAppLayer(
tv, f, p);
609 uint8_t first_data_dir;
628 (first_data_dir) && !(first_data_dir &
flags))
658 AppLayerIncFlowCounter(
tv, f);
660 *alproto = *alproto_otherdir;
661 SCLogDebug(
"packet %"PRIu64
": pd done(us %u them %u), parser called (r==%d), APPLAYER_DETECT_PROTOCOL_ONLY_ONE_DIRECTION set",
662 p->
pcap_cnt, *alproto, *alproto_otherdir, r);
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) {
827 SCLogDebug(
"stream data (len %" PRIu32
" alproto "
828 "%"PRIu16
" (flow %p)", data_len, f->
alproto, f);
831 printf(
"=> Stream Data (app layer) -- start %s%s\n",
832 flags & STREAM_TOCLIENT ?
"toclient" :
"",
833 flags & STREAM_TOSERVER ?
"toserver" :
"");
835 printf(
"=> Stream Data -- end\n");
843 flags, data, data_len);
890 flags |= STREAM_TOSERVER;
894 flags |= STREAM_TOCLIENT;
903 SCLogDebug(
"Detecting AL proto on udp mesg (len %" PRIu32
")",
906 bool reverse_flow =
false;
916 f->
alproto = *alproto_otherdir;
918 *alproto = *alproto_otherdir;
930 f->
alproto = *alproto_otherdir;
939 if (*alproto_otherdir != *alproto) {
955 AppLayerIncFlowCounter(
tv, f);
961 SCLogDebug(
"reversing flow after proto detect told us so");
976 FlagPacketFlow(p, f, STREAM_TOSERVER);
977 FlagPacketFlow(p, f, STREAM_TOCLIENT);
979 SCLogDebug(
"data (len %" PRIu32
" ), alproto "
1024 printf(
"=========Supported App Layer Protocols=========\n");
1026 if (alprotos[alproto] == 1)
1034 static void AppLayerNamesSetup(
void)
1081 AppLayerNamesSetup();
1112 if (app_tctx == NULL)
1132 if (app_tctx == NULL)
1173 static bool IsAppLayerErrorExceptionPolicyStatsValid(
enum ExceptionPolicy policy)
1181 static void AppLayerSetupExceptionPolicyPerProtoCounters(
1182 uint8_t ipproto_map,
AppProto alproto,
const char *alproto_str,
const char *ipproto_suffix)
1187 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1190 "app_layer.error.%s%s.exception_policy.%s", alproto_str, ipproto_suffix,
1199 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1201 const char *
str =
"app_layer.flow.";
1202 const char *estr =
"app_layer.error.";
1207 FatalError(
"Unable to alloc applayer_counter_names.");
1211 FatalError(
"Unable to alloc applayer_counters.");
1216 const char *eps_default_str =
"app_layer.error.exception_policy.";
1218 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1229 const uint8_t ipproto = ipprotos[p];
1231 const char *ipproto_suffix = (ipproto == IPPROTO_TCP) ?
"_tcp" :
"_udp";
1232 uint8_t ipprotos_all[256 / 8];
1235 if (alprotos[alproto] == 1) {
1236 const char *tx_str =
"app_layer.tx.";
1239 memset(ipprotos_all, 0,
sizeof(ipprotos_all));
1241 if ((ipprotos_all[IPPROTO_TCP / 8] & (1 << (IPPROTO_TCP % 8))) &&
1242 (ipprotos_all[IPPROTO_UDP / 8] & (1 << (IPPROTO_UDP % 8)))) {
1245 str, alproto_str, ipproto_suffix);
1248 tx_str, alproto_str, ipproto_suffix);
1250 if (ipproto == IPPROTO_TCP) {
1253 "%s%s%s.gap", estr, alproto_str, ipproto_suffix);
1257 "%s%s%s.alloc", estr, alproto_str, ipproto_suffix);
1260 "%s%s%s.parser", estr, alproto_str, ipproto_suffix);
1263 "%s%s%s.internal", estr, alproto_str, ipproto_suffix);
1265 AppLayerSetupExceptionPolicyPerProtoCounters(
1266 ipproto_map, alproto, alproto_str, ipproto_suffix);
1273 tx_str, alproto_str);
1275 if (ipproto == IPPROTO_TCP) {
1278 "%s%s.gap", estr, alproto_str);
1282 "%s%s.alloc", estr, alproto_str);
1285 "%s%s.parser", estr, alproto_str);
1288 "%s%s.internal", estr, alproto_str);
1289 AppLayerSetupExceptionPolicyPerProtoCounters(
1290 ipproto_map, alproto, alproto_str,
"");
1295 "failed", ipproto_suffix);
1296 if (ipproto == IPPROTO_TCP) {
1299 "%sfailed%s.gap", estr, ipproto_suffix);
1308 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1316 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1324 const uint8_t ipproto = ipprotos[p];
1328 if (alprotos[alproto] == 1) {
1335 if (ipproto == IPPROTO_TCP) {
1350 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1361 if (ipproto == IPPROTO_TCP) {
1384 #define TEST_START \
1385 Packet *p = PacketGetFromAlloc(); \
1389 StreamTcpThread *stt = NULL; \
1391 PacketQueueNoLock pq; \
1392 memset(&pq, 0, sizeof(PacketQueueNoLock)); \
1393 memset(&f, 0, sizeof(Flow)); \
1394 memset(&tv, 0, sizeof(ThreadVars)); \
1395 memset(&tcph, 0, sizeof(TCPHdr)); \
1397 FLOW_INITIALIZE(&f); \
1398 f.flags = FLOW_IPV4; \
1399 f.proto = IPPROTO_TCP; \
1401 PacketSetTCP(p, (uint8_t *)&tcph); \
1403 StreamTcpInitConfig(true); \
1404 IPPairInitConfig(true); \
1405 StreamTcpThreadInit(&tv, NULL, (void **)&stt); \
1408 tcph.th_win = htons(5480); \
1409 tcph.th_flags = TH_SYN; \
1410 p->flowflags = FLOW_PKT_TOSERVER; \
1411 p->payload_len = 0; \
1412 p->payload = NULL; \
1413 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1414 TcpSession *ssn = (TcpSession *)f.protoctx; \
1416 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1417 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1418 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1419 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1420 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1421 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1422 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1423 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1424 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1425 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1426 FAIL_IF(ssn->data_first_seen_dir != 0); \
1429 tcph.th_ack = htonl(1); \
1430 tcph.th_flags = TH_SYN | TH_ACK; \
1431 p->flowflags = FLOW_PKT_TOCLIENT; \
1432 p->payload_len = 0; \
1433 p->payload = NULL; \
1434 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1435 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1436 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1437 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1438 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1439 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1440 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1441 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1442 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1443 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1444 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1445 FAIL_IF(ssn->data_first_seen_dir != 0); \
1448 tcph.th_ack = htonl(1); \
1449 tcph.th_seq = htonl(1); \
1450 tcph.th_flags = TH_ACK; \
1451 p->flowflags = FLOW_PKT_TOSERVER; \
1452 p->payload_len = 0; \
1453 p->payload = NULL; \
1454 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1455 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1456 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1457 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1458 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1459 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1460 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1461 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1462 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1463 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1464 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1465 FAIL_IF(ssn->data_first_seen_dir != 0);
1467 StreamTcpSessionClear(p->flow->protoctx); \
1468 StreamTcpThreadDeinit(&tv, (void *)stt); \
1469 StreamTcpFreeConfig(true); \
1472 StatsThreadCleanup(&tv);
1477 static int AppLayerTest01(
void)
1482 uint8_t request[] = {
1483 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1484 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1485 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1486 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1487 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1488 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1489 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1490 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1491 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1492 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1493 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1494 tcph.th_ack = htonl(1);
1495 tcph.th_seq = htonl(1);
1514 uint8_t response[] = {
1515 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1516 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1517 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1518 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1519 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1520 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1521 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1522 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1523 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1524 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1525 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1526 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1527 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1528 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1529 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1530 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1531 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1532 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1533 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1534 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1535 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1536 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1537 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1538 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1539 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1540 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1541 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1542 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1543 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1544 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1545 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1546 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1547 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1548 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1549 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1550 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1551 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1552 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1553 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1554 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1555 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1556 tcph.th_ack = htonl(88);
1557 tcph.th_seq = htonl(1);
1576 tcph.th_ack = htonl(328);
1577 tcph.th_seq = htonl(88);
1602 static int AppLayerTest02(
void)
1607 uint8_t request1[] = { 0x47, 0x45, };
1608 tcph.th_ack = htonl(1);
1609 tcph.th_seq = htonl(1);
1628 tcph.th_ack = htonl(3);
1629 tcph.th_seq = htonl(1);
1648 uint8_t request2[] = {
1649 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1650 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1651 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1652 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1653 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1654 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1655 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1656 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1657 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1658 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1659 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1660 tcph.th_ack = htonl(1);
1661 tcph.th_seq = htonl(3);
1680 uint8_t response[] = {
1681 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1682 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1683 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1684 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1685 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1686 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1687 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1688 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1689 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1690 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1691 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1692 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1693 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1694 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1695 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1696 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1697 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1698 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1699 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1700 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1701 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1702 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1703 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1704 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1705 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1706 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1707 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1708 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1709 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1710 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1711 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1712 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1713 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1714 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1715 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1716 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1717 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1718 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1719 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1720 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1721 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1722 tcph.th_ack = htonl(88);
1723 tcph.th_seq = htonl(1);
1742 tcph.th_ack = htonl(328);
1743 tcph.th_seq = htonl(88);
1768 static int AppLayerTest03(
void)
1773 uint8_t request[] = {
1774 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1775 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1776 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1777 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1778 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1779 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1780 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1781 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1782 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1783 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1784 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1785 tcph.th_ack = htonl(1);
1786 tcph.th_seq = htonl(1);
1805 uint8_t response[] = {
1806 0x58, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1807 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1808 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1809 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1810 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1811 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1812 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1813 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1814 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1815 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1816 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1817 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1818 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1819 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1820 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1821 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1822 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1823 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1824 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1825 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1826 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1827 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1828 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1829 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1830 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1831 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1832 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1833 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1834 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1835 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1836 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1837 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1838 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1839 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1840 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1841 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1842 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1843 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1844 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1845 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1846 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1847 tcph.th_ack = htonl(88);
1848 tcph.th_seq = htonl(1);
1867 tcph.th_ack = htonl(328);
1868 tcph.th_seq = htonl(88);
1893 static int AppLayerTest04(
void)
1898 uint8_t request[] = {
1899 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1900 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1901 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1902 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1903 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1904 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1905 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1906 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1907 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1908 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1909 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1911 tcph.th_ack = htonl(1);
1912 tcph.th_seq = htonl(1);
1931 uint8_t response1[] = { 0x58, 0x54, 0x54, 0x50, };
1933 tcph.th_ack = htonl(88);
1934 tcph.th_seq = htonl(1);
1953 tcph.th_ack = htonl(5);
1954 tcph.th_seq = htonl(88);
1973 uint8_t response2[] = {
1974 0x2f, 0x31, 0x2e, 0x31,
1975 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1976 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1977 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1978 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1979 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1980 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1981 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1982 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1983 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1984 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1985 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1986 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1987 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1988 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1989 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1990 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1991 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1992 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1993 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1994 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1995 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1996 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1997 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1998 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1999 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2000 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2001 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2002 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2003 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2004 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2005 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2006 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2007 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2008 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2009 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2010 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2011 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2012 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2013 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2014 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2016 tcph.th_ack = htonl(88);
2017 tcph.th_seq = htonl(5);
2036 tcph.th_ack = htonl(328);
2037 tcph.th_seq = htonl(88);
2062 static int AppLayerTest05(
void)
2067 uint8_t request[] = {
2068 0x48, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2069 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2070 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2071 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2072 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2073 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2074 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2075 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2076 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2077 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2078 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2080 tcph.th_ack = htonl(1);
2081 tcph.th_seq = htonl(1);
2100 uint8_t response[] = {
2101 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2102 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2103 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2104 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2105 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2106 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2107 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2108 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2109 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2110 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2111 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2112 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2113 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2114 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2115 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2116 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2117 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2118 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2119 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2120 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2121 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2122 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2123 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2124 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2125 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2126 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2127 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2128 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2129 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2130 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2131 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2132 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2133 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2134 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2135 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2136 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2137 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2138 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2139 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2140 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2141 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2143 tcph.th_ack = htonl(88);
2144 tcph.th_seq = htonl(1);
2163 tcph.th_ack = htonl(328);
2164 tcph.th_seq = htonl(88);
2189 static int AppLayerTest06(
void)
2194 uint8_t response[] = {
2195 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2196 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2197 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2198 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2199 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2200 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2201 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2202 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2203 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2204 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2205 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2206 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2207 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2208 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2209 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2210 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2211 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2212 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2213 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2214 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2215 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2216 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2217 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2218 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2219 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2220 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2221 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2222 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2223 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2224 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2225 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2226 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2227 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2228 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2229 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2230 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2231 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2232 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2233 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2234 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2235 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2236 tcph.th_ack = htonl(1);
2237 tcph.th_seq = htonl(1);
2256 uint8_t request[] = {
2257 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2258 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2259 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2260 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2261 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2262 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2263 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2264 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2265 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2266 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2267 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2268 tcph.th_ack = htonl(328);
2269 tcph.th_seq = htonl(1);
2287 tcph.th_ack = htonl(1 +
sizeof(request));
2288 tcph.th_seq = htonl(328);
2313 static int AppLayerTest07(
void)
2318 uint8_t request[] = {
2319 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2320 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2321 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2322 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2323 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2324 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2325 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2326 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2327 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2328 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2329 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2330 tcph.th_ack = htonl(1);
2331 tcph.th_seq = htonl(1);
2350 uint8_t response[] = { 0x05, 0x00, 0x4d, 0x42, 0x00, 0x01, 0x2e, 0x31, 0x20, 0x32, 0x30, 0x30,
2351 0x20, 0x4f, 0x4b, 0x0d, 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46, 0x72, 0x69, 0x2c,
2352 0x20, 0x32, 0x33, 0x20, 0x53, 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20, 0x30, 0x36,
2353 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65, 0x72,
2354 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2355 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69, 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f,
2356 0x32, 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,
2357 0x64, 0x3a, 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34, 0x20, 0x4e, 0x6f, 0x76, 0x20,
2358 0x32, 0x30, 0x31, 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a, 0x34, 0x36, 0x20, 0x47,
2359 0x4d, 0x54, 0x0d, 0x0a, 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61, 0x62, 0x38, 0x39,
2360 0x36, 0x35, 0x2d, 0x32, 0x63, 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61, 0x37, 0x66,
2361 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x52,
2362 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2363 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20,
2364 0x34, 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a,
2365 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
2366 0x2d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d,
2367 0x6c, 0x0d, 0x0a, 0x58, 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76, 0x6f, 0x69, 0x64,
2368 0x20, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d, 0x0a, 0x0d,
2369 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x68,
2370 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2371 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2372 tcph.th_ack = htonl(88);
2373 tcph.th_seq = htonl(1);
2392 tcph.th_ack = htonl(328);
2393 tcph.th_seq = htonl(88);
2420 static int AppLayerTest09(
void)
2425 uint8_t request1[] = {
2426 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64 };
2427 tcph.th_ack = htonl(1);
2428 tcph.th_seq = htonl(1);
2447 tcph.th_ack = htonl(9);
2448 tcph.th_seq = htonl(1);
2467 uint8_t request2[] = {
2468 0x44, 0x44, 0x45, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2469 tcph.th_ack = htonl(1);
2470 tcph.th_seq = htonl(9);
2489 uint8_t response[] = {
2490 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2491 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2492 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2493 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2494 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2495 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2496 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2497 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2498 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2499 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2500 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2501 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2502 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2503 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2504 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2505 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2506 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2507 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2508 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2509 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2510 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2511 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2512 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2513 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2514 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2515 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2516 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2517 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2518 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2519 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2520 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2521 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2522 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2523 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2524 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2525 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2526 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2527 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2528 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2529 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2530 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2531 tcph.th_ack = htonl(18);
2532 tcph.th_seq = htonl(1);
2551 tcph.th_ack = htonl(328);
2552 tcph.th_seq = htonl(18);
2578 static int AppLayerTest10(
void)
2583 uint8_t request1[] = {
2584 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2585 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2586 tcph.th_ack = htonl(1);
2587 tcph.th_seq = htonl(1);
2606 tcph.th_ack = htonl(18);
2607 tcph.th_seq = htonl(1);
2626 uint8_t response[] = {
2627 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2628 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2629 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2630 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2631 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2632 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2633 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2634 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2635 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2636 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2637 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2638 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2639 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2640 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2641 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2642 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2643 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2644 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2645 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2646 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2647 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2648 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2649 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2650 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2651 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2652 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2653 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2654 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2655 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2656 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2657 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2658 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2659 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2660 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2661 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2662 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2663 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2664 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2665 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2666 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2667 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2668 tcph.th_ack = htonl(18);
2669 tcph.th_seq = htonl(1);
2688 tcph.th_ack = htonl(328);
2689 tcph.th_seq = htonl(18);
2716 static int AppLayerTest11(
void)
2721 uint8_t request1[] = {
2722 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2723 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2724 tcph.th_ack = htonl(1);
2725 tcph.th_seq = htonl(1);
2744 tcph.th_ack = htonl(18);
2745 tcph.th_seq = htonl(1);
2764 uint8_t response1[] = {
2765 0x55, 0x74, 0x54, 0x50, };
2766 tcph.th_ack = htonl(18);
2767 tcph.th_seq = htonl(1);
2786 tcph.th_ack = htonl(5);
2787 tcph.th_seq = htonl(18);
2805 uint8_t response2[] = {
2806 0x2f, 0x31, 0x2e, 0x31,
2807 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2808 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2809 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2810 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2811 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2812 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2813 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2814 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2815 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2816 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2817 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2818 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2819 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2820 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2821 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2822 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2823 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2824 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2825 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2826 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2827 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2828 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2829 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2830 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2831 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2832 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2833 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2834 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2835 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2836 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2837 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2838 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2839 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2840 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2841 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2842 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2843 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2844 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2845 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2846 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2847 tcph.th_ack = htonl(18);
2848 tcph.th_seq = htonl(5);
2867 tcph.th_ack = htonl(328);
2868 tcph.th_seq = htonl(18);