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) {
330 size_tc > size_tc_limit && size_ts == 0) {
338 }
else if (size_tc > size_tc_limit &&
FLOW_IS_PP_DONE(f, STREAM_TOSERVER) &&
348 }
else if (size_ts > size_ts_limit &&
FLOW_IS_PP_DONE(f, STREAM_TOCLIENT) &&
358 DisableAppLayer(
tv, f, p);
365 if (stream == &ssn->
client) {
366 opposing_stream = &ssn->
server;
368 opposing_stream = &ssn->
client;
374 SCLogDebug(
"opposing dir has STREAMTCP_STREAM_FLAG_NOREASSEMBLY set");
382 opposing_stream, p, dir);
398 uint8_t direction = (
flags & STREAM_TOSERVER) ? 0 : 1;
400 if (
flags & STREAM_TOSERVER) {
408 SCLogDebug(
"Stream initializer (len %" PRIu32
")", data_len);
411 printf(
"=> Init Stream Data (app layer) -- start %s%s\n",
412 flags & STREAM_TOCLIENT ?
"toclient" :
"",
413 flags & STREAM_TOSERVER ?
"toserver" :
"");
415 printf(
"=> Init Stream Data -- end\n");
419 bool reverse_flow =
false;
424 IPPROTO_TCP,
flags, &reverse_flow);
426 SCLogDebug(
"alproto %u rev %s", *alproto, reverse_flow ?
"true" :
"false");
429 if (*alproto_otherdir !=
ALPROTO_UNKNOWN && *alproto_otherdir != *alproto) {
435 f->
alproto = *alproto_otherdir;
439 if (
flags & STREAM_TOCLIENT)
442 f->
alproto = *alproto_otherdir;
451 FlagPacketFlow(p, f,
flags);
461 SCLogDebug(
"reversing flow after proto detect told us so");
467 if (*stream == &ssn->
client) {
472 direction = 1 - direction;
480 AppLayerIncFlowCounter(
tv, f);
493 SCLogDebug(
"protocol %s needs first data in other direction",
496 if (TCPProtoDetectTriggerOpposingSide(
tv, ra_ctx,
497 p, ssn, *stream) != 0)
529 uint8_t first_data_dir;
544 if (first_data_dir && !(first_data_dir &
flags)) {
560 flags, data, data_len);
569 if (*stream == &ssn->
client) {
570 opposing_stream = &ssn->
server;
572 opposing_stream = &ssn->
client;
576 AppLayerIncFlowCounter(
tv, f);
604 DisableAppLayer(
tv, f, p);
610 uint8_t first_data_dir;
629 (first_data_dir) && !(first_data_dir &
flags))
659 AppLayerIncFlowCounter(
tv, f);
661 *alproto = *alproto_otherdir;
662 SCLogDebug(
"packet %"PRIu64
": pd done(us %u them %u), parser called (r==%d), APPLAYER_DETECT_PROTOCOL_ONLY_ONE_DIRECTION set",
663 p->
pcap_cnt, *alproto, *alproto_otherdir, r);
670 FlagPacketFlow(p, f,
flags);
672 }
else if (
flags & STREAM_EOF) {
675 AppLayerIncFlowCounter(
tv, f);
686 DisableAppLayer(
tv, f, p);
689 TCPProtoDetectCheckBailConditions(
tv, f, ssn, p);
699 DisableAppLayer(
tv, f, p);
726 SCLogDebug(
"STREAMTCP_FLAG_APP_LAYER_DISABLED is set");
730 const uint8_t direction = (
flags & STREAM_TOSERVER) ? 0 : 1;
732 if (
flags & STREAM_TOSERVER) {
740 if (
flags & STREAM_GAP) {
744 SCLogDebug(
"ALPROTO_UNKNOWN flow %p, due to GAP in stream start", f);
749 AppLayerIncFlowCounter(
tv, f);
753 SCLogDebug(
"Cannot handle gap while changing protocol");
758 flags, data, data_len);
779 if (TCPProtoDetect(
tv, ra_ctx, app_tctx, p, f, ssn, stream, data, data_len,
flags,
780 app_update_dir) != 0) {
785 void *alstate_orig = f->
alstate;
792 int rd = TCPProtoDetect(
793 tv, ra_ctx, app_tctx, p, f, ssn, stream, data, data_len,
flags, app_update_dir);
804 if (alstate_orig == f->
alstate) {
828 SCLogDebug(
"stream data (len %" PRIu32
" alproto "
829 "%"PRIu16
" (flow %p)", data_len, f->
alproto, f);
832 printf(
"=> Stream Data (app layer) -- start %s%s\n",
833 flags & STREAM_TOCLIENT ?
"toclient" :
"",
834 flags & STREAM_TOSERVER ?
"toserver" :
"");
836 printf(
"=> Stream Data -- end\n");
844 flags, data, data_len);
891 flags |= STREAM_TOSERVER;
895 flags |= STREAM_TOCLIENT;
904 SCLogDebug(
"Detecting AL proto on udp mesg (len %" PRIu32
")",
907 bool reverse_flow =
false;
917 f->
alproto = *alproto_otherdir;
919 *alproto = *alproto_otherdir;
931 f->
alproto = *alproto_otherdir;
940 if (*alproto_otherdir != *alproto) {
956 AppLayerIncFlowCounter(
tv, f);
962 SCLogDebug(
"reversing flow after proto detect told us so");
977 FlagPacketFlow(p, f, STREAM_TOSERVER);
978 FlagPacketFlow(p, f, STREAM_TOCLIENT);
980 SCLogDebug(
"data (len %" PRIu32
" ), alproto "
1025 printf(
"=========Supported App Layer Protocols=========\n");
1027 if (alprotos[alproto] == 1)
1035 static void AppLayerNamesSetup(
void)
1082 AppLayerNamesSetup();
1113 if (app_tctx == NULL)
1133 if (app_tctx == NULL)
1174 static bool IsAppLayerErrorExceptionPolicyStatsValid(
enum ExceptionPolicy policy)
1182 static void AppLayerSetupExceptionPolicyPerProtoCounters(
1183 uint8_t ipproto_map,
AppProto alproto,
const char *alproto_str,
const char *ipproto_suffix)
1188 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1191 "app_layer.error.%s%s.exception_policy.%s", alproto_str, ipproto_suffix,
1200 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1202 const char *
str =
"app_layer.flow.";
1203 const char *estr =
"app_layer.error.";
1208 FatalError(
"Unable to alloc applayer_counter_names.");
1212 FatalError(
"Unable to alloc applayer_counters.");
1217 const char *eps_default_str =
"exception_policy.app_layer.error.";
1219 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1230 const uint8_t ipproto = ipprotos[p];
1232 const char *ipproto_suffix = (ipproto == IPPROTO_TCP) ?
"_tcp" :
"_udp";
1233 uint8_t ipprotos_all[256 / 8];
1236 if (alprotos[alproto] == 1) {
1237 const char *tx_str =
"app_layer.tx.";
1240 memset(ipprotos_all, 0,
sizeof(ipprotos_all));
1242 if ((ipprotos_all[IPPROTO_TCP / 8] & (1 << (IPPROTO_TCP % 8))) &&
1243 (ipprotos_all[IPPROTO_UDP / 8] & (1 << (IPPROTO_UDP % 8)))) {
1246 str, alproto_str, ipproto_suffix);
1249 tx_str, alproto_str, ipproto_suffix);
1251 if (ipproto == IPPROTO_TCP) {
1254 "%s%s%s.gap", estr, alproto_str, ipproto_suffix);
1258 "%s%s%s.alloc", estr, alproto_str, ipproto_suffix);
1261 "%s%s%s.parser", estr, alproto_str, ipproto_suffix);
1264 "%s%s%s.internal", estr, alproto_str, ipproto_suffix);
1266 AppLayerSetupExceptionPolicyPerProtoCounters(
1267 ipproto_map, alproto, alproto_str, ipproto_suffix);
1274 tx_str, alproto_str);
1276 if (ipproto == IPPROTO_TCP) {
1279 "%s%s.gap", estr, alproto_str);
1283 "%s%s.alloc", estr, alproto_str);
1286 "%s%s.parser", estr, alproto_str);
1289 "%s%s.internal", estr, alproto_str);
1290 AppLayerSetupExceptionPolicyPerProtoCounters(
1291 ipproto_map, alproto, alproto_str,
"");
1296 "failed", ipproto_suffix);
1297 if (ipproto == IPPROTO_TCP) {
1300 "%sfailed%s.gap", estr, ipproto_suffix);
1309 const uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
1317 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1325 const uint8_t ipproto = ipprotos[p];
1329 if (alprotos[alproto] == 1) {
1336 if (ipproto == IPPROTO_TCP) {
1351 if (IsAppLayerErrorExceptionPolicyStatsValid(i)) {
1362 if (ipproto == IPPROTO_TCP) {
1385 #define TEST_START \
1386 Packet *p = PacketGetFromAlloc(); \
1390 StreamTcpThread *stt = NULL; \
1392 PacketQueueNoLock pq; \
1393 memset(&pq, 0, sizeof(PacketQueueNoLock)); \
1394 memset(&f, 0, sizeof(Flow)); \
1395 memset(&tv, 0, sizeof(ThreadVars)); \
1396 memset(&tcph, 0, sizeof(TCPHdr)); \
1398 FLOW_INITIALIZE(&f); \
1399 f.flags = FLOW_IPV4; \
1400 f.proto = IPPROTO_TCP; \
1402 PacketSetTCP(p, (uint8_t *)&tcph); \
1404 StreamTcpInitConfig(true); \
1405 IPPairInitConfig(true); \
1406 StreamTcpThreadInit(&tv, NULL, (void **)&stt); \
1409 tcph.th_win = htons(5480); \
1410 tcph.th_flags = TH_SYN; \
1411 p->flowflags = FLOW_PKT_TOSERVER; \
1412 p->payload_len = 0; \
1413 p->payload = NULL; \
1414 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1415 TcpSession *ssn = (TcpSession *)f.protoctx; \
1417 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1418 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1419 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1420 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1421 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1422 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1423 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1424 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1425 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1426 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1427 FAIL_IF(ssn->data_first_seen_dir != 0); \
1430 tcph.th_ack = htonl(1); \
1431 tcph.th_flags = TH_SYN | TH_ACK; \
1432 p->flowflags = FLOW_PKT_TOCLIENT; \
1433 p->payload_len = 0; \
1434 p->payload = NULL; \
1435 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1436 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1437 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1438 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1439 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1440 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1441 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1442 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1443 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1444 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1445 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1446 FAIL_IF(ssn->data_first_seen_dir != 0); \
1449 tcph.th_ack = htonl(1); \
1450 tcph.th_seq = htonl(1); \
1451 tcph.th_flags = TH_ACK; \
1452 p->flowflags = FLOW_PKT_TOSERVER; \
1453 p->payload_len = 0; \
1454 p->payload = NULL; \
1455 FAIL_IF(StreamTcpPacket(&tv, p, stt, &pq) == -1); \
1456 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->server)); \
1457 FAIL_IF(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(&ssn->client)); \
1458 FAIL_IF(f.alproto != ALPROTO_UNKNOWN); \
1459 FAIL_IF(f.alproto_ts != ALPROTO_UNKNOWN); \
1460 FAIL_IF(f.alproto_tc != ALPROTO_UNKNOWN); \
1461 FAIL_IF(ssn->flags &STREAMTCP_FLAG_APP_LAYER_DISABLED); \
1462 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOSERVER)); \
1463 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOSERVER)); \
1464 FAIL_IF(FLOW_IS_PM_DONE(&f, STREAM_TOCLIENT)); \
1465 FAIL_IF(FLOW_IS_PP_DONE(&f, STREAM_TOCLIENT)); \
1466 FAIL_IF(ssn->data_first_seen_dir != 0);
1468 StreamTcpSessionClear(p->flow->protoctx); \
1469 StreamTcpThreadDeinit(&tv, (void *)stt); \
1470 StreamTcpFreeConfig(true); \
1473 StatsThreadCleanup(&tv);
1478 static int AppLayerTest01(
void)
1483 uint8_t request[] = {
1484 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1485 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1486 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1487 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1488 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1489 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1490 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1491 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1492 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1493 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1494 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1495 tcph.th_ack = htonl(1);
1496 tcph.th_seq = htonl(1);
1515 uint8_t response[] = {
1516 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1517 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1518 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1519 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1520 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1521 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1522 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1523 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1524 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1525 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1526 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1527 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1528 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1529 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1530 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1531 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1532 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1533 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1534 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1535 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1536 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1537 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1538 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1539 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1540 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1541 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1542 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1543 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1544 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1545 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1546 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1547 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1548 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1549 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1550 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1551 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1552 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1553 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1554 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1555 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1556 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1557 tcph.th_ack = htonl(88);
1558 tcph.th_seq = htonl(1);
1577 tcph.th_ack = htonl(328);
1578 tcph.th_seq = htonl(88);
1603 static int AppLayerTest02(
void)
1608 uint8_t request1[] = { 0x47, 0x45, };
1609 tcph.th_ack = htonl(1);
1610 tcph.th_seq = htonl(1);
1629 tcph.th_ack = htonl(3);
1630 tcph.th_seq = htonl(1);
1649 uint8_t request2[] = {
1650 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1651 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1652 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1653 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1654 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1655 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1656 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1657 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1658 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1659 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1660 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1661 tcph.th_ack = htonl(1);
1662 tcph.th_seq = htonl(3);
1681 uint8_t response[] = {
1682 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1683 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1684 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1685 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1686 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1687 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1688 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1689 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1690 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1691 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1692 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1693 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1694 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1695 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1696 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1697 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1698 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1699 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1700 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1701 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1702 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1703 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1704 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1705 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1706 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1707 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1708 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1709 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1710 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1711 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1712 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1713 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1714 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1715 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1716 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1717 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1718 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1719 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1720 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1721 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1722 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1723 tcph.th_ack = htonl(88);
1724 tcph.th_seq = htonl(1);
1743 tcph.th_ack = htonl(328);
1744 tcph.th_seq = htonl(88);
1769 static int AppLayerTest03(
void)
1774 uint8_t request[] = {
1775 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1776 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1777 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1778 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1779 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1780 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1781 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1782 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1783 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1784 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1785 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1786 tcph.th_ack = htonl(1);
1787 tcph.th_seq = htonl(1);
1806 uint8_t response[] = {
1807 0x58, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
1808 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1809 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1810 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1811 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1812 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1813 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1814 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1815 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1816 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1817 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1818 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1819 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1820 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1821 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1822 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1823 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1824 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1825 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1826 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1827 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1828 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1829 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1830 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1831 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
1832 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
1833 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
1834 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
1835 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
1836 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
1837 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
1838 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
1839 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
1840 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
1841 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
1842 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
1843 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
1844 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
1845 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
1846 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
1847 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
1848 tcph.th_ack = htonl(88);
1849 tcph.th_seq = htonl(1);
1868 tcph.th_ack = htonl(328);
1869 tcph.th_seq = htonl(88);
1894 static int AppLayerTest04(
void)
1899 uint8_t request[] = {
1900 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
1901 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
1902 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
1903 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
1904 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
1905 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
1906 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
1907 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
1908 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
1909 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
1910 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
1912 tcph.th_ack = htonl(1);
1913 tcph.th_seq = htonl(1);
1932 uint8_t response1[] = { 0x58, 0x54, 0x54, 0x50, };
1934 tcph.th_ack = htonl(88);
1935 tcph.th_seq = htonl(1);
1954 tcph.th_ack = htonl(5);
1955 tcph.th_seq = htonl(88);
1974 uint8_t response2[] = {
1975 0x2f, 0x31, 0x2e, 0x31,
1976 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
1977 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
1978 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
1979 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
1980 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
1981 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
1982 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
1983 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
1984 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
1985 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
1986 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
1987 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
1988 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
1989 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
1990 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
1991 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
1992 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
1993 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
1994 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
1995 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
1996 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
1997 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
1998 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
1999 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2000 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2001 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2002 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2003 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2004 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2005 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2006 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2007 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2008 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2009 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2010 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2011 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2012 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2013 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2014 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2015 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2017 tcph.th_ack = htonl(88);
2018 tcph.th_seq = htonl(5);
2037 tcph.th_ack = htonl(328);
2038 tcph.th_seq = htonl(88);
2063 static int AppLayerTest05(
void)
2068 uint8_t request[] = {
2069 0x48, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2070 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2071 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2072 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2073 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2074 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2075 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2076 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2077 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2078 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2079 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2081 tcph.th_ack = htonl(1);
2082 tcph.th_seq = htonl(1);
2101 uint8_t response[] = {
2102 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2103 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2104 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2105 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2106 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2107 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2108 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2109 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2110 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2111 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2112 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2113 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2114 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2115 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2116 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2117 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2118 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2119 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2120 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2121 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2122 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2123 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2124 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2125 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2126 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2127 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2128 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2129 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2130 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2131 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2132 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2133 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2134 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2135 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2136 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2137 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2138 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2139 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2140 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2141 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2142 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2144 tcph.th_ack = htonl(88);
2145 tcph.th_seq = htonl(1);
2164 tcph.th_ack = htonl(328);
2165 tcph.th_seq = htonl(88);
2190 static int AppLayerTest06(
void)
2195 uint8_t response[] = {
2196 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2197 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2198 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2199 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2200 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2201 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2202 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2203 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2204 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2205 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2206 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2207 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2208 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2209 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2210 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2211 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2212 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2213 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2214 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2215 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2216 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2217 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2218 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2219 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2220 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2221 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2222 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2223 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2224 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2225 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2226 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2227 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2228 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2229 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2230 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2231 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2232 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2233 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2234 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2235 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2236 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2237 tcph.th_ack = htonl(1);
2238 tcph.th_seq = htonl(1);
2257 uint8_t request[] = {
2258 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2259 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2260 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2261 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2262 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2263 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2264 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2265 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2266 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2267 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2268 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2269 tcph.th_ack = htonl(328);
2270 tcph.th_seq = htonl(1);
2288 tcph.th_ack = htonl(1 +
sizeof(request));
2289 tcph.th_seq = htonl(328);
2314 static int AppLayerTest07(
void)
2319 uint8_t request[] = {
2320 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2321 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x20,
2322 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30,
2323 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20,
2324 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
2325 0x74, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d,
2326 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x41,
2327 0x70, 0x61, 0x63, 0x68, 0x65, 0x42, 0x65, 0x6e,
2328 0x63, 0x68, 0x2f, 0x32, 0x2e, 0x33, 0x0d, 0x0a,
2329 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20,
2330 0x2a, 0x2f, 0x2a, 0x0d, 0x0a, 0x0d, 0x0a };
2331 tcph.th_ack = htonl(1);
2332 tcph.th_seq = htonl(1);
2351 uint8_t response[] = { 0x05, 0x00, 0x4d, 0x42, 0x00, 0x01, 0x2e, 0x31, 0x20, 0x32, 0x30, 0x30,
2352 0x20, 0x4f, 0x4b, 0x0d, 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46, 0x72, 0x69, 0x2c,
2353 0x20, 0x32, 0x33, 0x20, 0x53, 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20, 0x30, 0x36,
2354 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65, 0x72,
2355 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2356 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69, 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f,
2357 0x32, 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,
2358 0x64, 0x3a, 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34, 0x20, 0x4e, 0x6f, 0x76, 0x20,
2359 0x32, 0x30, 0x31, 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a, 0x34, 0x36, 0x20, 0x47,
2360 0x4d, 0x54, 0x0d, 0x0a, 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61, 0x62, 0x38, 0x39,
2361 0x36, 0x35, 0x2d, 0x32, 0x63, 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61, 0x37, 0x66,
2362 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x52,
2363 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2364 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20,
2365 0x34, 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a,
2366 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
2367 0x2d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d,
2368 0x6c, 0x0d, 0x0a, 0x58, 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76, 0x6f, 0x69, 0x64,
2369 0x20, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d, 0x0a, 0x0d,
2370 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x68,
2371 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2372 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2373 tcph.th_ack = htonl(88);
2374 tcph.th_seq = htonl(1);
2393 tcph.th_ack = htonl(328);
2394 tcph.th_seq = htonl(88);
2421 static int AppLayerTest09(
void)
2426 uint8_t request1[] = {
2427 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64 };
2428 tcph.th_ack = htonl(1);
2429 tcph.th_seq = htonl(1);
2448 tcph.th_ack = htonl(9);
2449 tcph.th_seq = htonl(1);
2468 uint8_t request2[] = {
2469 0x44, 0x44, 0x45, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2470 tcph.th_ack = htonl(1);
2471 tcph.th_seq = htonl(9);
2490 uint8_t response[] = {
2491 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2492 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2493 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2494 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2495 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2496 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2497 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2498 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2499 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2500 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2501 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2502 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2503 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2504 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2505 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2506 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2507 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2508 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2509 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2510 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2511 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2512 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2513 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2514 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2515 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2516 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2517 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2518 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2519 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2520 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2521 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2522 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2523 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2524 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2525 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2526 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2527 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2528 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2529 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2530 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2531 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2532 tcph.th_ack = htonl(18);
2533 tcph.th_seq = htonl(1);
2552 tcph.th_ack = htonl(328);
2553 tcph.th_seq = htonl(18);
2579 static int AppLayerTest10(
void)
2584 uint8_t request1[] = {
2585 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2586 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2587 tcph.th_ack = htonl(1);
2588 tcph.th_seq = htonl(1);
2607 tcph.th_ack = htonl(18);
2608 tcph.th_seq = htonl(1);
2627 uint8_t response[] = {
2628 0x55, 0x74, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
2629 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2630 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2631 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2632 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2633 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2634 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2635 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2636 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2637 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2638 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2639 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2640 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2641 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2642 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2643 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2644 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2645 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2646 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2647 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2648 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2649 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2650 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2651 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2652 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2653 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2654 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2655 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2656 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2657 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2658 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2659 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2660 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2661 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2662 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2663 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2664 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2665 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2666 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2667 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2668 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2669 tcph.th_ack = htonl(18);
2670 tcph.th_seq = htonl(1);
2689 tcph.th_ack = htonl(328);
2690 tcph.th_seq = htonl(18);
2717 static int AppLayerTest11(
void)
2722 uint8_t request1[] = {
2723 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64,
2724 0x47, 0x47, 0x49, 0x20, 0x2f, 0x69, 0x6e, 0x64, 0xff };
2725 tcph.th_ack = htonl(1);
2726 tcph.th_seq = htonl(1);
2745 tcph.th_ack = htonl(18);
2746 tcph.th_seq = htonl(1);
2765 uint8_t response1[] = {
2766 0x55, 0x74, 0x54, 0x50, };
2767 tcph.th_ack = htonl(18);
2768 tcph.th_seq = htonl(1);
2787 tcph.th_ack = htonl(5);
2788 tcph.th_seq = htonl(18);
2806 uint8_t response2[] = {
2807 0x2f, 0x31, 0x2e, 0x31,
2808 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
2809 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x46,
2810 0x72, 0x69, 0x2c, 0x20, 0x32, 0x33, 0x20, 0x53,
2811 0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x31, 0x20,
2812 0x30, 0x36, 0x3a, 0x32, 0x39, 0x3a, 0x33, 0x39,
2813 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
2814 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
2815 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
2816 0x2e, 0x31, 0x35, 0x20, 0x28, 0x55, 0x6e, 0x69,
2817 0x78, 0x29, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32,
2818 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d,
2819 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a,
2820 0x20, 0x54, 0x68, 0x75, 0x2c, 0x20, 0x30, 0x34,
2821 0x20, 0x4e, 0x6f, 0x76, 0x20, 0x32, 0x30, 0x31,
2822 0x30, 0x20, 0x31, 0x35, 0x3a, 0x30, 0x34, 0x3a,
2823 0x34, 0x36, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a,
2824 0x45, 0x54, 0x61, 0x67, 0x3a, 0x20, 0x22, 0x61,
2825 0x62, 0x38, 0x39, 0x36, 0x35, 0x2d, 0x32, 0x63,
2826 0x2d, 0x34, 0x39, 0x34, 0x33, 0x62, 0x37, 0x61,
2827 0x37, 0x66, 0x37, 0x66, 0x38, 0x30, 0x22, 0x0d,
2828 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d,
2829 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a, 0x20,
2830 0x62, 0x79, 0x74, 0x65, 0x73, 0x0d, 0x0a, 0x43,
2831 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c,
2832 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34,
2833 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
2834 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
2835 0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
2836 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
2837 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
2838 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x58,
2839 0x2d, 0x50, 0x61, 0x64, 0x3a, 0x20, 0x61, 0x76,
2840 0x6f, 0x69, 0x64, 0x20, 0x62, 0x72, 0x6f, 0x77,
2841 0x73, 0x65, 0x72, 0x20, 0x62, 0x75, 0x67, 0x0d,
2842 0x0a, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c,
2843 0x3e, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
2844 0x68, 0x31, 0x3e, 0x49, 0x74, 0x20, 0x77, 0x6f,
2845 0x72, 0x6b, 0x73, 0x21, 0x3c, 0x2f, 0x68, 0x31,
2846 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e,
2847 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e };
2848 tcph.th_ack = htonl(18);
2849 tcph.th_seq = htonl(5);
2868 tcph.th_ack = htonl(328);
2869 tcph.th_seq = htonl(18);