IPv6-DHCPv6 Example

Discussion to talk about software related topics only.
Post Reply
SeeCwriter
Posts: 624
Joined: Mon May 12, 2008 10:55 am

IPv6-DHCPv6 Example

Post 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=]
User avatar
Forrest
Posts: 287
Joined: Wed Apr 23, 2008 10:05 am

Re: IPv6-DHCPv6 Example

Post 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.
Forrest Stanley
Project Engineer
NetBurner, Inc

NetBurner Learn Articles: http://www.netburner.com/learn
SeeCwriter
Posts: 624
Joined: Mon May 12, 2008 10:55 am

Re: IPv6-DHCPv6 Example

Post 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?
User avatar
pbreed
Posts: 1088
Joined: Thu Apr 24, 2008 3:58 pm

Re: IPv6-DHCPv6 Example

Post by pbreed »

It means it found no V6 router.
EddieSVab
Posts: 6
Joined: Wed Jun 05, 2019 9:22 am

IPv6 DHCPv6 Example

Post 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?
Post Reply