summaryrefslogtreecommitdiff
path: root/test/regression/mdns_test/mdns_multiple_questions_per_query_test.c
blob: 1b300570c4d61af7036d384cde5988b4d84347b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/***************************************************************************/
/* 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 (103 bytes) */
static const unsigned char pkt1[103] = {
0x01, 0x00, 0x5e, 0x00, 0x00, 0xfb, 0x00, 0x0c, /* ..^..... */
0x29, 0x01, 0xd4, 0x8d, 0x08, 0x00, 0x45, 0x00, /* ).....E. */
0x00, 0x59, 0x00, 0x00, 0x40, 0x00, 0xff, 0x11, /* .Y..@... */
0x90, 0x97, 0x0a, 0x00, 0x00, 0x01, 0xe0, 0x00, /* ........ */
0x00, 0xfb, 0x14, 0xe9, 0x14, 0xe9, 0x00, 0x45, /* .......E */
0xe9, 0xfa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, /* ........ */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x5f, /* ......._ */
0x74, 0x65, 0x73, 0x74, 0x31, 0x04, 0x5f, 0x74, /* test1._t */
0x63, 0x70, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, /* cp.local */
0x00, 0x00, 0x0c, 0x00, 0x01, 0x06, 0x5f, 0x74, /* ......_t */
0x65, 0x73, 0x74, 0x32, 0xc0, 0x13, 0x00, 0x0c, /* est2.... */
0x00, 0x01, 0x06, 0x5f, 0x74, 0x65, 0x73, 0x74, /* ..._test */
0x33, 0xc0, 0x13, 0x00, 0x0c, 0x00, 0x01        /* 3...... */
};

static MDNS_QUERY_INFO mdns_query1 = {NX_NULL, "_test1._tcp", NX_NULL};
static MDNS_QUERY_INFO mdns_query2 = {NX_NULL, "_test2._tcp", NX_NULL};
static MDNS_QUERY_INFO mdns_query3 = {NX_NULL, "_test3._tcp", NX_NULL};

MDNS_TEST_SEQ mdns_multiple_questions_per_query[] = {
    {TITLE, "Multiple questions per query", 28, 0},
    
    {MDNS_QUERY, (char*)&mdns_query1, 0, 0},
    {MDNS_QUERY, (char*)&mdns_query2, 0, 0},
    {MDNS_QUERY, (char*)&mdns_query3, 0, 0},
    {MDNS_CHECK_DATA_V4, (char*)&pkt1[0], sizeof(pkt1), 2},
};

int mdns_multiple_questions_per_query_size = sizeof(mdns_multiple_questions_per_query) / sizeof(MDNS_TEST_SEQ);

#endif /* __PRODUCT_NETXDUO__  */