made use of the new link-local address api in ds6
This commit is contained in:
parent
adb00ed932
commit
50cca91d93
|
@ -26,7 +26,7 @@
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* @(#)$Id: contiki-sky-main.c,v 1.82 2010/05/03 13:55:26 nifi Exp $
|
* @(#)$Id: contiki-sky-main.c,v 1.83 2010/05/09 17:53:31 joxe Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
@ -301,19 +301,14 @@ main(int argc, char **argv)
|
||||||
|
|
||||||
printf("Tentative link-local IPv6 address ");
|
printf("Tentative link-local IPv6 address ");
|
||||||
{
|
{
|
||||||
int i, a;
|
uip_ds6_addr_t *lladdr;
|
||||||
for(a = 0; a < UIP_DS6_ADDR_NB; a++) {
|
int i;
|
||||||
if(uip_ds6_if.addr_list[a].isused) {
|
lladdr = uip_ds6_get_link_local(-1);
|
||||||
for(i = 0; i < 7; ++i) {
|
for(i = 0; i < 7; ++i) {
|
||||||
printf("%02x%02x:",
|
printf("%02x%02x:", lladdr->ipaddr.u8[i * 2],
|
||||||
uip_ds6_if.addr_list[a].ipaddr.u8[i * 2],
|
lladdr->ipaddr.u8[i * 2 + 1]);
|
||||||
uip_ds6_if.addr_list[a].ipaddr.u8[i * 2 + 1]);
|
|
||||||
}
|
|
||||||
printf("%02x%02x\n",
|
|
||||||
uip_ds6_if.addr_list[a].ipaddr.u8[14],
|
|
||||||
uip_ds6_if.addr_list[a].ipaddr.u8[15]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
printf("%02x%02x\n", lladdr->ipaddr.u8[14], lladdr->ipaddr.u8[15]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(1) {
|
if(1) {
|
||||||
|
|
Loading…
Reference in a new issue