code: def read_udp(self, length):
          
          if length is None:
              length = len(self)
  
          _srcp = self._read_unpack(2)
          _dstp = self._read_unpack(2)
          _tlen = self._read_unpack(2)
          _csum = self._read_fileng(2)
  
          udp = dict(
              srcport=_srcp,
              dstport=_dstp,
              len=_tlen,
              checksum=_csum,
          )
  
          length = udp['len'] - 8
          udp['packet'] = self._read_packet(header=8, payload=length)
  
          return self._decode_next_layer(udp, None, length)
docs: Read User Datagram Protocol (UDP).
  
          Structure of UDP header [RFC 768]:
               0      7 8     15 16    23 24    31
              +--------+--------+--------+--------+
              |     Source      |   Destination   |
              |      Port       |      Port       |
              +--------+--------+--------+--------+
              |                 |                 |
              |     Length      |    Checksum     |
              +--------+--------+--------+--------+
              |
              |          data octets ...
              +---------------- ...
  
              Octets      Bits        Name                    Description
                0           0     udp.srcport             Source Port
                2          16     udp.dstport             Destination Port
                4          32     udp.len                 Length (header includes)
                6          48     udp.checksum            Checksum