How to send data directly on LAN

I want to write a traffic generator, but I have no idea of how to send a packet on LAN arbitrarily. That's mean I can make packet with any form which maybe is illegal and doesn't accord with any standards. Is there any class to use for this purpose. Otherwise, what can I do.

anything is helpful for me, I'll appreciate for you.

[345 byte] By [JavaBoyInCnica] at [2007-10-1 2:15:48]
# 1
Java is not appropriate for this low-level network hacking. Do it in C or C++.
BIJ001a at 2007-7-8 11:24:28 > top of Java-index,Administration Tools,Sun Connection...
# 2
nor do we help people create tools for the purpose of launching DOS or DDOS attacks...
jwentinga at 2007-7-8 11:24:28 > top of Java-index,Administration Tools,Sun Connection...