ARP or ICMP

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

ARP or ICMP

418 Views
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?

Labels (1)
0 Kudos
1 Reply

305 Views
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 Kudos