/***************************************************************************/ /* Copyright (c) 2024 Microsoft Corporation */ /* Copyright (c) 2026 Eclipse ThreadX contributors */ /* */ /* This program and the accompanying materials are made available under */ /* the terms of the MIT License which is available at */ /* https://opensource.org/licenses/MIT. */ /* */ /* SPDX-License-Identifier: MIT */ /***************************************************************************/ #include "nx_api.h" #ifdef __PRODUCT_NETXDUO__ #include "netx_mdns_test.h" /* Frame (171 bytes) */ static const unsigned char pkt1[171] = { 0x01, 0x00, 0x5e, 0x00, 0x00, 0xfb, 0xec, 0x17, /* ..^..... */ 0x2f, 0xbd, 0xa4, 0xb1, 0x08, 0x00, 0x45, 0x00, /* /.....E. */ 0x00, 0x9d, 0x1e, 0x02, 0x00, 0x00, 0xff, 0x11, /* ........ */ 0xf4, 0x9f, 0xc0, 0xa8, 0x07, 0x0a, 0xe0, 0x00, /* ........ */ 0x00, 0xfb, 0x14, 0xe9, 0x14, 0xe9, 0x00, 0x89, /* ........ */ 0x2c, 0xb0, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, /* ,....... */ 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x04, 0x74, /* .......t */ 0x65, 0x73, 0x74, 0x05, 0x5f, 0x68, 0x74, 0x74, /* est._htt */ 0x70, 0x04, 0x5f, 0x74, 0x63, 0x70, 0x05, 0x6c, /* p._tcp.l */ 0x6f, 0x63, 0x61, 0x6c, 0x00, 0x00, 0x21, 0x80, /* ocal..!. */ 0x01, 0x00, 0x00, 0x00, 0x78, 0x00, 0x11, 0x00, /* ....x... */ 0x00, 0x00, 0x00, 0x00, 0x50, 0x08, 0x43, 0x61, /* ....P.Ca */ 0x74, 0x72, 0x6f, 0x2d, 0x50, 0x43, 0xc0, 0x1c, /* tro-PC.. */ 0xc0, 0x0c, 0x00, 0x10, 0x80, 0x01, 0x00, 0x00, /* ........ */ 0x11, 0x94, 0x00, 0x01, 0x00, 0xc0, 0x33, 0x00, /* ......3. */ 0x01, 0x80, 0x01, 0x00, 0x00, 0x00, 0x78, 0x00, /* ......x. */ 0x04, 0xc0, 0xa8, 0x07, 0x0a, 0xc0, 0x33, 0x00, /* ......3. */ 0x2f, 0x80, 0x01, 0x00, 0x00, 0x00, 0x78, 0x00, /* /.....x. */ 0x05, 0xc0, 0x33, 0x00, 0x01, 0x40, 0xc0, 0x0c, /* ..3..@.. */ 0x00, 0x2f, 0x80, 0x01, 0x00, 0x00, 0x00, 0x78, /* ./.....x */ 0x00, 0x09, 0xc0, 0x0c, 0x00, 0x05, 0x00, 0x00, /* ........ */ 0x80, 0x00, 0x40 /* ..@ */ }; static MDNS_QUERY_INFO mdns_query = {"test", "_http._tcp", NX_NULL}; MDNS_TEST_SEQ mdns_known_answer_suppression_unique[] = { {TITLE, "Known answer suppression unique", 31, 0}, /* Waiting for host name probing and announcing. */ {WAIT, NX_NULL, 0, 5}, /* Inject one service. */ {INJECT, (char*)&pkt1[0], sizeof(pkt1), 0}, {DUMP, NX_NULL, 0, 0}, {MDNS_QUERY, (char*)&mdns_query, 0, 0}, /* No queries are expected. */ {MDNS_REJECT_ANY_V4, NX_NULL, MDNS_FLAG_QUERY, 2}, }; int mdns_known_answer_suppression_unique_size = sizeof(mdns_known_answer_suppression_unique) / sizeof(MDNS_TEST_SEQ); #endif /* __PRODUCT_NETXDUO__ */