<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def active_tcp():
    '''
    Return a dict describing all active tcp connections as quickly as possible
    '''
    ret = {}
    for statf in ['/proc/net/tcp', '/proc/net/tcp6']:
        if os.path.isfile(statf):
            with salt.utils.files.fopen(statf, 'rb') as fp_:
                for line in fp_:
                    line = salt.utils.stringutils.to_unicode(line)
                    if line.strip().startswith('sl'):
                        continue
                    iret = _parse_tcp_line(line)
                    sl = next(iter(iret))
                    if iret[sl]['state'] == 1:  # 1 is ESTABLISHED
                        del iret[sl]['state']
                        ret[len(ret)] = iret[sl]
    return ret