title: Difference Between Socket Types
body: <p>Yes, I did already try to find information on this.</p>
  
  <p>The Python socket documentation has this list of what I believe are protocols:</p>
  
  <pre><code>SO_*
  socket.SOMAXCONN
  MSG_*
  SOL_*
  IPPROTO_*
  IPPORT_*
  INADDR_*
  IP_*
  IPV6_*
  EAI_*
  AI_*
  NI_*
  TCP_*
  </code></pre>
  
  <p>What exactly do they do? Let's say I used</p>
  
  <pre><code>s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP)
  </code></pre>
  
  <p>What does this do? I understand it's a raw socket, but does the IPPROTO_IP mean I have to construct everything? (i.e. the IP header down to the TCP to the data?)</p>
  
  <p>The Python documentation says I can find information on the above in the Unix documentation on sockets, but I couldn't find the document. Anyone know where it is?</p>