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); \
1467 StatsThreadCleanup(&tv);
1472 static int AppLayerTest01(
void)
1477 uint8_t request[] = {
1478 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1479 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1480 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1481 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1482 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1483 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1484 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1485 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1486 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1487 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1488 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1489 tcph.th_ack = htonl(1);
1490 tcph.th_seq = htonl(1);
1509 uint8_t response[] = {
1510 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1511 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1512 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1513 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1514 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1515 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1516 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1517 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1518 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1519 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1520 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1521 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1522 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1523 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1524 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1525 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1526 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1527 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1528 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1529 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1530 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1531 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1532 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1533 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1534 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1535 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1536 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1537 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1538 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1539 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1540 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1541 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1542 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1543 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1544 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1545 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1546 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1547 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1548 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1549 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1550 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1551 tcph.th_ack = htonl(88);
1552 tcph.th_seq = htonl(1);
1571 tcph.th_ack = htonl(328);
1572 tcph.th_seq = htonl(88);
1597 static int AppLayerTest02(
void)
1602 uint8_t request1[] = { 0x47, 0x45, };
1603 tcph.th_ack = htonl(1);
1604 tcph.th_seq = htonl(1);
1623 tcph.th_ack = htonl(3);
1624 tcph.th_seq = htonl(1);
1643 uint8_t request2[] = {
1644 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1645 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1646 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1647 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1648 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1649 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1650 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1651 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1652 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1653 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1654 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1655 tcph.th_ack = htonl(1);
1656 tcph.th_seq = htonl(3);
1675 uint8_t response[] = {
1676 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1677 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1678 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1679 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1680 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1681 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1682 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1683 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1684 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1685 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1686 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1687 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1688 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1689 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1690 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1691 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1692 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1693 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1694 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1695 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1696 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1697 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1698 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1699 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1700 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1701 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1702 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1703 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1704 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1705 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1706 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1707 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1708 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1709 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1710 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1711 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1712 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1713 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1714 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1715 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1716 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1717 tcph.th_ack = htonl(88);
1718 tcph.th_seq = htonl(1);
1737 tcph.th_ack = htonl(328);
1738 tcph.th_seq = htonl(88);
1763 static int AppLayerTest03(
void)
1768 uint8_t request[] = {
1769 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1770 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1771 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1772 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1773 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1774 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1775 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1776 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1777 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1778 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1779 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1780 tcph.th_ack = htonl(1);
1781 tcph.th_seq = htonl(1);
1800 uint8_t response[] = {
1801 0x58, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1802 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1803 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1804 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1805 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1806 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1807 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1808 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1809 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1810 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1811 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1812 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1813 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1814 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1815 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1816 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1817 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1818 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1819 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1820 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1821 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1822 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1823 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1824 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1825 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1826 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1827 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1828 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1829 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1830 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1831 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1832 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1833 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1834 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1835 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1836 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1837 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1838 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1839 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1840 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1841 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1842 tcph.th_ack = htonl(88);
1843 tcph.th_seq = htonl(1);
1862 tcph.th_ack = htonl(328);
1863 tcph.th_seq = htonl(88);
1888 static int AppLayerTest04(
void)
1893 uint8_t request[] = {
1894 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1895 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1896 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1897 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1898 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1899 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1900 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1901 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1902 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1903 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1904 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1906 tcph.th_ack = htonl(1);
1907 tcph.th_seq = htonl(1);
1926 uint8_t response1[] = { 0x58, 0x54, 0x54, 0x50, };
1928 tcph.th_ack = htonl(88);
1929 tcph.th_seq = htonl(1);
1948 tcph.th_ack = htonl(5);
1949 tcph.th_seq = htonl(88);
1968 uint8_t response2[] = {
1969 0x2f, 0x31, 0x2e, 0x31,
1970 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1971 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1972 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1973 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1974 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1975 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1976 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1977 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1978 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1979 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1980 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1981 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1982 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1983 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1984 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1985 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1986 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1987 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1988 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1989 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1990 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1991 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1992 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1993 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1994 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1995 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1996 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1997 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1998 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1999 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2000 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2001 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2002 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2003 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2004 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2005 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2006 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2007 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2008 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2009 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2011 tcph.th_ack = htonl(88);
2012 tcph.th_seq = htonl(5);
2031 tcph.th_ack = htonl(328);
2032 tcph.th_seq = htonl(88);
2057 static int AppLayerTest05(
void)
2062 uint8_t request[] = {
2063 0x48, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2064 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2065 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2066 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2067 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2068 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2069 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2070 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2071 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2072 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2073 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2075 tcph.th_ack = htonl(1);
2076 tcph.th_seq = htonl(1);
2095 uint8_t response[] = {
2096 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2097 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2098 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2099 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2100 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2101 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2102 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2103 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2104 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2105 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2106 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2107 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2108 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2109 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2110 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2111 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2112 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2113 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2114 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2115 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2116 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2117 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2118 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2119 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2120 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2121 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2122 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2123 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2124 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2125 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2126 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2127 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2128 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2129 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2130 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2131 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2132 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2133 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2134 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2135 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2136 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2138 tcph.th_ack = htonl(88);
2139 tcph.th_seq = htonl(1);
2158 tcph.th_ack = htonl(328);
2159 tcph.th_seq = htonl(88);
2184 static int AppLayerTest06(
void)
2189 uint8_t response[] = {
2190 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2191 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2192 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2193 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2194 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2195 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2196 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2197 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2198 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2199 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2200 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2201 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2202 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2203 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2204 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2205 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2206 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2207 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2208 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2209 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2210 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2211 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2212 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2213 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2214 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2215 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2216 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2217 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2218 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2219 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2220 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2221 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2222 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2223 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2224 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2225 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2226 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2227 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2228 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2229 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2230 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2231 tcph.th_ack = htonl(1);
2232 tcph.th_seq = htonl(1);
2251 uint8_t request[] = {
2252 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2253 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2254 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2255 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2256 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2257 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2258 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2259 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2260 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2261 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2262 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2263 tcph.th_ack = htonl(328);
2264 tcph.th_seq = htonl(1);
2282 tcph.th_ack = htonl(1 +
sizeof(request));
2283 tcph.th_seq = htonl(328);
2308 static int AppLayerTest07(
void)
2313 uint8_t request[] = {
2314 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2315 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2316 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2317 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2318 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2319 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2320 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2321 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2322 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2323 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2324 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2325 tcph.th_ack = htonl(1);
2326 tcph.th_seq = htonl(1);
2345 uint8_t response[] = { 0x05, 0x00, 0x4d, 0x42, 0x00, 0x01, 0x2e, 0x31, 0x20, 0x32, 0x30, 0x30,
2346 0x20, 0x4f, 0x4b, 0x0d, 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46, 0x72, 0x69, 0x2c,
2347 0x20, 0x32, 0x33, 0x20, 0x53, 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20, 0x30, 0x36,
2348 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65, 0x72,
2349 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2350 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69, 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f,
2351 0x32, 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,
2352 0x64, 0x3a, 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34, 0x20, 0x4e, 0x6f, 0x76, 0x20,
2353 0x32, 0x30, 0x31, 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a, 0x34, 0x36, 0x20, 0x47,
2354 0x4d, 0x54, 0x0d, 0x0a, 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61, 0x62, 0x38, 0x39,
2355 0x36, 0x35, 0x2d, 0x32, 0x63, 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61, 0x37, 0x66,
2356 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x52,
2357 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2358 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20,
2359 0x34, 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a,
2360 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
2361 0x2d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d,
2362 0x6c, 0x0d, 0x0a, 0x58, 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76, 0x6f, 0x69, 0x64,
2363 0x20, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d, 0x0a, 0x0d,
2364 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x68,
2365 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2366 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2367 tcph.th_ack = htonl(88);
2368 tcph.th_seq = htonl(1);
2387 tcph.th_ack = htonl(328);
2388 tcph.th_seq = htonl(88);
2415 static int AppLayerTest09(
void)
2420 uint8_t request1[] = {
2421 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64 };
2422 tcph.th_ack = htonl(1);
2423 tcph.th_seq = htonl(1);
2442 tcph.th_ack = htonl(9);
2443 tcph.th_seq = htonl(1);
2462 uint8_t request2[] = {
2463 0x44, 0x44, 0x45, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2464 tcph.th_ack = htonl(1);
2465 tcph.th_seq = htonl(9);
2484 uint8_t response[] = {
2485 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2486 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2487 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2488 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2489 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2490 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2491 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2492 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2493 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2494 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2495 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2496 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2497 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2498 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2499 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2500 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2501 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2502 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2503 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2504 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2505 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2506 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2507 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2508 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2509 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2510 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2511 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2512 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2513 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2514 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2515 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2516 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2517 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2518 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2519 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2520 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2521 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2522 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2523 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2524 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2525 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2526 tcph.th_ack = htonl(18);
2527 tcph.th_seq = htonl(1);
2546 tcph.th_ack = htonl(328);
2547 tcph.th_seq = htonl(18);
2573 static int AppLayerTest10(
void)
2578 uint8_t request1[] = {
2579 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2580 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2581 tcph.th_ack = htonl(1);
2582 tcph.th_seq = htonl(1);
2601 tcph.th_ack = htonl(18);
2602 tcph.th_seq = htonl(1);
2621 uint8_t response[] = {
2622 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2623 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2624 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2625 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2626 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2627 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2628 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2629 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2630 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2631 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2632 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2633 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2634 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2635 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2636 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2637 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2638 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2639 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2640 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2641 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2642 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2643 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2644 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2645 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2646 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2647 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2648 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2649 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2650 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2651 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2652 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2653 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2654 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2655 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2656 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2657 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2658 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2659 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2660 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2661 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2662 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2663 tcph.th_ack = htonl(18);
2664 tcph.th_seq = htonl(1);
2683 tcph.th_ack = htonl(328);
2684 tcph.th_seq = htonl(18);
2711 static int AppLayerTest11(
void)
2716 uint8_t request1[] = {
2717 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2718 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2719 tcph.th_ack = htonl(1);
2720 tcph.th_seq = htonl(1);
2739 tcph.th_ack = htonl(18);
2740 tcph.th_seq = htonl(1);
2759 uint8_t response1[] = {
2760 0x55, 0x74, 0x54, 0x50, };
2761 tcph.th_ack = htonl(18);
2762 tcph.th_seq = htonl(1);
2781 tcph.th_ack = htonl(5);
2782 tcph.th_seq = htonl(18);
2800 uint8_t response2[] = {
2801 0x2f, 0x31, 0x2e, 0x31,
2802 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2803 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2804 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2805 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2806 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2807 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2808 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2809 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2810 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2811 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2812 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2813 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2814 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2815 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2816 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2817 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2818 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2819 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2820 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2821 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2822 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2823 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2824 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2825 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2826 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2827 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2828 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2829 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2830 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2831 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2832 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2833 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2834 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2835 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2836 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2837 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2838 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2839 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2840 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2841 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2842 tcph.th_ack = htonl(18);
2843 tcph.th_seq = htonl(5);
2862 tcph.th_ack = htonl(328);
2863 tcph.th_seq = htonl(18);