trying to extract arp data using this code:

byte[] data = ((ARPPacket)((EthernetPacket)(packet.data)));

trying to extract ip data using this code:

byte[] header = ((IPPacket)((EthernetPacket)(packet.data))).header ;

im getting errors and dont know where to go from here. can somebody
please point me in the right direction.

please and thank you,
ryan