File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Sockets and Internet Protocols and the fly likes basic program to generate packet (help) Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "basic program to generate packet (help)" Watch "basic program to generate packet (help)" New topic
Author

basic program to generate packet (help)

mark stone
Ranch Hand

Joined: Dec 18, 2001
Posts: 417
please help me get started on the following.
a simple program that can generate packets destined to a IP_address : PORT.
a program that can generate and send icmp packets to a given IP_address.
any good websites or resources etc.....
thanks

[ January 11, 2002: Message edited by: mark stone ]
mark stone
Ranch Hand

Joined: Dec 18, 2001
Posts: 417
REPOSTING..........................

Originally posted by mark stone:
please help me get started on the following.
a simple program that can generate packets destined to a IP_address : PORT.
a program that can generate and send icmp packets to a given IP_address.
any good websites or resources etc.....
thanks

[ January 11, 2002: Message edited by: mark stone ]
mark stone
Ranch Hand

Joined: Dec 18, 2001
Posts: 417
reposting
Originally posted by mark stone:
please help me get started on the following.
a simple program that can generate packets destined to a IP_address : PORT.
a program that can generate and send icmp packets to a given IP_address.
any good websites or resources etc.....
thanks

[ January 11, 2002: Message edited by: mark stone ]
mark stone
Ranch Hand

Joined: Dec 18, 2001
Posts: 417
reposting. no replies yet ? why ?
Originally posted by mark stone:
please help me get started on the following.
a simple program that can generate packets destined to a IP_address : PORT.
a program that can generate and send icmp packets to a given IP_address.
any good websites or resources etc.....
thanks

[ January 11, 2002: Message edited by: mark stone ]
Zakaria Haque
Ranch Hand

Joined: Jan 02, 2002
Posts: 60
with pure java you can not go below tcp and udp. for icmp you need to use JNI. There should be some class libraries that already provides such functionality(I saw something similar, but fotgot where ), do a search from google.
Hope it helps.


tobe bondhu nouka bherao<br />shonabo gaan aj shara raat
Laudney Ren
Ranch Hand

Joined: Jan 06, 2002
Posts: 111
When connect to a remote IP address and port, use socket's connect(). Then call socket's getOutputStream and write to the outputstream.
More details on APIs.


" Veni, vidi, vici "<br />" I came, I saw, I conquered "
 
 
subject: basic program to generate packet (help)
 
Threads others viewed
VNC Client
How to detect or identify Bad packets in java
Embedding Jython in JAVA Application
MVC pattern problem
How to access 2 different weblogic applications running on different ports thru IIS.
IntelliJ Java IDE