error while using "IP4 ADDR"

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

error while using "IP4 ADDR"

1,421件の閲覧回数
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?

 

タグ(3)
0 件の賞賛
返信
2 返答(返信)

1,370件の閲覧回数
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 件の賞賛
返信

1,335件の閲覧回数
wenya
Contributor II

Thank you, I'll have a try!

0 件の賞賛
返信