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)
1080 AppLayerNamesSetup();
1111 if (app_tctx == NULL)
1131 if (app_tctx == NULL)
1172 static bool IsAppLayerErrorExceptionPolicyStatsValid(
enum ExceptionPolicy policy)
1180 static void AppLayerSetupExceptionPolicyPerProtoCounters(
1181 uint8_t ipproto_map,
AppProto alproto,
const char *alproto_str,
const char *ipproto_suffix)
1186 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1189 "app_layer.error.%s%s.exception_policy.%s", alproto_str, ipproto_suffix,
1198 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1200 const char *
str =
"app_layer.flow.";
1201 const char *estr =
"app_layer.error.";
1206 FatalError(
"Unable to alloc applayer_counter_names.");
1210 FatalError(
"Unable to alloc applayer_counters.");
1215 const char *eps_default_str =
"exception_policy.app_layer.error.";
1217 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1228 const uint8_t ipproto = ipprotos[p];
1230 const char *ipproto_suffix = (ipproto == IPPROTO_TCP) ?
"_tcp" :
"_udp";
1231 uint8_t ipprotos_all[256 / 8];
1234 if (alprotos[alproto] == 1) {
1235 const char *tx_str =
"app_layer.tx.";
1238 memset(ipprotos_all, 0,
sizeof(ipprotos_all));
1240 if ((ipprotos_all[IPPROTO_TCP / 8] & (1 << (IPPROTO_TCP % 8))) &&
1241 (ipprotos_all[IPPROTO_UDP / 8] & (1 << (IPPROTO_UDP % 8)))) {
1244 str, alproto_str, ipproto_suffix);
1247 tx_str, alproto_str, ipproto_suffix);
1249 if (ipproto == IPPROTO_TCP) {
1252 "%s%s%s.gap", estr, alproto_str, ipproto_suffix);
1256 "%s%s%s.alloc", estr, alproto_str, ipproto_suffix);
1259 "%s%s%s.parser", estr, alproto_str, ipproto_suffix);
1262 "%s%s%s.internal", estr, alproto_str, ipproto_suffix);
1264 AppLayerSetupExceptionPolicyPerProtoCounters(
1265 ipproto_map, alproto, alproto_str, ipproto_suffix);
1272 tx_str, alproto_str);
1274 if (ipproto == IPPROTO_TCP) {
1277 "%s%s.gap", estr, alproto_str);
1281 "%s%s.alloc", estr, alproto_str);
1284 "%s%s.parser", estr, alproto_str);
1287 "%s%s.internal", estr, alproto_str);
1288 AppLayerSetupExceptionPolicyPerProtoCounters(
1289 ipproto_map, alproto, alproto_str,
"");
1294 "failed", ipproto_suffix);
1295 if (ipproto == IPPROTO_TCP) {
1298 "%sfailed%s.gap", estr, ipproto_suffix);
1307 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1315 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1323 const uint8_t ipproto = ipprotos[p];
1327 if (alprotos[alproto] == 1) {
1334 if (ipproto == IPPROTO_TCP) {
1349 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1360 if (ipproto == IPPROTO_TCP) {
1383 #define TEST_START \
1384 Packet *p = PacketGetFromAlloc(); \
1388 StreamTcpThread *stt = NULL; \
1390 PacketQueueNoLock pq; \
1391 memset(&pq, 0, sizeof(PacketQueueNoLock)); \
1392 memset(&f, 0, sizeof(Flow)); \
1393 memset(&tv, 0, sizeof(ThreadVars)); \
1394 memset(&tcph, 0, sizeof(TCPHdr)); \
1396 FLOW_INITIALIZE(&f); \
1397 f.flags = FLOW_IPV4; \
1398 f.proto = IPPROTO_TCP; \
1400 PacketSetTCP(p, (uint8_t *)&tcph); \
1402 StreamTcpInitConfig(true); \
1403 IPPairInitConfig(true); \
1404 StreamTcpThreadInit(&tv, NULL, (void **)&stt); \
1407 tcph.th_win = htons(5480); \
1408 tcph.th_flags = TH_SYN; \
1409 p->flowflags = FLOW_PKT_TOSERVER; \
1410 p->payload_len = 0; \
1411 p->payload = NULL; \
1412 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1413 TcpSession *ssn = (TcpSession *)f.protoctx; \
1415 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1416 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1417 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1418 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1419 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1420 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1421 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1422 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1423 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1424 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1425 FAIL_IF(ssn->data_first_seen_dir != 0); \
1428 tcph.th_ack = htonl(1); \
1429 tcph.th_flags = TH_SYN | TH_ACK; \
1430 p->flowflags = FLOW_PKT_TOCLIENT; \
1431 p->payload_len = 0; \
1432 p->payload = NULL; \
1433 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1434 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1435 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1436 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1437 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1438 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1439 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1440 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1441 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1442 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1443 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1444 FAIL_IF(ssn->data_first_seen_dir != 0); \
1447 tcph.th_ack = htonl(1); \
1448 tcph.th_seq = htonl(1); \
1449 tcph.th_flags = TH_ACK; \
1450 p->flowflags = FLOW_PKT_TOSERVER; \
1451 p->payload_len = 0; \
1452 p->payload = NULL; \
1453 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1454 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1455 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1456 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1457 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1458 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1459 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1460 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1461 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1462 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1463 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1464 FAIL_IF(ssn->data_first_seen_dir != 0);
1466 StreamTcpSessionClear(p->flow->protoctx); \
1467 StreamTcpThreadDeinit(&tv, (void *)stt); \
1468 StreamTcpFreeConfig(true); \
1471 StatsThreadCleanup(&tv);
1476 static int AppLayerTest01(
void)
1481 uint8_t request[] = {
1482 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1483 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1484 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1485 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1486 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1487 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1488 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1489 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1490 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1491 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1492 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1493 tcph.th_ack = htonl(1);
1494 tcph.th_seq = htonl(1);
1513 uint8_t response[] = {
1514 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1515 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1516 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1517 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1518 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1519 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1520 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1521 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1522 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1523 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1524 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1525 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1526 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1527 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1528 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1529 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1530 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1531 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1532 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1533 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1534 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1535 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1536 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1537 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1538 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1539 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1540 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1541 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1542 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1543 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1544 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1545 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1546 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1547 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1548 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1549 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1550 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1551 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1552 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1553 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1554 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1555 tcph.th_ack = htonl(88);
1556 tcph.th_seq = htonl(1);
1575 tcph.th_ack = htonl(328);
1576 tcph.th_seq = htonl(88);
1601 static int AppLayerTest02(
void)
1606 uint8_t request1[] = { 0x47, 0x45, };
1607 tcph.th_ack = htonl(1);
1608 tcph.th_seq = htonl(1);
1627 tcph.th_ack = htonl(3);
1628 tcph.th_seq = htonl(1);
1647 uint8_t request2[] = {
1648 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1649 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1650 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1651 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1652 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1653 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1654 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1655 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1656 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1657 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1658 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1659 tcph.th_ack = htonl(1);
1660 tcph.th_seq = htonl(3);
1679 uint8_t response[] = {
1680 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1681 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1682 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1683 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1684 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1685 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1686 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1687 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1688 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1689 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1690 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1691 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1692 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1693 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1694 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1695 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1696 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1697 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1698 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1699 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1700 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1701 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1702 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1703 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1704 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1705 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1706 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1707 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1708 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1709 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1710 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1711 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1712 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1713 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1714 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1715 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1716 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1717 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1718 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1719 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1720 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1721 tcph.th_ack = htonl(88);
1722 tcph.th_seq = htonl(1);
1741 tcph.th_ack = htonl(328);
1742 tcph.th_seq = htonl(88);
1767 static int AppLayerTest03(
void)
1772 uint8_t request[] = {
1773 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1774 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1775 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1776 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1777 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1778 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1779 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1780 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1781 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1782 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1783 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1784 tcph.th_ack = htonl(1);
1785 tcph.th_seq = htonl(1);
1804 uint8_t response[] = {
1805 0x58, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1806 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1807 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1808 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1809 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1810 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1811 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1812 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1813 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1814 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1815 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1816 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1817 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1818 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1819 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1820 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1821 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1822 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1823 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1824 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1825 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1826 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1827 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1828 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1829 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1830 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1831 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1832 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1833 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1834 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1835 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1836 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1837 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1838 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1839 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1840 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1841 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1842 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1843 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1844 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1845 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1846 tcph.th_ack = htonl(88);
1847 tcph.th_seq = htonl(1);
1866 tcph.th_ack = htonl(328);
1867 tcph.th_seq = htonl(88);
1892 static int AppLayerTest04(
void)
1897 uint8_t request[] = {
1898 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1899 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1900 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1901 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1902 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1903 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1904 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1905 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1906 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1907 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1908 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1910 tcph.th_ack = htonl(1);
1911 tcph.th_seq = htonl(1);
1930 uint8_t response1[] = { 0x58, 0x54, 0x54, 0x50, };
1932 tcph.th_ack = htonl(88);
1933 tcph.th_seq = htonl(1);
1952 tcph.th_ack = htonl(5);
1953 tcph.th_seq = htonl(88);
1972 uint8_t response2[] = {
1973 0x2f, 0x31, 0x2e, 0x31,
1974 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1975 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1976 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1977 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1978 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1979 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1980 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1981 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1982 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1983 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1984 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1985 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1986 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1987 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1988 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1989 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1990 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1991 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1992 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1993 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1994 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1995 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1996 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1997 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1998 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1999 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2000 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2001 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2002 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2003 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2004 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2005 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2006 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2007 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2008 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2009 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2010 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2011 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2012 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2013 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2015 tcph.th_ack = htonl(88);
2016 tcph.th_seq = htonl(5);
2035 tcph.th_ack = htonl(328);
2036 tcph.th_seq = htonl(88);
2061 static int AppLayerTest05(
void)
2066 uint8_t request[] = {
2067 0x48, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2068 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2069 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2070 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2071 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2072 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2073 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2074 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2075 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2076 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2077 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2079 tcph.th_ack = htonl(1);
2080 tcph.th_seq = htonl(1);
2099 uint8_t response[] = {
2100 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2101 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2102 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2103 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2104 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2105 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2106 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2107 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2108 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2109 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2110 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2111 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2112 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2113 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2114 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2115 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2116 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2117 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2118 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2119 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2120 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2121 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2122 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2123 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2124 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2125 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2126 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2127 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2128 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2129 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2130 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2131 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2132 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2133 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2134 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2135 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2136 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2137 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2138 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2139 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2140 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2142 tcph.th_ack = htonl(88);
2143 tcph.th_seq = htonl(1);
2162 tcph.th_ack = htonl(328);
2163 tcph.th_seq = htonl(88);
2188 static int AppLayerTest06(
void)
2193 uint8_t response[] = {
2194 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2195 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2196 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2197 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2198 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2199 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2200 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2201 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2202 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2203 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2204 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2205 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2206 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2207 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2208 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2209 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2210 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2211 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2212 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2213 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2214 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2215 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2216 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2217 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2218 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2219 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2220 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2221 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2222 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2223 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2224 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2225 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2226 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2227 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2228 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2229 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2230 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2231 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2232 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2233 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2234 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2235 tcph.th_ack = htonl(1);
2236 tcph.th_seq = htonl(1);
2255 uint8_t request[] = {
2256 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2257 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2258 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2259 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2260 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2261 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2262 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2263 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2264 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2265 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2266 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2267 tcph.th_ack = htonl(328);
2268 tcph.th_seq = htonl(1);
2286 tcph.th_ack = htonl(1 +
sizeof(request));
2287 tcph.th_seq = htonl(328);
2312 static int AppLayerTest07(
void)
2317 uint8_t request[] = {
2318 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2319 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2320 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2321 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2322 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2323 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2324 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2325 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2326 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2327 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2328 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2329 tcph.th_ack = htonl(1);
2330 tcph.th_seq = htonl(1);
2349 uint8_t response[] = { 0x05, 0x00, 0x4d, 0x42, 0x00, 0x01, 0x2e, 0x31, 0x20, 0x32, 0x30, 0x30,
2350 0x20, 0x4f, 0x4b, 0x0d, 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46, 0x72, 0x69, 0x2c,
2351 0x20, 0x32, 0x33, 0x20, 0x53, 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20, 0x30, 0x36,
2352 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65, 0x72,
2353 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2354 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69, 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f,
2355 0x32, 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,
2356 0x64, 0x3a, 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34, 0x20, 0x4e, 0x6f, 0x76, 0x20,
2357 0x32, 0x30, 0x31, 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a, 0x34, 0x36, 0x20, 0x47,
2358 0x4d, 0x54, 0x0d, 0x0a, 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61, 0x62, 0x38, 0x39,
2359 0x36, 0x35, 0x2d, 0x32, 0x63, 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61, 0x37, 0x66,
2360 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x52,
2361 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2362 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20,
2363 0x34, 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a,
2364 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
2365 0x2d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d,
2366 0x6c, 0x0d, 0x0a, 0x58, 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76, 0x6f, 0x69, 0x64,
2367 0x20, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d, 0x0a, 0x0d,
2368 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x68,
2369 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2370 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2371 tcph.th_ack = htonl(88);
2372 tcph.th_seq = htonl(1);
2391 tcph.th_ack = htonl(328);
2392 tcph.th_seq = htonl(88);
2419 static int AppLayerTest09(
void)
2424 uint8_t request1[] = {
2425 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64 };
2426 tcph.th_ack = htonl(1);
2427 tcph.th_seq = htonl(1);
2446 tcph.th_ack = htonl(9);
2447 tcph.th_seq = htonl(1);
2466 uint8_t request2[] = {
2467 0x44, 0x44, 0x45, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2468 tcph.th_ack = htonl(1);
2469 tcph.th_seq = htonl(9);
2488 uint8_t response[] = {
2489 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2490 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2491 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2492 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2493 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2494 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2495 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2496 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2497 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2498 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2499 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2500 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2501 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2502 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2503 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2504 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2505 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2506 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2507 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2508 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2509 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2510 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2511 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2512 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2513 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2514 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2515 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2516 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2517 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2518 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2519 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2520 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2521 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2522 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2523 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2524 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2525 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2526 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2527 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2528 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2529 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2530 tcph.th_ack = htonl(18);
2531 tcph.th_seq = htonl(1);
2550 tcph.th_ack = htonl(328);
2551 tcph.th_seq = htonl(18);
2577 static int AppLayerTest10(
void)
2582 uint8_t request1[] = {
2583 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2584 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2585 tcph.th_ack = htonl(1);
2586 tcph.th_seq = htonl(1);
2605 tcph.th_ack = htonl(18);
2606 tcph.th_seq = htonl(1);
2625 uint8_t response[] = {
2626 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2627 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2628 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2629 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2630 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2631 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2632 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2633 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2634 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2635 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2636 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2637 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2638 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2639 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2640 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2641 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2642 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2643 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2644 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2645 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2646 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2647 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2648 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2649 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2650 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2651 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2652 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2653 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2654 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2655 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2656 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2657 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2658 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2659 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2660 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2661 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2662 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2663 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2664 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2665 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2666 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2667 tcph.th_ack = htonl(18);
2668 tcph.th_seq = htonl(1);
2687 tcph.th_ack = htonl(328);
2688 tcph.th_seq = htonl(18);
2715 static int AppLayerTest11(
void)
2720 uint8_t request1[] = {
2721 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2722 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2723 tcph.th_ack = htonl(1);
2724 tcph.th_seq = htonl(1);
2743 tcph.th_ack = htonl(18);
2744 tcph.th_seq = htonl(1);
2763 uint8_t response1[] = {
2764 0x55, 0x74, 0x54, 0x50, };
2765 tcph.th_ack = htonl(18);
2766 tcph.th_seq = htonl(1);
2785 tcph.th_ack = htonl(5);
2786 tcph.th_seq = htonl(18);
2804 uint8_t response2[] = {
2805 0x2f, 0x31, 0x2e, 0x31,
2806 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2807 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2808 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2809 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2810 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2811 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2812 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2813 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2814 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2815 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2816 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2817 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2818 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2819 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2820 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2821 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2822 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2823 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2824 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2825 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2826 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2827 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2828 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2829 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2830 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2831 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2832 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2833 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2834 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2835 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2836 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2837 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2838 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2839 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2840 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2841 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2842 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2843 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2844 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2845 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2846 tcph.th_ack = htonl(18);
2847 tcph.th_seq = htonl(5);
2866 tcph.th_ack = htonl(328);
2867 tcph.th_seq = htonl(18);