autoip_remove_struct()

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

autoip_remove_struct()

Amena El Homsi
Hello,

I set autoip struct using autoip_set_struct(). However, when I call autoip_remove_struct()  I got a compilation error:
error: no member named 'autoip' in 'struct netif'

Why dhcp_remove_struct() is expanded to: netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, NULL)
and autoip_remove_struct is expanded to: do { (netif)->autoip = NULL; } while (0)
?

--

Amena El-Homsi
Computer & Communication Engineer
Dipl. Eng,  M.S.

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: autoip_remove_struct()

Dirk Ziegelmeier-2
thats a bug, a correct function would be

/**
 * @ingroup autoip
 * Remove a struct autoip previously set to the netif using autoip_set_struct()
 *
 * @param netif the netif for which to set the struct autoip
 */
void
autoip_remove_struct(struct netif *netif)
{
  LWIP_ASSERT_CORE_LOCKED();
  LWIP_ASSERT("netif != NULL", netif != NULL);
  LWIP_ASSERT("netif has no struct autoip set",
              netif_autoip_data(netif) != NULL);

  netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_AUTOIP, NULL);
}


Ciao
Dirk


On Wed, Nov 20, 2019 at 9:26 AM Amena El Homsi <[hidden email]> wrote:
Hello,

I set autoip struct using autoip_set_struct(). However, when I call autoip_remove_struct()  I got a compilation error:
error: no member named 'autoip' in 'struct netif'

Why dhcp_remove_struct() is expanded to: netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, NULL)
and autoip_remove_struct is expanded to: do { (netif)->autoip = NULL; } while (0)
?

--

Amena El-Homsi
Computer & Communication Engineer
Dipl. Eng,  M.S.
_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: autoip_remove_struct()

Amena El Homsi
Thanks.. Is there a new lwip version that fixes this bug?

On Wed, Nov 20, 2019 at 10:33 AM Dirk Ziegelmeier <[hidden email]> wrote:
thats a bug, a correct function would be

/**
 * @ingroup autoip
 * Remove a struct autoip previously set to the netif using autoip_set_struct()
 *
 * @param netif the netif for which to set the struct autoip
 */
void
autoip_remove_struct(struct netif *netif)
{
  LWIP_ASSERT_CORE_LOCKED();
  LWIP_ASSERT("netif != NULL", netif != NULL);
  LWIP_ASSERT("netif has no struct autoip set",
              netif_autoip_data(netif) != NULL);

  netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_AUTOIP, NULL);
}


Ciao
Dirk


On Wed, Nov 20, 2019 at 9:26 AM Amena El Homsi <[hidden email]> wrote:
Hello,

I set autoip struct using autoip_set_struct(). However, when I call autoip_remove_struct()  I got a compilation error:
error: no member named 'autoip' in 'struct netif'

Why dhcp_remove_struct() is expanded to: netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, NULL)
and autoip_remove_struct is expanded to: do { (netif)->autoip = NULL; } while (0)
?

--

Amena El-Homsi
Computer & Communication Engineer
Dipl. Eng,  M.S.
_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users


--

Amena El-Homsi
Computer & Communication Engineer
Dipl. Eng,  M.S.

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: autoip_remove_struct()

Dirk Ziegelmeier-2
no

Ciao
Dirk


On Wed, Nov 20, 2019 at 9:41 AM Amena El Homsi <[hidden email]> wrote:
Thanks.. Is there a new lwip version that fixes this bug?

On Wed, Nov 20, 2019 at 10:33 AM Dirk Ziegelmeier <[hidden email]> wrote:
thats a bug, a correct function would be

/**
 * @ingroup autoip
 * Remove a struct autoip previously set to the netif using autoip_set_struct()
 *
 * @param netif the netif for which to set the struct autoip
 */
void
autoip_remove_struct(struct netif *netif)
{
  LWIP_ASSERT_CORE_LOCKED();
  LWIP_ASSERT("netif != NULL", netif != NULL);
  LWIP_ASSERT("netif has no struct autoip set",
              netif_autoip_data(netif) != NULL);

  netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_AUTOIP, NULL);
}


Ciao
Dirk


On Wed, Nov 20, 2019 at 9:26 AM Amena El Homsi <[hidden email]> wrote:
Hello,

I set autoip struct using autoip_set_struct(). However, when I call autoip_remove_struct()  I got a compilation error:
error: no member named 'autoip' in 'struct netif'

Why dhcp_remove_struct() is expanded to: netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, NULL)
and autoip_remove_struct is expanded to: do { (netif)->autoip = NULL; } while (0)
?

--

Amena El-Homsi
Computer & Communication Engineer
Dipl. Eng,  M.S.
_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users


--

Amena El-Homsi
Computer & Communication Engineer
Dipl. Eng,  M.S.
_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: autoip_remove_struct()

goldsimon@gmx.de
Am 20.11.2019 um 09:41 schrieb Dirk Ziegelmeier:
> no

I've just pushed a fix.

Regards,
Simon

>
> Ciao
> Dirk
>
>
> On Wed, Nov 20, 2019 at 9:41 AM Amena El Homsi <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Thanks.. Is there a new lwip version that fixes this bug?
>
>     On Wed, Nov 20, 2019 at 10:33 AM Dirk Ziegelmeier
>     <[hidden email] <mailto:[hidden email]>> wrote:
>
>         thats a bug, a correct function would be
>
>         /**
>           * @ingroup autoip
>           * Remove a struct autoip previously set to the netif using
>         autoip_set_struct()
>           *
>           * @param netif the netif for which to set the struct autoip
>           */
>         void
>         autoip_remove_struct(struct netif *netif)
>         {
>            LWIP_ASSERT_CORE_LOCKED();
>            LWIP_ASSERT("netif != NULL", netif != NULL);
>            LWIP_ASSERT("netif has no struct autoip set",
>                        netif_autoip_data(netif) != NULL);
>
>            netif_set_client_data(netif,
>         LWIP_NETIF_CLIENT_DATA_INDEX_AUTOIP, NULL);
>         }
>
>
>         Ciao
>         Dirk
>
>
>         On Wed, Nov 20, 2019 at 9:26 AM Amena El Homsi
>         <[hidden email] <mailto:[hidden email]>> wrote:
>
>             Hello,
>
>             I set autoip struct using autoip_set_struct(). However, when
>             I call autoip_remove_struct()  I got a compilation error:
>             error: no member named 'autoip' in 'struct netif'
>
>             Why dhcp_remove_struct() is expanded
>             to: netif_set_client_data(netif,
>             LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, NULL)
>             and autoip_remove_struct is expanded to: do {
>             (netif)->autoip = NULL; } while (0)
>             ?
>
>             --
>
>             Amena El-Homsi
>             Computer & Communication Engineer
>             Dipl. Eng,  M.S.
>             _______________________________________________
>             lwip-users mailing list
>             [hidden email] <mailto:[hidden email]>
>             https://lists.nongnu.org/mailman/listinfo/lwip-users
>
>         _______________________________________________
>         lwip-users mailing list
>         [hidden email] <mailto:[hidden email]>
>         https://lists.nongnu.org/mailman/listinfo/lwip-users
>
>
>
>     --
>
>     Amena El-Homsi
>     Computer & Communication Engineer
>     Dipl. Eng,  M.S.
>     _______________________________________________
>     lwip-users mailing list
>     [hidden email] <mailto:[hidden email]>
>     https://lists.nongnu.org/mailman/listinfo/lwip-users
>
>
> _______________________________________________
> lwip-users mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/lwip-users
>


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users