title: QUdpSocket sending malformed packets
body: <p>I am setting up a QUdpSocket broadcaster.  when I view the output in wireshark, it says my packets are malformed.  Inspecting the packets, it appears they are not emitted with an ethernet trailer.  Do I need to emit this myself, or do you see another issue?  My code below is slightly condensed.  Note that if connected via crossover cable my receiving device (micro-controller) does see and respond to the packet (as seen on wireshark).  I want to make sure I don't have malformed frames so I can use this on a switched network which allows UDP traffic.</p>
  
  <p>Thanks</p>
  
  <pre><code>const quint16 s_packetHeader = 0x5A5A;
  const quint16 s_sendReadBackRegisters = 0x0203;
  
  m_udpSocketWriter= new QUdpSocket(this);
  QByteArray datagram;
  QDataStream ds(&amp;datagram, QIODevice::WriteOnly);
  ds.setVersion(QDataStream::Qt_4_8);
  ds &lt;&lt; s_packetHeader &lt;&lt; s_sendReadBackRegisters;
  m_udpSocketWriter-&gt;writeDatagram(datagram.data(), datagram.size(), QHostAddress::Broadcast, 5000);
  </code></pre>
  
  <p>and the output from wireshark</p>
  
  <pre><code>"1243","886.645245000","172.27.1.117","255.255.255.255","UDP","46","Source port: 58411  Destination port: 5000[Malformed Packet]"
  
  0000   ff ff ff ff ff ff d4 3d 7e 31 e0 27 08 00 45 00  .......=~1.'..E.
  0010   00 20 38 6b 00 00 80 11 54 d2 ac 1b 01 75 ff ff  . 8k....T....u..
  0020   ff ff e4 2b 13 88 00 0c fe 34 5a 5a 02 03        ...+.....4ZZ..
  </code></pre>
  
  <p>Note that the last four bytes correspond to the data I sent, 5A 5A 02 03.</p>
  
  <p>According to a <a href="https://www.google.com/search?site=&amp;tbm=isch&amp;source=hp&amp;biw=1920&amp;bih=1075&amp;q=udp%20packet&amp;oq=udp%20packet&amp;gs_l=img.3..0l5j0i24l5.772.2800.0.2848.10.6.0.3.3.0.92.261.6.6.0....0...1ac.1.23.img..1.9.276.6iqvR1e90y8" rel="nofollow">google image search</a>, the packet is missing the trailer bits... although I am no network expert that is totally a guess.</p>
  
  <p>Windows 7 x64, VS2010, QT 4.8-latest x64</p>