Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I read and write raw ip packets from java on a mac?

What would be the easiest way to be able to send and receive raw network packets. Do I have to write my own JNI wrapping of some c API, and in that case what API am I looking for?

EDIT: I want to be able to do what wireshark does, i.e. record all incomming packets on an interface, and in addition be able to send back my own created packets. And I want to do it on a mac.

like image 540
Johan Lübcke Avatar asked Dec 29 '25 05:12

Johan Lübcke


1 Answers

If you start with the idea that you need something like a packet sniffer, you'll want to look at http://netresearch.ics.uci.edu/kfujii/jpcap/doc/.

like image 190
Joe Liversedge Avatar answered Dec 30 '25 17:12

Joe Liversedge



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!