mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-27 12:35:26 +00:00
fixed warnings in mdns unit tests
This commit is contained in:
parent
d2631e6a53
commit
8760fb677f
@ -42,6 +42,7 @@ START_TEST(readname_basic)
|
|||||||
struct pbuf *p;
|
struct pbuf *p;
|
||||||
struct mdns_domain domain;
|
struct mdns_domain domain;
|
||||||
u16_t offset;
|
u16_t offset;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
||||||
p->payload = (void *)(size_t)data;
|
p->payload = (void *)(size_t)data;
|
||||||
@ -60,6 +61,7 @@ START_TEST(readname_anydata)
|
|||||||
struct pbuf *p;
|
struct pbuf *p;
|
||||||
struct mdns_domain domain;
|
struct mdns_domain domain;
|
||||||
u16_t offset;
|
u16_t offset;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
||||||
p->payload = (void *)(size_t)data;
|
p->payload = (void *)(size_t)data;
|
||||||
@ -78,6 +80,7 @@ START_TEST(readname_short_buf)
|
|||||||
struct pbuf *p;
|
struct pbuf *p;
|
||||||
struct mdns_domain domain;
|
struct mdns_domain domain;
|
||||||
u16_t offset;
|
u16_t offset;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
||||||
p->payload = (void *)(size_t)data;
|
p->payload = (void *)(size_t)data;
|
||||||
@ -89,18 +92,20 @@ START_TEST(readname_short_buf)
|
|||||||
END_TEST
|
END_TEST
|
||||||
|
|
||||||
START_TEST(readname_long_label)
|
START_TEST(readname_long_label)
|
||||||
{ static const u8_t data[] = {
|
{
|
||||||
|
static const u8_t data[] = {
|
||||||
0x05, 'm', 'u', 'l', 't', 'i',
|
0x05, 'm', 'u', 'l', 't', 'i',
|
||||||
0x52, 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a',
|
0x52, 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a',
|
||||||
'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a',
|
'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a',
|
||||||
'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a',
|
'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a',
|
||||||
'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a',
|
'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a',
|
||||||
'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a',
|
'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a',
|
||||||
'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 0x00,
|
'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 0x00
|
||||||
};
|
};
|
||||||
struct pbuf *p;
|
struct pbuf *p;
|
||||||
struct mdns_domain domain;
|
struct mdns_domain domain;
|
||||||
u16_t offset;
|
u16_t offset;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
||||||
p->payload = (void *)(size_t)data;
|
p->payload = (void *)(size_t)data;
|
||||||
@ -151,11 +156,12 @@ START_TEST(readname_overflow)
|
|||||||
0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't',
|
0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't',
|
||||||
0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't',
|
0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't',
|
||||||
0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't',
|
0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't',
|
||||||
0x00,
|
0x00
|
||||||
};
|
};
|
||||||
struct pbuf *p;
|
struct pbuf *p;
|
||||||
struct mdns_domain domain;
|
struct mdns_domain domain;
|
||||||
u16_t offset;
|
u16_t offset;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
||||||
p->payload = (void *)(size_t)data;
|
p->payload = (void *)(size_t)data;
|
||||||
@ -172,14 +178,15 @@ START_TEST(readname_jump_earlier)
|
|||||||
/* Some padding needed, not supported to jump to bytes containing dns header */
|
/* Some padding needed, not supported to jump to bytes containing dns header */
|
||||||
/* 0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
/* 0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
/* 10 */ 0x0f, 0x0e, 0x05, 'l', 'o', 'c', 'a', 'l', 0x00, 0xab,
|
/* 10 */ 0x0f, 0x0e, 0x05, 'l', 'o', 'c', 'a', 'l', 0x00, 0xab,
|
||||||
/* 20 */ 0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't', 0xc0, 0x0c,
|
/* 20 */ 0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't', 0xc0, 0x0c
|
||||||
};
|
};
|
||||||
static const u8_t fullname[] = {
|
static const u8_t fullname[] = {
|
||||||
0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't', 0x05, 'l', 'o', 'c', 'a', 'l', 0x00,
|
0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't', 0x05, 'l', 'o', 'c', 'a', 'l', 0x00
|
||||||
};
|
};
|
||||||
struct pbuf *p;
|
struct pbuf *p;
|
||||||
struct mdns_domain domain;
|
struct mdns_domain domain;
|
||||||
u16_t offset;
|
u16_t offset;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
||||||
p->payload = (void *)(size_t)data;
|
p->payload = (void *)(size_t)data;
|
||||||
@ -200,14 +207,15 @@ START_TEST(readname_jump_earlier_jump)
|
|||||||
/* 0x00 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
/* 0x00 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
/* 0x08 */ 0x00, 0x00, 0x00, 0x00, 0x03, 0x0b, 0x0a, 0xf2,
|
/* 0x08 */ 0x00, 0x00, 0x00, 0x00, 0x03, 0x0b, 0x0a, 0xf2,
|
||||||
/* 0x10 */ 0x04, 'c', 'a', 's', 't', 0x00, 0xc0, 0x10,
|
/* 0x10 */ 0x04, 'c', 'a', 's', 't', 0x00, 0xc0, 0x10,
|
||||||
/* 0x18 */ 0x05, 'm', 'u', 'l', 't', 'i', 0xc0, 0x16,
|
/* 0x18 */ 0x05, 'm', 'u', 'l', 't', 'i', 0xc0, 0x16
|
||||||
};
|
};
|
||||||
static const u8_t fullname[] = {
|
static const u8_t fullname[] = {
|
||||||
0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't', 0x00,
|
0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't', 0x00
|
||||||
};
|
};
|
||||||
struct pbuf *p;
|
struct pbuf *p;
|
||||||
struct mdns_domain domain;
|
struct mdns_domain domain;
|
||||||
u16_t offset;
|
u16_t offset;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
||||||
p->payload = (void *)(size_t)data;
|
p->payload = (void *)(size_t)data;
|
||||||
@ -231,16 +239,17 @@ START_TEST(readname_jump_maxdepth)
|
|||||||
/* 0x18 */ 0x03, 'd', 'n', 's', 0xc0, 0x10, 0xc0, 0x10,
|
/* 0x18 */ 0x03, 'd', 'n', 's', 0xc0, 0x10, 0xc0, 0x10,
|
||||||
/* 0x20 */ 0x04, 'd', 'e', 'e', 'p', 0xc0, 0x18, 0x00,
|
/* 0x20 */ 0x04, 'd', 'e', 'e', 'p', 0xc0, 0x18, 0x00,
|
||||||
/* 0x28 */ 0x04, 'c', 'a', 's', 't', 0xc0, 0x20, 0xb0,
|
/* 0x28 */ 0x04, 'c', 'a', 's', 't', 0xc0, 0x20, 0xb0,
|
||||||
/* 0x30 */ 0x05, 'm', 'u', 'l', 't', 'i', 0xc0, 0x28,
|
/* 0x30 */ 0x05, 'm', 'u', 'l', 't', 'i', 0xc0, 0x28
|
||||||
};
|
};
|
||||||
static const u8_t fullname[] = {
|
static const u8_t fullname[] = {
|
||||||
0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't',
|
0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't',
|
||||||
0x04, 'd', 'e', 'e', 'p', 0x03, 'd', 'n', 's',
|
0x04, 'd', 'e', 'e', 'p', 0x03, 'd', 'n', 's',
|
||||||
0x04, 'n', 'a', 'm', 'e', 0x00,
|
0x04, 'n', 'a', 'm', 'e', 0x00
|
||||||
};
|
};
|
||||||
struct pbuf *p;
|
struct pbuf *p;
|
||||||
struct mdns_domain domain;
|
struct mdns_domain domain;
|
||||||
u16_t offset;
|
u16_t offset;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
||||||
p->payload = (void *)(size_t)data;
|
p->payload = (void *)(size_t)data;
|
||||||
@ -258,14 +267,15 @@ START_TEST(readname_jump_later)
|
|||||||
{
|
{
|
||||||
static const u8_t data[] = {
|
static const u8_t data[] = {
|
||||||
/* 0x00 */ 0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't', 0xc0, 0x10, 0x00, 0x01, 0x40,
|
/* 0x00 */ 0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't', 0xc0, 0x10, 0x00, 0x01, 0x40,
|
||||||
/* 0x10 */ 0x05, 'l', 'o', 'c', 'a', 'l', 0x00, 0xab,
|
/* 0x10 */ 0x05, 'l', 'o', 'c', 'a', 'l', 0x00, 0xab
|
||||||
};
|
};
|
||||||
static const u8_t fullname[] = {
|
static const u8_t fullname[] = {
|
||||||
0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't', 0x05, 'l', 'o', 'c', 'a', 'l', 0x00,
|
0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't', 0x05, 'l', 'o', 'c', 'a', 'l', 0x00
|
||||||
};
|
};
|
||||||
struct pbuf *p;
|
struct pbuf *p;
|
||||||
struct mdns_domain domain;
|
struct mdns_domain domain;
|
||||||
u16_t offset;
|
u16_t offset;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
||||||
p->payload = (void *)(size_t)data;
|
p->payload = (void *)(size_t)data;
|
||||||
@ -282,11 +292,12 @@ END_TEST
|
|||||||
START_TEST(readname_half_jump)
|
START_TEST(readname_half_jump)
|
||||||
{
|
{
|
||||||
static const u8_t data[] = {
|
static const u8_t data[] = {
|
||||||
0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't', 0xc0,
|
0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't', 0xc0
|
||||||
};
|
};
|
||||||
struct pbuf *p;
|
struct pbuf *p;
|
||||||
struct mdns_domain domain;
|
struct mdns_domain domain;
|
||||||
u16_t offset;
|
u16_t offset;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
||||||
p->payload = (void *)(size_t)data;
|
p->payload = (void *)(size_t)data;
|
||||||
@ -300,11 +311,12 @@ END_TEST
|
|||||||
START_TEST(readname_jump_toolong)
|
START_TEST(readname_jump_toolong)
|
||||||
{
|
{
|
||||||
static const u8_t data[] = {
|
static const u8_t data[] = {
|
||||||
0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't', 0xc2, 0x10, 0x00, 0x01, 0x40,
|
0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't', 0xc2, 0x10, 0x00, 0x01, 0x40
|
||||||
};
|
};
|
||||||
struct pbuf *p;
|
struct pbuf *p;
|
||||||
struct mdns_domain domain;
|
struct mdns_domain domain;
|
||||||
u16_t offset;
|
u16_t offset;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
||||||
p->payload = (void *)(size_t)data;
|
p->payload = (void *)(size_t)data;
|
||||||
@ -319,11 +331,12 @@ START_TEST(readname_jump_loop_label)
|
|||||||
{
|
{
|
||||||
static const u8_t data[] = {
|
static const u8_t data[] = {
|
||||||
/* 0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
/* 0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
/* 10 */ 0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't', 0xc0, 0x10,
|
/* 10 */ 0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't', 0xc0, 0x10
|
||||||
};
|
};
|
||||||
struct pbuf *p;
|
struct pbuf *p;
|
||||||
struct mdns_domain domain;
|
struct mdns_domain domain;
|
||||||
u16_t offset;
|
u16_t offset;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
||||||
p->payload = (void *)(size_t)data;
|
p->payload = (void *)(size_t)data;
|
||||||
@ -338,11 +351,12 @@ START_TEST(readname_jump_loop_jump)
|
|||||||
{
|
{
|
||||||
static const u8_t data[] = {
|
static const u8_t data[] = {
|
||||||
/* 0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
/* 0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
/* 10 */ 0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't', 0xc0, 0x15,
|
/* 10 */ 0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't', 0xc0, 0x15
|
||||||
};
|
};
|
||||||
struct pbuf *p;
|
struct pbuf *p;
|
||||||
struct mdns_domain domain;
|
struct mdns_domain domain;
|
||||||
u16_t offset;
|
u16_t offset;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
||||||
p->payload = (void *)(size_t)data;
|
p->payload = (void *)(size_t)data;
|
||||||
@ -358,6 +372,7 @@ START_TEST(add_label_basic)
|
|||||||
static const u8_t data[] = { 0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't', 0x00 };
|
static const u8_t data[] = { 0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't', 0x00 };
|
||||||
struct mdns_domain domain;
|
struct mdns_domain domain;
|
||||||
err_t res;
|
err_t res;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
memset(&domain, 0, sizeof(domain));
|
memset(&domain, 0, sizeof(domain));
|
||||||
res = mdns_domain_add_label(&domain, "multi", 5);
|
res = mdns_domain_add_label(&domain, "multi", 5);
|
||||||
@ -376,6 +391,7 @@ START_TEST(add_label_long_label)
|
|||||||
static const char *toolong = "abcdefghijklmnopqrstuvwxyz0123456789-abcdefghijklmnopqrstuvwxyz0123456789-abcdefghijklmnopqrstuvwxyz0123456789-";
|
static const char *toolong = "abcdefghijklmnopqrstuvwxyz0123456789-abcdefghijklmnopqrstuvwxyz0123456789-abcdefghijklmnopqrstuvwxyz0123456789-";
|
||||||
struct mdns_domain domain;
|
struct mdns_domain domain;
|
||||||
err_t res;
|
err_t res;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
memset(&domain, 0, sizeof(domain));
|
memset(&domain, 0, sizeof(domain));
|
||||||
res = mdns_domain_add_label(&domain, "multi", 5);
|
res = mdns_domain_add_label(&domain, "multi", 5);
|
||||||
@ -390,6 +406,7 @@ START_TEST(add_label_full)
|
|||||||
static const char *label = "0123456789abcdef0123456789abcdef";
|
static const char *label = "0123456789abcdef0123456789abcdef";
|
||||||
struct mdns_domain domain;
|
struct mdns_domain domain;
|
||||||
err_t res;
|
err_t res;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
memset(&domain, 0, sizeof(domain));
|
memset(&domain, 0, sizeof(domain));
|
||||||
res = mdns_domain_add_label(&domain, label, (u8_t)strlen(label));
|
res = mdns_domain_add_label(&domain, label, (u8_t)strlen(label));
|
||||||
@ -437,10 +454,11 @@ END_TEST
|
|||||||
START_TEST(domain_eq_basic)
|
START_TEST(domain_eq_basic)
|
||||||
{
|
{
|
||||||
static const u8_t data[] = {
|
static const u8_t data[] = {
|
||||||
0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't', 0x00,
|
0x05, 'm', 'u', 'l', 't', 'i', 0x04, 'c', 'a', 's', 't', 0x00
|
||||||
};
|
};
|
||||||
struct mdns_domain domain1, domain2;
|
struct mdns_domain domain1, domain2;
|
||||||
err_t res;
|
err_t res;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
memset(&domain1, 0, sizeof(domain1));
|
memset(&domain1, 0, sizeof(domain1));
|
||||||
res = mdns_domain_add_label(&domain1, "multi", 5);
|
res = mdns_domain_add_label(&domain1, "multi", 5);
|
||||||
@ -467,6 +485,7 @@ START_TEST(domain_eq_diff)
|
|||||||
{
|
{
|
||||||
struct mdns_domain domain1, domain2;
|
struct mdns_domain domain1, domain2;
|
||||||
err_t res;
|
err_t res;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
memset(&domain1, 0, sizeof(domain1));
|
memset(&domain1, 0, sizeof(domain1));
|
||||||
res = mdns_domain_add_label(&domain1, "multi", 5);
|
res = mdns_domain_add_label(&domain1, "multi", 5);
|
||||||
@ -492,6 +511,7 @@ START_TEST(domain_eq_case)
|
|||||||
{
|
{
|
||||||
struct mdns_domain domain1, domain2;
|
struct mdns_domain domain1, domain2;
|
||||||
err_t res;
|
err_t res;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
memset(&domain1, 0, sizeof(domain1));
|
memset(&domain1, 0, sizeof(domain1));
|
||||||
res = mdns_domain_add_label(&domain1, "multi", 5);
|
res = mdns_domain_add_label(&domain1, "multi", 5);
|
||||||
@ -519,6 +539,7 @@ START_TEST(domain_eq_anydata)
|
|||||||
static const u8_t data2[] = { 0x7f, 0x8c, 0x01, 0xff, 0xcf };
|
static const u8_t data2[] = { 0x7f, 0x8c, 0x01, 0xff, 0xcf };
|
||||||
struct mdns_domain domain1, domain2;
|
struct mdns_domain domain1, domain2;
|
||||||
err_t res;
|
err_t res;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
memset(&domain1, 0, sizeof(domain1));
|
memset(&domain1, 0, sizeof(domain1));
|
||||||
res = mdns_domain_add_label(&domain1, (const char*)data1, sizeof(data1));
|
res = mdns_domain_add_label(&domain1, (const char*)data1, sizeof(data1));
|
||||||
@ -548,6 +569,7 @@ START_TEST(domain_eq_length)
|
|||||||
{
|
{
|
||||||
struct mdns_domain domain1, domain2;
|
struct mdns_domain domain1, domain2;
|
||||||
err_t res;
|
err_t res;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
memset(&domain1, 0, sizeof(domain1));
|
memset(&domain1, 0, sizeof(domain1));
|
||||||
memset(domain1.name, 0xAA, sizeof(MDNS_DOMAIN_MAXLEN));
|
memset(domain1.name, 0xAA, sizeof(MDNS_DOMAIN_MAXLEN));
|
||||||
@ -578,6 +600,7 @@ START_TEST(compress_full_match)
|
|||||||
u16_t offset;
|
u16_t offset;
|
||||||
u16_t length;
|
u16_t length;
|
||||||
err_t res;
|
err_t res;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
||||||
p->payload = (void *)(size_t)data;
|
p->payload = (void *)(size_t)data;
|
||||||
@ -612,6 +635,7 @@ START_TEST(compress_full_match_subset)
|
|||||||
u16_t offset;
|
u16_t offset;
|
||||||
u16_t length;
|
u16_t length;
|
||||||
err_t res;
|
err_t res;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
||||||
p->payload = (void *)(size_t)data;
|
p->payload = (void *)(size_t)data;
|
||||||
@ -641,13 +665,14 @@ START_TEST(compress_full_match_jump)
|
|||||||
/* 0x00 */ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
|
/* 0x00 */ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
|
||||||
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
||||||
/* 0x10 */ 0x04, 'l', 'w', 'i', 'p', 0x05, 'l', 'o', 'c', 'a', 'l', 0x00, 0xc0, 0x00, 0x02, 0x00,
|
/* 0x10 */ 0x04, 'l', 'w', 'i', 'p', 0x05, 'l', 'o', 'c', 'a', 'l', 0x00, 0xc0, 0x00, 0x02, 0x00,
|
||||||
/* 0x20 */ 0x06, 'f', 'o', 'o', 'b', 'a', 'r', 0xc0, 0x15,
|
/* 0x20 */ 0x06, 'f', 'o', 'o', 'b', 'a', 'r', 0xc0, 0x15
|
||||||
};
|
};
|
||||||
struct pbuf *p;
|
struct pbuf *p;
|
||||||
struct mdns_domain domain;
|
struct mdns_domain domain;
|
||||||
u16_t offset;
|
u16_t offset;
|
||||||
u16_t length;
|
u16_t length;
|
||||||
err_t res;
|
err_t res;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
||||||
p->payload = (void *)(size_t)data;
|
p->payload = (void *)(size_t)data;
|
||||||
@ -682,6 +707,7 @@ START_TEST(compress_no_match)
|
|||||||
u16_t offset;
|
u16_t offset;
|
||||||
u16_t length;
|
u16_t length;
|
||||||
err_t res;
|
err_t res;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
||||||
p->payload = (void *)(size_t)data;
|
p->payload = (void *)(size_t)data;
|
||||||
@ -715,6 +741,7 @@ START_TEST(compress_2nd_label)
|
|||||||
u16_t offset;
|
u16_t offset;
|
||||||
u16_t length;
|
u16_t length;
|
||||||
err_t res;
|
err_t res;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
||||||
p->payload = (void *)(size_t)data;
|
p->payload = (void *)(size_t)data;
|
||||||
@ -749,6 +776,7 @@ START_TEST(compress_2nd_label_short)
|
|||||||
u16_t offset;
|
u16_t offset;
|
||||||
u16_t length;
|
u16_t length;
|
||||||
err_t res;
|
err_t res;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
||||||
p->payload = (void *)(size_t)data;
|
p->payload = (void *)(size_t)data;
|
||||||
@ -778,13 +806,14 @@ START_TEST(compress_jump_to_jump)
|
|||||||
/* 0x00 */ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
|
/* 0x00 */ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
|
||||||
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
||||||
/* 0x10 */ 0x04, 'l', 'w', 'i', 'p', 0x05, 'l', 'o', 'c', 'a', 'l', 0x00, 0xc0, 0x00, 0x02, 0x00,
|
/* 0x10 */ 0x04, 'l', 'w', 'i', 'p', 0x05, 'l', 'o', 'c', 'a', 'l', 0x00, 0xc0, 0x00, 0x02, 0x00,
|
||||||
/* 0x20 */ 0x07, 'b', 'a', 'n', 'a', 'n', 'a', 's', 0xc0, 0x15,
|
/* 0x20 */ 0x07, 'b', 'a', 'n', 'a', 'n', 'a', 's', 0xc0, 0x15
|
||||||
};
|
};
|
||||||
struct pbuf *p;
|
struct pbuf *p;
|
||||||
struct mdns_domain domain;
|
struct mdns_domain domain;
|
||||||
u16_t offset;
|
u16_t offset;
|
||||||
u16_t length;
|
u16_t length;
|
||||||
err_t res;
|
err_t res;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
||||||
p->payload = (void *)(size_t)data;
|
p->payload = (void *)(size_t)data;
|
||||||
@ -824,6 +853,7 @@ START_TEST(compress_long_match)
|
|||||||
u16_t offset;
|
u16_t offset;
|
||||||
u16_t length;
|
u16_t length;
|
||||||
err_t res;
|
err_t res;
|
||||||
|
LWIP_UNUSED_ARG(_i);
|
||||||
|
|
||||||
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
p = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_ROM);
|
||||||
p->payload = (void *)(size_t)data;
|
p->payload = (void *)(size_t)data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user