(pkt)
return values
Startup packets contain a set of
       keys and values. Return an array
       of key/value/key/value/etc..
Startup packets contain a set of
       keys and values. Return an array
       of key/value/key/value/etc..
Startup packets contain a set of keys and values . Return an array of key / value / key / value / etc ..
def parse_startup(pkt):
    """Startup packets contain a set of
       keys and values. Return an array
       of key/value/key/value/etc..
    """
    values = []
    plen = endian_int(pkt[0:4])
    pkt = pkt[8:]

    tmp = ''
    for i in xrange(plen - 8):
        tmp += pkt[i].decode('hex')
        if pkt[i] == '00':
            values.append(tmp)
            tmp = ''
    return values
def parse_startup ( pkt ) : values = [ ] plen = endian_int ( pkt [ 0 : 4 ] ) pkt = pkt [ 8 : ] tmp = '' for i in xrange ( plen - 8 ) : tmp += pkt [ i ] . decode ( 'hex' ) if pkt [ i ] == '00' : values . append ( tmp ) tmp = '' return values