lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Displaying the DHCP assigned IP address (lwip on


From: Chris Hiszpanski
Subject: Re: [lwip-users] Displaying the DHCP assigned IP address (lwip on
Date: Fri, 05 Aug 2005 04:00:42 +0000

The . operator in C is used to access fields of a struct directly. For example:

struct netif myNetif;
variable = netif.ip_addr;

the -> operator in C is used to access fields of a struct via a pointer to the struct. For example:

struct netif *myNetif;
variable = netif -> ip_addr;

Try declaring ``struct netif *netif'' instead of ``struct netif netif''.

Cheers,
Chris

When I try: netif->ip_addr.addr I get the following error:
error: invalid type argument of `->'

I've declared netif like this: struct netif netif;

I'm a bit of a novice when it comes to pointers, whenever I think I understand
them, they stop working!

I'm also not sure how to check the dhcp state...

Thanks,

Aidan

On Tue Aug  2 16:53 , Jim Gibbons <address@hidden> sent:

>
>
>
>
>
>
>I'm getting it from netif->ip_addr.addr.  It's important to wait
>until DHCP reaches the BOUND state.
>
>
>
>Lists wrote:
>
> This is probably a really basic request, but can anybody please tell me what >variable the dhcp assigned IP address is stored in and how to display it? I've >tried netif.ip_addr, but with no luck. It's just one of those things that should
>be really easy, but is really bogging me down.
>
>Thanks, Aidan
>
>
>_______________________________________________
>lwip-users mailing list
>address@hidden
>http://lists.nongnu.org/mailman/listinfo/lwip-users
>
>
>
>
>--
>
>E-mail signature
>
>
>
>
>      Jim Gibbons
>
>
>      address@hidden
>
>
>
>
>      Gibbons and Associates, Inc.
>
>
>      TEL: (408) 984-1441
>
>
>
>
>      900 Lafayette, Suite 704, Santa Clara, CA
>
>
>      FAX: (408) 247-6395
>
>
>
>
>
>
>
>
>
>
>
>



_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/





reply via email to

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