def pcap_analysis(output_file, pretty, ip_address, pcap_path):
    """Run pcap analysis from networking module."""
    pcap = AnalyzedPcap(pcap_path)
    analyzer = NetworkAnalyzer(None, pcap.path, ip_address)
    analyzer.analyze_pcap()

    # output to proper directory
    if not output_file:
        output_file = os.path.dirname(pcap_path)

    if not output_file.endswith('/'):
        output_file += '/'

    # construct output file name
    file_name = f'network.{pcap.name}.json'
    output_file += file_name

    output = pcap.output
    output['network_analysis'] = analyzer.output

    save_output(output, output_file, pretty)
Run pcap analysis from networking module.
lisa/manage.py