ARP or ICMP

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

ARP or ICMP

887件の閲覧回数
profprogrammer
Contributor III

Hi

 

I used lwip with KSDK.

Prompt please, whether there is an example of use of ARP or icmp for interaction with the computer?

ラベル(1)
0 件の賞賛
返信
1 返信

774件の閲覧回数
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

I do a search from Internet and found below example how to get required IP's MAC address:

struct ip_addr IPA;

LwIP_Init();

IP4_ADDR(&IPA, 192, 168, 1, 103);

Delay(100);

  while (1)

{

     if(etharp_output(&netif,NULL,&IPA)==0)

                {       

                        GPIO_ResetBits(GPIOD,GPIO_Pin_5);

          

                }

}

After initialization, just call etharp_output(&netif,NULL,&IPA);

Then IPA will be the required MAC address.

Wish it helps.


Have a great day,
Ma Hui

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信