76 #define FLOW_PROTO_CHANGE_MAX_DEPTH 4096
78 #define MAX_COUNTER_SIZE 64
119 .valid_settings_ips = {
137 static inline int ProtoDetectDone(
const Flow *f,
const TcpSession *ssn, uint8_t direction) {
223 if (
flags & STREAM_TOSERVER) {
239 if (
flags & STREAM_TOSERVER) {
249 SCLogDebug(
"disable app layer for flow %p alproto %u ts %u tc %u",
256 AppLayerIncFlowCounter(
tv, f);
262 FlagPacketFlow(p, f, STREAM_TOCLIENT);
268 FlagPacketFlow(p, f, STREAM_TOSERVER);
270 SCLogDebug(
"disabled app layer for flow %p alproto %u ts %u tc %u",
293 static void TCPProtoDetectCheckBailConditions(
ThreadVars *
tv,
297 SCLogDebug(
"skip as long as TCP is not ESTABLISHED (TCP fast open)");
303 SCLogDebug(
"size_ts %" PRIu32
", size_tc %" PRIu32, size_ts, size_tc);
307 const uint32_t size_tc_limit =
309 const uint32_t size_ts_limit =
312 if (ProtoDetectDone(f, ssn, STREAM_TOSERVER) &&
313 ProtoDetectDone(f, ssn, STREAM_TOCLIENT))
319 }
else if (size_tc > 2 * size_tc_limit || size_ts > 2 * size_ts_limit) {
324 size_ts > size_ts_limit && size_tc == 0) {
329 size_tc > size_tc_limit && size_ts == 0) {
336 }
else if (size_tc > size_tc_limit &&
FLOW_IS_PP_DONE(f, STREAM_TOSERVER) &&
345 }
else if (size_ts > size_ts_limit &&
FLOW_IS_PP_DONE(f, STREAM_TOCLIENT) &&
354 DisableAppLayer(
tv, f, p);
361 if (stream == &ssn->
client) {
362 opposing_stream = &ssn->
server;
364 opposing_stream = &ssn->
client;
370 SCLogDebug(
"opposing dir has STREAMTCP_STREAM_FLAG_NOREASSEMBLY set");
378 opposing_stream, p, dir);
394 uint8_t direction = (
flags & STREAM_TOSERVER) ? 0 : 1;
396 if (
flags & STREAM_TOSERVER) {
404 SCLogDebug(
"Stream initializer (len %" PRIu32
")", data_len);
407 printf(
"=> Init Stream Data (app layer) -- start %s%s\n",
408 flags & STREAM_TOCLIENT ?
"toclient" :
"",
409 flags & STREAM_TOSERVER ?
"toserver" :
"");
411 printf(
"=> Init Stream Data -- end\n");
415 bool reverse_flow =
false;
420 IPPROTO_TCP,
flags, &reverse_flow);
422 SCLogDebug(
"alproto %u rev %s", *alproto, reverse_flow ?
"true" :
"false");
425 if (*alproto_otherdir !=
ALPROTO_UNKNOWN && *alproto_otherdir != *alproto) {
431 f->
alproto = *alproto_otherdir;
435 if (
flags & STREAM_TOCLIENT)
438 f->
alproto = *alproto_otherdir;
447 FlagPacketFlow(p, f,
flags);
457 SCLogDebug(
"reversing flow after proto detect told us so");
463 if (*stream == &ssn->
client) {
468 direction = 1 - direction;
476 AppLayerIncFlowCounter(
tv, f);
489 SCLogDebug(
"protocol %s needs first data in other direction",
492 if (TCPProtoDetectTriggerOpposingSide(
tv, ra_ctx,
493 p, ssn, *stream) != 0)
525 uint8_t first_data_dir;
540 if (first_data_dir && !(first_data_dir &
flags)) {
556 flags, data, data_len);
565 if (*stream == &ssn->
client) {
566 opposing_stream = &ssn->
server;
568 opposing_stream = &ssn->
client;
572 AppLayerIncFlowCounter(
tv, f);
600 DisableAppLayer(
tv, f, p);
606 uint8_t first_data_dir;
625 (first_data_dir) && !(first_data_dir &
flags))
655 AppLayerIncFlowCounter(
tv, f);
657 *alproto = *alproto_otherdir;
658 SCLogDebug(
"packet %"PRIu64
": pd done(us %u them %u), parser called (r==%d), APPLAYER_DETECT_PROTOCOL_ONLY_ONE_DIRECTION set",
659 p->
pcap_cnt, *alproto, *alproto_otherdir, r);
666 FlagPacketFlow(p, f,
flags);
668 }
else if (
flags & STREAM_EOF) {
671 AppLayerIncFlowCounter(
tv, f);
682 DisableAppLayer(
tv, f, p);
685 TCPProtoDetectCheckBailConditions(
tv, f, ssn, p);
695 DisableAppLayer(
tv, f, p);
722 SCLogDebug(
"STREAMTCP_FLAG_APP_LAYER_DISABLED is set");
726 const uint8_t direction = (
flags & STREAM_TOSERVER) ? 0 : 1;
728 if (
flags & STREAM_TOSERVER) {
736 if (
flags & STREAM_GAP) {
740 SCLogDebug(
"ALPROTO_UNKNOWN flow %p, due to GAP in stream start", f);
745 AppLayerIncFlowCounter(
tv, f);
749 SCLogDebug(
"Cannot handle gap while changing protocol");
754 flags, data, data_len);
775 if (TCPProtoDetect(
tv, ra_ctx, app_tctx, p, f, ssn, stream, data, data_len,
flags,
776 app_update_dir) != 0) {
781 void *alstate_orig = f->
alstate;
788 int rd = TCPProtoDetect(
789 tv, ra_ctx, app_tctx, p, f, ssn, stream, data, data_len,
flags, app_update_dir);
800 if (alstate_orig == f->
alstate) {
822 SCLogDebug(
"stream data (len %" PRIu32
" alproto "
823 "%"PRIu16
" (flow %p)", data_len, f->
alproto, f);
826 printf(
"=> Stream Data (app layer) -- start %s%s\n",
827 flags & STREAM_TOCLIENT ?
"toclient" :
"",
828 flags & STREAM_TOSERVER ?
"toserver" :
"");
830 printf(
"=> Stream Data -- end\n");
838 flags, data, data_len);
885 flags |= STREAM_TOSERVER;
889 flags |= STREAM_TOCLIENT;
898 SCLogDebug(
"Detecting AL proto on udp mesg (len %" PRIu32
")",
901 bool reverse_flow =
false;
911 f->
alproto = *alproto_otherdir;
913 *alproto = *alproto_otherdir;
925 f->
alproto = *alproto_otherdir;
934 if (*alproto_otherdir != *alproto) {
950 AppLayerIncFlowCounter(
tv, f);
956 SCLogDebug(
"reversing flow after proto detect told us so");
971 FlagPacketFlow(p, f, STREAM_TOSERVER);
972 FlagPacketFlow(p, f, STREAM_TOCLIENT);
974 SCLogDebug(
"data (len %" PRIu32
" ), alproto "
1019 printf(
"=========Supported App Layer Protocols=========\n");
1021 if (alprotos[alproto] == 1)
1029 static void AppLayerNamesSetup(
void)
1076 AppLayerNamesSetup();
1107 if (app_tctx == NULL)
1127 if (app_tctx == NULL)
1168 static bool IsAppLayerErrorExceptionPolicyStatsValid(
enum ExceptionPolicy policy)
1176 static void AppLayerSetupExceptionPolicyPerProtoCounters(
1177 uint8_t ipproto_map,
AppProto alproto,
const char *alproto_str,
const char *ipproto_suffix)
1182 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1185 "app_layer.error.%s%s.exception_policy.%s", alproto_str, ipproto_suffix,
1194 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1196 const char *
str =
"app_layer.flow.";
1197 const char *estr =
"app_layer.error.";
1202 FatalError(
"Unable to alloc applayer_counter_names.");
1206 FatalError(
"Unable to alloc applayer_counters.");
1211 const char *eps_default_str =
"exception_policy.app_layer.error.";
1213 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1224 const uint8_t ipproto = ipprotos[p];
1226 const char *ipproto_suffix = (ipproto == IPPROTO_TCP) ?
"_tcp" :
"_udp";
1227 uint8_t ipprotos_all[256 / 8];
1230 if (alprotos[alproto] == 1) {
1231 const char *tx_str =
"app_layer.tx.";
1234 memset(ipprotos_all, 0,
sizeof(ipprotos_all));
1236 if ((ipprotos_all[IPPROTO_TCP / 8] & (1 << (IPPROTO_TCP % 8))) &&
1237 (ipprotos_all[IPPROTO_UDP / 8] & (1 << (IPPROTO_UDP % 8)))) {
1240 str, alproto_str, ipproto_suffix);
1243 tx_str, alproto_str, ipproto_suffix);
1245 if (ipproto == IPPROTO_TCP) {
1248 "%s%s%s.gap", estr, alproto_str, ipproto_suffix);
1252 "%s%s%s.alloc", estr, alproto_str, ipproto_suffix);
1255 "%s%s%s.parser", estr, alproto_str, ipproto_suffix);
1258 "%s%s%s.internal", estr, alproto_str, ipproto_suffix);
1260 AppLayerSetupExceptionPolicyPerProtoCounters(
1261 ipproto_map, alproto, alproto_str, ipproto_suffix);
1268 tx_str, alproto_str);
1270 if (ipproto == IPPROTO_TCP) {
1273 "%s%s.gap", estr, alproto_str);
1277 "%s%s.alloc", estr, alproto_str);
1280 "%s%s.parser", estr, alproto_str);
1283 "%s%s.internal", estr, alproto_str);
1284 AppLayerSetupExceptionPolicyPerProtoCounters(
1285 ipproto_map, alproto, alproto_str,
"");
1290 "failed", ipproto_suffix);
1291 if (ipproto == IPPROTO_TCP) {
1294 "%sfailed%s.gap", estr, ipproto_suffix);
1303 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1311 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1319 const uint8_t ipproto = ipprotos[p];
1323 if (alprotos[alproto] == 1) {
1330 if (ipproto == IPPROTO_TCP) {
1345 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1356 if (ipproto == IPPROTO_TCP) {
1379 #define TEST_START \
1380 Packet *p = PacketGetFromAlloc(); \
1384 StreamTcpThread *stt = NULL; \
1386 PacketQueueNoLock pq; \
1387 memset(&pq, 0, sizeof(PacketQueueNoLock)); \
1388 memset(&f, 0, sizeof(Flow)); \
1389 memset(&tv, 0, sizeof(ThreadVars)); \
1390 memset(&tcph, 0, sizeof(TCPHdr)); \
1392 FLOW_INITIALIZE(&f); \
1393 f.flags = FLOW_IPV4; \
1394 f.proto = IPPROTO_TCP; \
1396 PacketSetTCP(p, (uint8_t *)&tcph); \
1398 StreamTcpInitConfig(true); \
1399 IPPairInitConfig(true); \
1400 StreamTcpThreadInit(&tv, NULL, (void **)&stt); \
1403 tcph.th_win = htons(5480); \
1404 tcph.th_flags = TH_SYN; \
1405 p->flowflags = FLOW_PKT_TOSERVER; \
1406 p->payload_len = 0; \
1407 p->payload = NULL; \
1408 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1409 TcpSession *ssn = (TcpSession *)f.protoctx; \
1411 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1412 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1413 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1414 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1415 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1416 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1417 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1418 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1419 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1420 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1421 FAIL_IF(ssn->data_first_seen_dir != 0); \
1424 tcph.th_ack = htonl(1); \
1425 tcph.th_flags = TH_SYN | TH_ACK; \
1426 p->flowflags = FLOW_PKT_TOCLIENT; \
1427 p->payload_len = 0; \
1428 p->payload = NULL; \
1429 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1430 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1431 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1432 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1433 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1434 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1435 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1436 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1437 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1438 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1439 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1440 FAIL_IF(ssn->data_first_seen_dir != 0); \
1443 tcph.th_ack = htonl(1); \
1444 tcph.th_seq = htonl(1); \
1445 tcph.th_flags = TH_ACK; \
1446 p->flowflags = FLOW_PKT_TOSERVER; \
1447 p->payload_len = 0; \
1448 p->payload = NULL; \
1449 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1450 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1451 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1452 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1453 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1454 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1455 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1456 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1457 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1458 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1459 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1460 FAIL_IF(ssn->data_first_seen_dir != 0);
1462 StreamTcpSessionClear(p->flow->protoctx); \
1463 StreamTcpThreadDeinit(&tv, (void *)stt); \
1464 StreamTcpFreeConfig(true); \
1468 StatsThreadCleanup(&tv);
1473 static int AppLayerTest01(
void)
1478 uint8_t request[] = {
1479 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1480 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1481 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1482 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1483 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1484 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1485 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1486 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1487 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1488 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1489 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1490 tcph.th_ack = htonl(1);
1491 tcph.th_seq = htonl(1);
1510 uint8_t response[] = {
1511 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1512 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1513 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1514 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1515 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1516 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1517 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1518 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1519 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1520 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1521 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1522 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1523 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1524 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1525 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1526 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1527 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1528 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1529 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1530 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1531 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1532 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1533 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1534 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1535 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1536 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1537 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1538 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1539 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1540 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1541 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1542 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1543 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1544 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1545 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1546 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1547 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1548 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1549 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1550 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1551 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1552 tcph.th_ack = htonl(88);
1553 tcph.th_seq = htonl(1);
1572 tcph.th_ack = htonl(328);
1573 tcph.th_seq = htonl(88);
1598 static int AppLayerTest02(
void)
1603 uint8_t request1[] = { 0x47, 0x45, };
1604 tcph.th_ack = htonl(1);
1605 tcph.th_seq = htonl(1);
1624 tcph.th_ack = htonl(3);
1625 tcph.th_seq = htonl(1);
1644 uint8_t request2[] = {
1645 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1646 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1647 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1648 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1649 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1650 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1651 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1652 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1653 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1654 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1655 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1656 tcph.th_ack = htonl(1);
1657 tcph.th_seq = htonl(3);
1676 uint8_t response[] = {
1677 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1678 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1679 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1680 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1681 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1682 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1683 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1684 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1685 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1686 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1687 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1688 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1689 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1690 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1691 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1692 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1693 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1694 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1695 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1696 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1697 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1698 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1699 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1700 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1701 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1702 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1703 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1704 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1705 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1706 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1707 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1708 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1709 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1710 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1711 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1712 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1713 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1714 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1715 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1716 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1717 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1718 tcph.th_ack = htonl(88);
1719 tcph.th_seq = htonl(1);
1738 tcph.th_ack = htonl(328);
1739 tcph.th_seq = htonl(88);
1764 static int AppLayerTest03(
void)
1769 uint8_t request[] = {
1770 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1771 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1772 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1773 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1774 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1775 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1776 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1777 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1778 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1779 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1780 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1781 tcph.th_ack = htonl(1);
1782 tcph.th_seq = htonl(1);
1801 uint8_t response[] = {
1802 0x58, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1803 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1804 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1805 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1806 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1807 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1808 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1809 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1810 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1811 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1812 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1813 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1814 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1815 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1816 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1817 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1818 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1819 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1820 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1821 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1822 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1823 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1824 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1825 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1826 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1827 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1828 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1829 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1830 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1831 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1832 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1833 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1834 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1835 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1836 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1837 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1838 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1839 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1840 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1841 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1842 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1843 tcph.th_ack = htonl(88);
1844 tcph.th_seq = htonl(1);
1863 tcph.th_ack = htonl(328);
1864 tcph.th_seq = htonl(88);
1889 static int AppLayerTest04(
void)
1894 uint8_t request[] = {
1895 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1896 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1897 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1898 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1899 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1900 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1901 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1902 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1903 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1904 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1905 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1907 tcph.th_ack = htonl(1);
1908 tcph.th_seq = htonl(1);
1927 uint8_t response1[] = { 0x58, 0x54, 0x54, 0x50, };
1929 tcph.th_ack = htonl(88);
1930 tcph.th_seq = htonl(1);
1949 tcph.th_ack = htonl(5);
1950 tcph.th_seq = htonl(88);
1969 uint8_t response2[] = {
1970 0x2f, 0x31, 0x2e, 0x31,
1971 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1972 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1973 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1974 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1975 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1976 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1977 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1978 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1979 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1980 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1981 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1982 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1983 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1984 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1985 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1986 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1987 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1988 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1989 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1990 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1991 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1992 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1993 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1994 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1995 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1996 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1997 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1998 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1999 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2000 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2001 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2002 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2003 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2004 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2005 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2006 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2007 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2008 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2009 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2010 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2012 tcph.th_ack = htonl(88);
2013 tcph.th_seq = htonl(5);
2032 tcph.th_ack = htonl(328);
2033 tcph.th_seq = htonl(88);
2058 static int AppLayerTest05(
void)
2063 uint8_t request[] = {
2064 0x48, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2065 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2066 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2067 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2068 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2069 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2070 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2071 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2072 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2073 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2074 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2076 tcph.th_ack = htonl(1);
2077 tcph.th_seq = htonl(1);
2096 uint8_t response[] = {
2097 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2098 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2099 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2100 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2101 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2102 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2103 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2104 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2105 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2106 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2107 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2108 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2109 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2110 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2111 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2112 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2113 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2114 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2115 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2116 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2117 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2118 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2119 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2120 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2121 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2122 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2123 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2124 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2125 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2126 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2127 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2128 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2129 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2130 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2131 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2132 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2133 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2134 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2135 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2136 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2137 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2139 tcph.th_ack = htonl(88);
2140 tcph.th_seq = htonl(1);
2159 tcph.th_ack = htonl(328);
2160 tcph.th_seq = htonl(88);
2185 static int AppLayerTest06(
void)
2190 uint8_t response[] = {
2191 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2192 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2193 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2194 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2195 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2196 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2197 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2198 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2199 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2200 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2201 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2202 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2203 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2204 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2205 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2206 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2207 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2208 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2209 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2210 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2211 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2212 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2213 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2214 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2215 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2216 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2217 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2218 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2219 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2220 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2221 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2222 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2223 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2224 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2225 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2226 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2227 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2228 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2229 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2230 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2231 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2232 tcph.th_ack = htonl(1);
2233 tcph.th_seq = htonl(1);
2252 uint8_t request[] = {
2253 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2254 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2255 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2256 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2257 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2258 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2259 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2260 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2261 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2262 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2263 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2264 tcph.th_ack = htonl(328);
2265 tcph.th_seq = htonl(1);
2283 tcph.th_ack = htonl(1 +
sizeof(request));
2284 tcph.th_seq = htonl(328);
2309 static int AppLayerTest07(
void)
2314 uint8_t request[] = {
2315 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2316 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2317 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2318 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2319 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2320 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2321 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2322 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2323 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2324 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2325 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2326 tcph.th_ack = htonl(1);
2327 tcph.th_seq = htonl(1);
2346 uint8_t response[] = { 0x05, 0x00, 0x4d, 0x42, 0x00, 0x01, 0x2e, 0x31, 0x20, 0x32, 0x30, 0x30,
2347 0x20, 0x4f, 0x4b, 0x0d, 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46, 0x72, 0x69, 0x2c,
2348 0x20, 0x32, 0x33, 0x20, 0x53, 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20, 0x30, 0x36,
2349 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65, 0x72,
2350 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2351 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69, 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f,
2352 0x32, 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,
2353 0x64, 0x3a, 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34, 0x20, 0x4e, 0x6f, 0x76, 0x20,
2354 0x32, 0x30, 0x31, 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a, 0x34, 0x36, 0x20, 0x47,
2355 0x4d, 0x54, 0x0d, 0x0a, 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61, 0x62, 0x38, 0x39,
2356 0x36, 0x35, 0x2d, 0x32, 0x63, 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61, 0x37, 0x66,
2357 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x52,
2358 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2359 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20,
2360 0x34, 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a,
2361 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
2362 0x2d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d,
2363 0x6c, 0x0d, 0x0a, 0x58, 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76, 0x6f, 0x69, 0x64,
2364 0x20, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d, 0x0a, 0x0d,
2365 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x68,
2366 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2367 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2368 tcph.th_ack = htonl(88);
2369 tcph.th_seq = htonl(1);
2388 tcph.th_ack = htonl(328);
2389 tcph.th_seq = htonl(88);
2416 static int AppLayerTest09(
void)
2421 uint8_t request1[] = {
2422 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64 };
2423 tcph.th_ack = htonl(1);
2424 tcph.th_seq = htonl(1);
2443 tcph.th_ack = htonl(9);
2444 tcph.th_seq = htonl(1);
2463 uint8_t request2[] = {
2464 0x44, 0x44, 0x45, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2465 tcph.th_ack = htonl(1);
2466 tcph.th_seq = htonl(9);
2485 uint8_t response[] = {
2486 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2487 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2488 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2489 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2490 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2491 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2492 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2493 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2494 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2495 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2496 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2497 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2498 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2499 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2500 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2501 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2502 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2503 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2504 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2505 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2506 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2507 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2508 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2509 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2510 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2511 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2512 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2513 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2514 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2515 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2516 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2517 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2518 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2519 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2520 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2521 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2522 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2523 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2524 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2525 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2526 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2527 tcph.th_ack = htonl(18);
2528 tcph.th_seq = htonl(1);
2547 tcph.th_ack = htonl(328);
2548 tcph.th_seq = htonl(18);
2574 static int AppLayerTest10(
void)
2579 uint8_t request1[] = {
2580 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2581 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2582 tcph.th_ack = htonl(1);
2583 tcph.th_seq = htonl(1);
2602 tcph.th_ack = htonl(18);
2603 tcph.th_seq = htonl(1);
2622 uint8_t response[] = {
2623 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2624 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2625 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2626 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2627 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2628 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2629 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2630 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2631 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2632 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2633 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2634 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2635 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2636 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2637 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2638 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2639 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2640 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2641 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2642 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2643 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2644 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2645 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2646 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2647 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2648 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2649 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2650 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2651 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2652 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2653 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2654 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2655 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2656 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2657 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2658 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2659 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2660 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2661 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2662 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2663 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2664 tcph.th_ack = htonl(18);
2665 tcph.th_seq = htonl(1);
2684 tcph.th_ack = htonl(328);
2685 tcph.th_seq = htonl(18);
2712 static int AppLayerTest11(
void)
2717 uint8_t request1[] = {
2718 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2719 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2720 tcph.th_ack = htonl(1);
2721 tcph.th_seq = htonl(1);
2740 tcph.th_ack = htonl(18);
2741 tcph.th_seq = htonl(1);
2760 uint8_t response1[] = {
2761 0x55, 0x74, 0x54, 0x50, };
2762 tcph.th_ack = htonl(18);
2763 tcph.th_seq = htonl(1);
2782 tcph.th_ack = htonl(5);
2783 tcph.th_seq = htonl(18);
2801 uint8_t response2[] = {
2802 0x2f, 0x31, 0x2e, 0x31,
2803 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2804 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2805 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2806 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2807 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2808 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2809 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2810 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2811 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2812 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2813 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2814 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2815 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2816 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2817 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2818 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2819 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2820 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2821 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2822 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2823 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2824 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2825 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2826 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2827 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2828 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2829 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2830 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2831 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2832 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2833 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2834 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2835 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2836 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2837 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2838 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2839 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2840 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2841 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2842 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2843 tcph.th_ack = htonl(18);
2844 tcph.th_seq = htonl(5);
2863 tcph.th_ack = htonl(328);
2864 tcph.th_seq = htonl(18);