File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Attach to a ethernet interface usingip 0.0.0.0 using datagram socket

 
Tarun Jain
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I need to connect to a network interface eg. eth1 using source ip 0.0.0.0.
I need this ip as i am trying to send a DHCP discover packet from this interface.
But i am not able to connect to this interface when ip is not provided while creating DatagramSocket.
Packet is always send using default interface like eth0(and source ip changes to ip of this interface).
I checked this online but the solution provided is not working correctly and i am not able to figure out why.
Kindly help me regarding this.

Thanks
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So you're trying to spoof the source IP? Please tell us what you're trying to achieve by doing that.
 
Tarun Jain
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am making a simulator which simulates a vm on a server without actually launching a VM.
I need to give IP to this VM. So i am trying to send DHCP request using my main server on behalf of this VM and store the received IP for furthur processing in my DB.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic