title: Writing a basic traceroute script in C
body: <p>I have to write a trceroute script but I'm not sure if my attempts are correct.</p>
  
  <p>Right now I'm doing it like that (please correct me if I'm doing wrong or clumsy):</p>
  
  <ol>
  <li>Got an struct for ip- and udpheader</li>
  <li>A checksum function</li>
  <li>Opening 2 sockets: One for sending UDP-packets in SOCK_RAW mode (to manipulate ttl) and one to receive ICMP-answers from the routers.</li>
  <li>Using sendto() to send UDP packet</li>
  <li>Having no clue how to receive and process an ICMP answer</li>
  </ol>
  
  <p>Are there any more comfortable ways to change the TTL than using sock_raw where I have to define all header stuff by myself? 
  What parameters should I use for socket() when opening ICMP sock?
  How to receive the ICMP answer?</p>