Reputation: 899
Is there a way to connect to a network interface on the computer in Java? That would allow you to design your own ipv4 packet in form of byte[]
.
I am trying to learn networking from the ground up, and it would help if I could test my own packet design.
I know this might be too much to explain on Stack Overflow, but anything that could get me on the right path is appreciated. Even if you only have a class or a word I could Google.
Upvotes: 1
Views: 194
Reputation: 3397
You are looking for raw sockets, and no, I there is no direct support in Java for it.
There is https://www.savarese.com/software/rocksaw/, which provides raw sockets in Java.
But maybe you should try Python for this kind of low-level network programming, it is IMHO better suited for your task.
Upvotes: 1