Page 1 of 1

IPv6-DHCPv6 Example

Posted: Tue Mar 20, 2018 9:32 am
by SeeCwriter
Using v2.8.6, when I build the IPv6-DHCPv6 example program I get the compiler warnings below.

Code: Select all

..\ip_util.cpp: In function 'void showLeaseInfo(IPV6_PREFIX*)':
..\ip_util.cpp:163:61: warning: unknown conversion type character 0xd in format [-Wformat=]
     iprintf("  Server: %I\r\n", pPrefix->pDHCPD->m_IPAddress);
                                                             ^
..\ip_util.cpp:163:61: warning: too many arguments for format [-Wformat-extra-args]
..\ip_util.cpp: In function 'void showIpAddresses()':
..\ip_util.cpp:183:53: warning: unknown conversion type character 'I' in format [-Wformat=]
         iprintf("IP:      %HI\r\n", InterfaceIP(ifn));
                                                     ^
..\ip_util.cpp:183:53: warning: too many arguments for format [-Wformat-extra-args]
..\ip_util.cpp:184:55: warning: unknown conversion type character 'I' in format [-Wformat=]
         iprintf("Mask:    %HI\r\n", InterfaceMASK(ifn));
                                                       ^
..\ip_util.cpp:184:55: warning: too many arguments for format [-Wformat-extra-args]
..\ip_util.cpp:185:54: warning: unknown conversion type character 'I' in format [-Wformat=]
         iprintf("DNS:     %HI\r\n", InterfaceDNS(ifn));
                                                      ^
..\ip_util.cpp:185:54: warning: too many arguments for format [-Wformat-extra-args]
..\ip_util.cpp:186:55: warning: unknown conversion type character 'I' in format [-Wformat=]
         iprintf("Gateway: %HI\r\n", InterfaceGate(ifn));
                                                       ^
..\ip_util.cpp:186:55: warning: too many arguments for format [-Wformat-extra-args]
..\ip_util.cpp:213:104: warning: repeated ' ' flag in format [-Wformat=]
                 iprintf("  %I - Source: %s\r\n", pDNS->m_IPAddress, (pDNS->pRouter) ? "Router" : "DHCP");
                                                                                                        ^
..\ip_util.cpp:213:104: warning: 'I' flag used with '%S' gnu_printf format [-Wformat=]
..\ip_util.cpp:213:104: warning: ' ' flag used with '%S' gnu_printf format [-Wformat=]
..\ip_util.cpp:213:104: warning: format '%S' expects argument of type 'wchar_t*', but argument 2 has type 'IPADDR6*' [-Wformat=]

Re: IPv6-DHCPv6 Example

Posted: Wed Mar 21, 2018 11:04 am
by Forrest
These warnings are the unfortunate result of us adding the custom printf flag '%I" to print an IP address object. We are looking in to how to remove the warning next time we build gcc, but for now, its safe to ignore.

Re: IPv6-DHCPv6 Example

Posted: Fri Dec 14, 2018 12:04 pm
by SeeCwriter
Using v2.8.7, I built this example and ran it on a MOD5441X. It displays the normal IPv4 information received via DHCP, and the link-local IPv6 address. Since the example is named DHCPv6, I expected to see a routable IPv6 address displayed. Since it didn't, does that mean no DHCP request was made, or that the server doesn't support DHCPv6?

Re: IPv6-DHCPv6 Example

Posted: Sun Dec 16, 2018 11:45 pm
by pbreed
It means it found no V6 router.

IPv6 DHCPv6 Example

Posted: Sat Jun 08, 2019 3:30 pm
by EddieSVab
This example should work in vs3emu? Its very simple, but it does not work. How does the cleaning receiver buffer and UART_ST_RXFULL?