title: How do I disable UDP/IPv4 checksum generation
body: <p>I'm developing an embedded video display using WiFi video streaming. I'm close to hitting my throughput / fps target, but one bottleneck I'd like to optimize is that my microcontroller calculates checksums over every packet in software(no checksum offloading available). The video source is connected to the video sink I'm developing over WiFi so the packets are protected by a more effective 4-byte FCS(that seems to be offloaded by my radio). So, I'd like to disable UDP checksum generation, just for my video source application(not the whole OS or the network card), so that the video sink doesn't need to process it.</p>
  
  <p>On Linux, I can use the following line to disable UDP checksum generation:</p>
  
  <pre><code>sock.setsockopt(socket.SOL_SOCKET,socket.SO_NO_CHECK,1)
  </code></pre>
  
  <p>But on Windows:</p>
  
  <pre><code>Traceback (most recent call last):
    File "udpUpload.py", line 21, in &lt;module&gt;
      sock.setsockopt(socket.SOL_SOCKET,socket.SO_NO_CHECK,1)
  AttributeError: 'module' object has no attribute 'SO_NO_CHECK'
  </code></pre>
  
  <p>I get the same error if I substitute in socket.IPPROTO_UDP and socket.UDP_NOCHECKSUM, which I believe is the windows equivalent. This doesn't fail on Windows, and I can verify the UDP checksum is now marked as missing in wireshark, but it feels kinda gross:</p>
  
  <pre><code>sock.setsockopt(socket.IPPROTO_UDP, 1, 1)
  </code></pre>