Find which ip address was received from dhcp server

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

Find which ip address was received from dhcp server

ソリューションへジャンプ
1,218件の閲覧回数
jesperevertsson
Contributor IV

Hi, I'm working on a program that requires network connectivity. I can use the RTCS without problem with both a static ip and by using dhcp. The only problem I have is that I don't know how to find what ip the dhcp server gave my program. If I check the dhcp server i can find it and confirm that my device is indeed hosted on that ip, but I figured there was also a way to find the ip inside the program, I just don't know how.

ラベル(1)
タグ(2)
0 件の賞賛
返信
1 解決策
1,093件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi

I think you can try the function ifcfg_get_ip

/*FUNCTION*--------------------------------------------------------------

*

* Function Name  : ipcfg_get_ip()

* Returned Value : TRUE and IP, mask and gateway, if successful

* Comments       : Returns actual ip information from DHCP response, if any.

*

*END--------------------------------------------------------------------*/

Regards

Daniel

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,094件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi

I think you can try the function ifcfg_get_ip

/*FUNCTION*--------------------------------------------------------------

*

* Function Name  : ipcfg_get_ip()

* Returned Value : TRUE and IP, mask and gateway, if successful

* Comments       : Returns actual ip information from DHCP response, if any.

*

*END--------------------------------------------------------------------*/

Regards

Daniel

0 件の賞賛
返信
1,093件の閲覧回数
jesperevertsson
Contributor IV

Works like a charm, thanks

0 件の賞賛
返信