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");
977 FlagPacketFlow(p, f, STREAM_TOSERVER);
978 FlagPacketFlow(p, f, STREAM_TOCLIENT);
980 SCLogDebug(
"data (len %" PRIu32
" ), alproto "
1029 printf(
"=========Supported App Layer Protocols=========\n");
1031 if (alprotos[alproto] == 1)
1039 static void AppLayerNamesSetup(
void)
1086 AppLayerNamesSetup();
1117 if (app_tctx == NULL)
1137 if (app_tctx == NULL)
1178 static bool IsAppLayerErrorExceptionPolicyStatsValid(
enum ExceptionPolicy policy)
1186 static void AppLayerSetupExceptionPolicyPerProtoCounters(
1187 uint8_t ipproto_map,
AppProto alproto,
const char *alproto_str,
const char *ipproto_suffix)
1192 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1195 "app_layer.error.%s%s.exception_policy.%s", alproto_str, ipproto_suffix,
1204 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1206 const char *
str =
"app_layer.flow.";
1207 const char *estr =
"app_layer.error.";
1212 FatalError(
"Unable to alloc applayer_counter_names.");
1216 FatalError(
"Unable to alloc applayer_counters.");
1221 const char *eps_default_str =
"exception_policy.app_layer.error.";
1223 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1234 const uint8_t ipproto = ipprotos[p];
1236 const char *ipproto_suffix = (ipproto == IPPROTO_TCP) ?
"_tcp" :
"_udp";
1237 uint8_t ipprotos_all[256 / 8];
1240 if (alprotos[alproto] == 1) {
1241 const char *tx_str =
"app_layer.tx.";
1244 memset(ipprotos_all, 0,
sizeof(ipprotos_all));
1246 if ((ipprotos_all[IPPROTO_TCP / 8] & (1 << (IPPROTO_TCP % 8))) &&
1247 (ipprotos_all[IPPROTO_UDP / 8] & (1 << (IPPROTO_UDP % 8)))) {
1250 str, alproto_str, ipproto_suffix);
1253 tx_str, alproto_str, ipproto_suffix);
1255 if (ipproto == IPPROTO_TCP) {
1258 "%s%s%s.gap", estr, alproto_str, ipproto_suffix);
1262 "%s%s%s.alloc", estr, alproto_str, ipproto_suffix);
1265 "%s%s%s.parser", estr, alproto_str, ipproto_suffix);
1268 "%s%s%s.internal", estr, alproto_str, ipproto_suffix);
1270 AppLayerSetupExceptionPolicyPerProtoCounters(
1271 ipproto_map, alproto, alproto_str, ipproto_suffix);
1278 tx_str, alproto_str);
1280 if (ipproto == IPPROTO_TCP) {
1283 "%s%s.gap", estr, alproto_str);
1287 "%s%s.alloc", estr, alproto_str);
1290 "%s%s.parser", estr, alproto_str);
1293 "%s%s.internal", estr, alproto_str);
1294 AppLayerSetupExceptionPolicyPerProtoCounters(
1295 ipproto_map, alproto, alproto_str,
"");
1300 "failed", ipproto_suffix);
1301 if (ipproto == IPPROTO_TCP) {
1304 "%sfailed%s.gap", estr, ipproto_suffix);
1313 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1321 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1329 const uint8_t ipproto = ipprotos[p];
1333 if (alprotos[alproto] == 1) {
1343 if (ipproto == IPPROTO_TCP) {
1358 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1370 if (ipproto == IPPROTO_TCP) {
1393 #define TEST_START \
1394 Packet *p = PacketGetFromAlloc(); \
1398 StreamTcpThread *stt = NULL; \
1400 PacketQueueNoLock pq; \
1401 memset(&pq, 0, sizeof(PacketQueueNoLock)); \
1402 memset(&f, 0, sizeof(Flow)); \
1403 memset(&tv, 0, sizeof(ThreadVars)); \
1404 StatsThreadInit(&tv.stats); \
1405 memset(&tcph, 0, sizeof(TCPHdr)); \
1407 FLOW_INITIALIZE(&f); \
1408 f.flags = FLOW_IPV4; \
1409 f.proto = IPPROTO_TCP; \
1411 PacketSetTCP(p, (uint8_t *)&tcph); \
1413 StreamTcpInitConfig(true); \
1414 IPPairInitConfig(true); \
1415 StreamTcpThreadInit(&tv, NULL, (void **)&stt); \
1418 tcph.th_win = htons(5480); \
1419 tcph.th_flags = TH_SYN; \
1420 p->flowflags = FLOW_PKT_TOSERVER; \
1421 p->payload_len = 0; \
1422 p->payload = NULL; \
1423 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1424 TcpSession *ssn = (TcpSession *)f.protoctx; \
1426 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1427 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1428 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1429 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1430 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1431 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1432 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1433 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1434 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1435 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1436 FAIL_IF(ssn->data_first_seen_dir != 0); \
1439 tcph.th_ack = htonl(1); \
1440 tcph.th_flags = TH_SYN | TH_ACK; \
1441 p->flowflags = FLOW_PKT_TOCLIENT; \
1442 p->payload_len = 0; \
1443 p->payload = NULL; \
1444 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1445 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1446 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1447 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1448 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1449 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1450 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1451 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1452 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1453 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1454 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1455 FAIL_IF(ssn->data_first_seen_dir != 0); \
1458 tcph.th_ack = htonl(1); \
1459 tcph.th_seq = htonl(1); \
1460 tcph.th_flags = TH_ACK; \
1461 p->flowflags = FLOW_PKT_TOSERVER; \
1462 p->payload_len = 0; \
1463 p->payload = NULL; \
1464 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1465 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1466 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1467 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1468 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1469 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1470 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1471 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1472 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1473 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1474 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1475 FAIL_IF(ssn->data_first_seen_dir != 0);
1477 StreamTcpSessionClear(p->flow->protoctx); \
1478 StreamTcpThreadDeinit(&tv, (void *)stt); \
1479 StreamTcpFreeConfig(true); \
1483 StatsThreadCleanup(&tv.stats);
1488 static int AppLayerTest01(
void)
1493 uint8_t request[] = {
1494 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1495 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1496 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1497 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1498 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1499 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1500 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1501 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1502 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1503 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1504 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1505 tcph.th_ack = htonl(1);
1506 tcph.th_seq = htonl(1);
1525 uint8_t response[] = {
1526 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1527 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1528 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1529 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1530 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1531 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1532 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1533 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1534 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1535 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1536 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1537 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1538 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1539 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1540 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1541 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1542 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1543 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1544 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1545 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1546 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1547 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1548 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1549 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1550 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1551 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1552 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1553 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1554 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1555 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1556 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1557 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1558 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1559 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1560 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1561 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1562 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1563 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1564 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1565 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1566 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1567 tcph.th_ack = htonl(88);
1568 tcph.th_seq = htonl(1);
1587 tcph.th_ack = htonl(328);
1588 tcph.th_seq = htonl(88);
1613 static int AppLayerTest02(
void)
1618 uint8_t request1[] = { 0x47, 0x45, };
1619 tcph.th_ack = htonl(1);
1620 tcph.th_seq = htonl(1);
1639 tcph.th_ack = htonl(3);
1640 tcph.th_seq = htonl(1);
1659 uint8_t request2[] = {
1660 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1661 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1662 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1663 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1664 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1665 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1666 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1667 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1668 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1669 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1670 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1671 tcph.th_ack = htonl(1);
1672 tcph.th_seq = htonl(3);
1691 uint8_t response[] = {
1692 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1693 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1694 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1695 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1696 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1697 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1698 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1699 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1700 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1701 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1702 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1703 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1704 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1705 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1706 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1707 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1708 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1709 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1710 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1711 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1712 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1713 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1714 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1715 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1716 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1717 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1718 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1719 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1720 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1721 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1722 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1723 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1724 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1725 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1726 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1727 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1728 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1729 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1730 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1731 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1732 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1733 tcph.th_ack = htonl(88);
1734 tcph.th_seq = htonl(1);
1753 tcph.th_ack = htonl(328);
1754 tcph.th_seq = htonl(88);
1779 static int AppLayerTest03(
void)
1784 uint8_t request[] = {
1785 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1786 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1787 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1788 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1789 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1790 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1791 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1792 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1793 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1794 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1795 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1796 tcph.th_ack = htonl(1);
1797 tcph.th_seq = htonl(1);
1816 uint8_t response[] = {
1817 0x58, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1818 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1819 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1820 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1821 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1822 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1823 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1824 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1825 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1826 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1827 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1828 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1829 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1830 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1831 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1832 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1833 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1834 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1835 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1836 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1837 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1838 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1839 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1840 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1841 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1842 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1843 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1844 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1845 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1846 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1847 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1848 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1849 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1850 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1851 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1852 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1853 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1854 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1855 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1856 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1857 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1858 tcph.th_ack = htonl(88);
1859 tcph.th_seq = htonl(1);
1878 tcph.th_ack = htonl(328);
1879 tcph.th_seq = htonl(88);
1904 static int AppLayerTest04(
void)
1909 uint8_t request[] = {
1910 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1911 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1912 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1913 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1914 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1915 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1916 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1917 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1918 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1919 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1920 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1922 tcph.th_ack = htonl(1);
1923 tcph.th_seq = htonl(1);
1942 uint8_t response1[] = { 0x58, 0x54, 0x54, 0x50, };
1944 tcph.th_ack = htonl(88);
1945 tcph.th_seq = htonl(1);
1964 tcph.th_ack = htonl(5);
1965 tcph.th_seq = htonl(88);
1984 uint8_t response2[] = {
1985 0x2f, 0x31, 0x2e, 0x31,
1986 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1987 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1988 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1989 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1990 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1991 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1992 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1993 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1994 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1995 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1996 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1997 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1998 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1999 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2000 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2001 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2002 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2003 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2004 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2005 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2006 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2007 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2008 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2009 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2010 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2011 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2012 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2013 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2014 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2015 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2016 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2017 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2018 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2019 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2020 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2021 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2022 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2023 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2024 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2025 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2027 tcph.th_ack = htonl(88);
2028 tcph.th_seq = htonl(5);
2047 tcph.th_ack = htonl(328);
2048 tcph.th_seq = htonl(88);
2073 static int AppLayerTest05(
void)
2078 uint8_t request[] = {
2079 0x48, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2080 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2081 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2082 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2083 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2084 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2085 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2086 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2087 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2088 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2089 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2091 tcph.th_ack = htonl(1);
2092 tcph.th_seq = htonl(1);
2111 uint8_t response[] = {
2112 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2113 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2114 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2115 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2116 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2117 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2118 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2119 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2120 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2121 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2122 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2123 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2124 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2125 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2126 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2127 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2128 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2129 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2130 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2131 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2132 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2133 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2134 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2135 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2136 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2137 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2138 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2139 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2140 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2141 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2142 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2143 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2144 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2145 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2146 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2147 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2148 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2149 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2150 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2151 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2152 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2154 tcph.th_ack = htonl(88);
2155 tcph.th_seq = htonl(1);
2174 tcph.th_ack = htonl(328);
2175 tcph.th_seq = htonl(88);
2200 static int AppLayerTest06(
void)
2205 uint8_t response[] = {
2206 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2207 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2208 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2209 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2210 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2211 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2212 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2213 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2214 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2215 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2216 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2217 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2218 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2219 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2220 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2221 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2222 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2223 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2224 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2225 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2226 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2227 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2228 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2229 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2230 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2231 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2232 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2233 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2234 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2235 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2236 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2237 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2238 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2239 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2240 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2241 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2242 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2243 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2244 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2245 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2246 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2247 tcph.th_ack = htonl(1);
2248 tcph.th_seq = htonl(1);
2267 uint8_t request[] = {
2268 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2269 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2270 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2271 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2272 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2273 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2274 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2275 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2276 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2277 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2278 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2279 tcph.th_ack = htonl(328);
2280 tcph.th_seq = htonl(1);
2298 tcph.th_ack = htonl(1 +
sizeof(request));
2299 tcph.th_seq = htonl(328);
2324 static int AppLayerTest07(
void)
2329 uint8_t request[] = {
2330 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2331 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2332 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2333 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2334 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2335 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2336 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2337 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2338 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2339 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2340 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2341 tcph.th_ack = htonl(1);
2342 tcph.th_seq = htonl(1);
2361 uint8_t response[] = { 0x05, 0x00, 0x4d, 0x42, 0x00, 0x01, 0x2e, 0x31, 0x20, 0x32, 0x30, 0x30,
2362 0x20, 0x4f, 0x4b, 0x0d, 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46, 0x72, 0x69, 0x2c,
2363 0x20, 0x32, 0x33, 0x20, 0x53, 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20, 0x30, 0x36,
2364 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65, 0x72,
2365 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2366 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69, 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f,
2367 0x32, 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,
2368 0x64, 0x3a, 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34, 0x20, 0x4e, 0x6f, 0x76, 0x20,
2369 0x32, 0x30, 0x31, 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a, 0x34, 0x36, 0x20, 0x47,
2370 0x4d, 0x54, 0x0d, 0x0a, 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61, 0x62, 0x38, 0x39,
2371 0x36, 0x35, 0x2d, 0x32, 0x63, 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61, 0x37, 0x66,
2372 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x52,
2373 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2374 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20,
2375 0x34, 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a,
2376 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
2377 0x2d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d,
2378 0x6c, 0x0d, 0x0a, 0x58, 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76, 0x6f, 0x69, 0x64,
2379 0x20, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d, 0x0a, 0x0d,
2380 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x68,
2381 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2382 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2383 tcph.th_ack = htonl(88);
2384 tcph.th_seq = htonl(1);
2403 tcph.th_ack = htonl(328);
2404 tcph.th_seq = htonl(88);
2431 static int AppLayerTest09(
void)
2436 uint8_t request1[] = {
2437 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64 };
2438 tcph.th_ack = htonl(1);
2439 tcph.th_seq = htonl(1);
2458 tcph.th_ack = htonl(9);
2459 tcph.th_seq = htonl(1);
2478 uint8_t request2[] = {
2479 0x44, 0x44, 0x45, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2480 tcph.th_ack = htonl(1);
2481 tcph.th_seq = htonl(9);
2500 uint8_t response[] = {
2501 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2502 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2503 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2504 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2505 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2506 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2507 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2508 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2509 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2510 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2511 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2512 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2513 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2514 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2515 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2516 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2517 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2518 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2519 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2520 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2521 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2522 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2523 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2524 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2525 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2526 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2527 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2528 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2529 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2530 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2531 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2532 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2533 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2534 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2535 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2536 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2537 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2538 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2539 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2540 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2541 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2542 tcph.th_ack = htonl(18);
2543 tcph.th_seq = htonl(1);
2562 tcph.th_ack = htonl(328);
2563 tcph.th_seq = htonl(18);
2589 static int AppLayerTest10(
void)
2594 uint8_t request1[] = {
2595 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2596 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2597 tcph.th_ack = htonl(1);
2598 tcph.th_seq = htonl(1);
2617 tcph.th_ack = htonl(18);
2618 tcph.th_seq = htonl(1);
2637 uint8_t response[] = {
2638 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2639 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2640 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2641 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2642 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2643 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2644 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2645 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2646 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2647 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2648 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2649 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2650 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2651 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2652 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2653 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2654 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2655 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2656 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2657 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2658 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2659 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2660 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2661 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2662 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2663 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2664 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2665 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2666 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2667 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2668 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2669 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2670 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2671 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2672 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2673 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2674 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2675 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2676 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2677 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2678 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2679 tcph.th_ack = htonl(18);
2680 tcph.th_seq = htonl(1);
2699 tcph.th_ack = htonl(328);
2700 tcph.th_seq = htonl(18);
2727 static int AppLayerTest11(
void)
2732 uint8_t request1[] = {
2733 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2734 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2735 tcph.th_ack = htonl(1);
2736 tcph.th_seq = htonl(1);
2755 tcph.th_ack = htonl(18);
2756 tcph.th_seq = htonl(1);
2775 uint8_t response1[] = {
2776 0x55, 0x74, 0x54, 0x50, };
2777 tcph.th_ack = htonl(18);
2778 tcph.th_seq = htonl(1);
2797 tcph.th_ack = htonl(5);
2798 tcph.th_seq = htonl(18);
2816 uint8_t response2[] = {
2817 0x2f, 0x31, 0x2e, 0x31,
2818 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2819 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2820 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2821 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2822 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2823 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2824 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2825 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2826 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2827 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2828 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2829 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2830 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2831 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2832 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2833 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2834 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2835 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2836 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2837 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2838 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2839 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2840 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2841 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2842 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2843 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2844 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2845 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2846 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2847 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2848 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2849 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2850 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2851 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2852 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2853 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2854 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2855 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2856 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2857 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2858 tcph.th_ack = htonl(18);
2859 tcph.th_seq = htonl(5);
2878 tcph.th_ack = htonl(328);
2879 tcph.th_seq = htonl(18);