Reacting to an incoming ping request?

I am trying to use an incoming ping request to execute some code and am not sure where to get started.

In theory I will have an ethernet shield (+uno) connected to a private network that will execute some code when it receives an ICMP Ping echo request packet.

Is it possible/feasible to set an interrupt based on the incoming packets?
is it possible to monitor those packets?

Thank you in advance.

In theory I will have an ethernet shield (+uno) connected to a private network that will execute some code when it receives an ICMP Ping echo request packet.

Wrong hardware for the job. The WizNet5100 of the Ethernet Shield does answer ping requests in hardware, the Arduino code will never be involved.

Please explain why you want to start an action if you receive a ping request! That's an abuse of network features and you should have very good reasons if do that. I recommend strongly against that.

The interaction will be command line only and the device will be connected to an offline LAN. I have been assured that erroneous ping’s will not be an issue. However, I agree that execution on ping is a poor choice and I have counseled against it. I will push for a operation via curl to both allow the existing hardware to work and to add a layer of safety against unintended execution.

Thank you for your input.

could you send a UDP datagram to the device to wake it up?
see #12 of post