@staticmethod
def _apply_vpp_tcp(node):
    """
        Apply the VPP Unix config

        :param node: Node dictionary with cpuinfo.
        :type node: dict
        """
    active_open_sessions = node['tcp']['active_open_sessions']
    aos = int(active_open_sessions)
    passive_open_sessions = node['tcp']['passive_open_sessions']
    pos = int(passive_open_sessions)
    if aos + pos == 0:
        tcp = '\n'.join(['api-segment {', '  gid vpp', '}'])
        return tcp.rstrip('\n')
    tcp = '\n'.join(['# TCP stack-related configuration parameters',
        """# expecting {:d} client sessions, {:d} server sessions
""".
        format(aos, pos), 'heapsize 4g\n', 'api-segment {',
        '  global-size 2000M', '  api-size 1G', '}\n', 'session {',
        '  event-queue-length {:d}'.format(aos + pos),
        '  preallocated-sessions {:d}'.format(aos + pos),
        '  v4-session-table-buckets {:d}'.format((aos + pos) // 4),
        """  v4-session-table-memory 3g
"""])
    if aos > 0:
        tcp = tcp + '  v4-halfopen-table-buckets {:d}'.format((aos + pos) // 4
            ) + '\n'
        tcp = tcp + '  v4-halfopen-table-memory 3g\n'
        tcp = tcp + '  local-endpoints-table-buckets {:d}'.format((aos +
            pos) // 4) + '\n'
        tcp = tcp + '  local-endpoints-table-memory 3g\n'
    tcp = tcp + '}\n\n'
    tcp = tcp + 'tcp {\n'
    tcp = tcp + '  preallocated-connections {:d}'.format(aos + pos) + '\n'
    if aos > 0:
        tcp = tcp + '  preallocated-half-open-connections {:d}'.format(aos
            ) + '\n'
    tcp = tcp + '}\n\n'
    return tcp.rstrip('\n')
