File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Sockets and Internet Protocols and the fly likes Raw Ethernet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Raw Ethernet" Watch "Raw Ethernet" New topic

Raw Ethernet

Bob Ruth
Ranch Hand

Joined: Jun 04, 2007
Posts: 320
I did a search and didn't come up with this....

Is there a way to do raw ethernet packets from Java?

I looked through and didn't see anything that jumped out at me....

SCJP - 86% - June 11, 2009
John Melton
Ranch Hand

Joined: Aug 17, 2004
Posts: 49
Java as a language only supports well-formed UDP and TCP packets, not raw packets. Technically, you can drop down through JNI and do it in C, but it'd probably be better to do in another language.

Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

Note that Ethernet doesn't have packets, but rather "frames". IP, which sits below TCP and UDP (the protocols Java gives you access to), has packets.

[Jess in Action][AskingGoodQuestions]
I agree. Here's the link:
subject: Raw Ethernet
It's not a secret anymore!