WIZnet Developer Forum

Question about the IP_RAW IPPROTO_ICMP

Hi,
I’m having a little problem.
I want to implement the InverseARP (not RARP) protocol using the W5100 chip.
So I’ve defined the socket 0 as:
IINCHIP_WRITE(Sn_MR(0),Sn_MR_IPRAW);
IINCHIP_WRITE(Sn_PROTO(0),IPPROTO_ICMP);
IINCHIP_WRITE(Sn_CR(0),Sn_CR_OPEN);
/* +20071122[chungs]:wait to process the command… */
while(IINCHIP_READ(Sn_CR(0)));

All work, but at this point I want to read the opcode and if the opcode is != from 8 (InARP) I wold like that the chip proceed the message handling by self without use my code.

How is possible to reput the messagege that I pick up from the chip in my buffer and the reput in the chip and force the automatic message elaboration?

Regards
Giuseppe

Hi,

It can you want.
Open socket as IPRAW and open normal socket one more.
Packet will be stored at each buffer. And read IPRAW buffer and if the packet is not InARP, read another RX buffer. It doesn’t have IP header.

Thanks.

Thank you for the reply.

Now I try to understand and do what you suggest.

Regards
Giuseppe

Copyright © 2017 WIZnet Co., Ltd. All Rights Reserved.