error while using "IP4 ADDR"

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

error while using "IP4 ADDR"

636 Views
wenya
Contributor II

The development board I use is MPC5748G.

When I use RAW API to set the local IP,like this:

IP4_ADDR(ipaddr, 192,168,0,200);
IP4_ADDR(netmask, 255, 255, 255, 0);
IP4_ADDR(gw, 192, 168, 0, 1);

there are two errors :

'struct ip_addr' has no member named 'addr'   ip4_addr.h 

invalid type argument of '->' (have 'struct ip_addr') ip4_addr.h 

Do you know how to solve it?

 

Tags (3)
0 Kudos
2 Replies

585 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

you should have rather

IP4_ADDR(&ipaddr, 192,168,0,200);
IP4_ADDR(&netmask, 255, 255, 255, 0);
IP4_ADDR(&gw, 192, 168, 0, 1);

BR, Petr

0 Kudos

550 Views
wenya
Contributor II

Thank you, I'll have a try!

0 Kudos