title: DHCP Client on Java, Can't send from IP 0.0.0.0
body: <p>I'm trying to create a DHCP Client using Java.
  The client will send Discover, receive a Offer, send a Request, and receive an Ack.
  However, when sending the discver and the request UDP DatagramPackets, I need to send them from the IP 0.0.0.0 port 68 because, the point of DHCP is is to receive a usable IP address from the DHCP Server.
  However, If I bind my socket to a 0.0.0.0, according to the <a href="http://download.oracle.com/javase/6/docs/api/java/net/DatagramSocket.html" rel="nofollow">http://download.oracle.com/javase/6/docs/api/java/net/DatagramSocket.html</a> Java Reference, the kernel will assign a IP address to the socket.</p>
  
  <p>If I force set the IP address of my ethernet card to 0.0.0.0 via the </p>
  
  <pre><code>$ sudo ifconfig en0 0.0.0.0  
  </code></pre>
  
  <p>and send my Packet; I receive a </p>
  
  <pre><code>java.io.IOException: Can't assign requested address
  </code></pre>
  
  <p>Exception.</p>
  
  <p>Is there a way to send UDP packets from a 0.0.0.0 and set through <code>System.exec()</code> (if required) the IP address received from the DHCP server using Java?</p>