lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] lwip 2.0.0 ping issue via IPv6 on stm32


From: Meera
Subject: Re: [lwip-users] lwip 2.0.0 ping issue via IPv6 on stm32
Date: Mon, 20 Nov 2017 23:10:21 -0700 (MST)

See I have done static ip configuration below
 tcpip_init( NULL, NULL );

  ipaddr.addr = 0;
  netmask.addr = 0;
  gw.addr = 0;

  /* add the network interface */
  netif_add(&gnetif, &ipaddr, &netmask, &gw, &gnetif, &ethernetif_init,
&tcpip_input);
  gnetif.hostname = "meeraa";

 //gnetif.ip6_autoconfig_enabled = 1;
//    netif_add(&gnetif, NULL, &ethernetif_init, &tcpip_input);

 /* Create IPv6 local address */
  netif_create_ip6_linklocal_address(&gnetif, 1);
  netif_ip6_addr_set_state(&gnetif, 0, IP6_ADDR_TENTATIVE);

  ip6_addr_t my_addr;

  IP6_ADDR_PART(&my_addr, 0, 0xFD, 0x1D, 0x06, 0xF6);
  IP6_ADDR_PART(&my_addr, 1, 0x25, 0x47, 0x00, 0x00);
  IP6_ADDR_PART(&my_addr, 2, 0x00, 0x00, 0x00, 0x00);
  IP6_ADDR_PART(&my_addr, 3, 0x00, 0x00, 0x00, 0x01);

  ip_addr_copy_from_ip6(gnetif.ip6_addr[1], my_addr);

  netif_ip6_addr_set_state(&gnetif, 1, IP6_ADDR_TENTATIVE);

//  gnetif.ip6_autoconfig_enabled = 1;
    gnetif.flags |= NETIF_FLAG_MLD6;
  /*  Registers the default network interface */
  netif_set_default(&gnetif);

  if (netif_is_link_up(&gnetif))
  {
    /* When the netif is fully configured this function must be called */
    netif_set_up(&gnetif);
  }
  else
  {
    /* When the netif link is down this function must be called */
       netif_set_down(&gnetif);
  }

  dhcp_start(&gnetif);


And  I am getting local link address on 0th position and static ip address
on 1st position of IPV6_addr. But  i couldn't ping on this address. please
help me out with this



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]