'The other side is sending us exteneded data.  Payload::
uint32  local channel number
uint32  type code
string  data
Check to make sure the other side hasn\'t sent too much data (more
than what\'s in the window, or than the maximum packet size).  If
they have, close the channel.  Otherwise, decrease the available
window and pass the data and type code to the channel\'s
extReceived().'

def ssh_CHANNEL_EXTENDED_DATA(self, packet):

    (localChannel, typeCode, dataLength) = struct.unpack('>3L', packet[:12])
    channel = self.channels[localChannel]
    if ((dataLength > channel.localWindowLeft) or (dataLength > channel.localMaxPacket)):
        log.callWithLogger(channel, log.msg, 'too    much    extdata')
        self.sendClose(channel)
        return
    data = common.getNS(packet[8:])[0]
    channel.localWindowLeft -= dataLength
    if (channel.localWindowLeft < (channel.localWindowSize // 2)):
        self.adjustWindow(channel, (channel.localWindowSize - channel.localWindowLeft))
    log.callWithLogger(channel, channel.extReceived, typeCode, data)
