The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Virani::Client - Client for remotely accessing Virani vis HTTP or HTTPS.

VERSION

Version 0.0.1

SYNOPSIS

Quick summary of what the module does.

Perhaps a little code snippet.

    use Virani::Client;

    my $virani_client = Virani::Client->new(url=>$url);

METHODS

new

Initiates the object.

    - url :: The URL to use to contact mojo-virani by.
        Default :: undef

    - apikey :: The API key if needed.
        Default :: undef

    - timeout :: Timeout for fetching it in seconds.
        Default :: 60

    - verify_hostname :: Check the cert if using HTTPS.
        Default :: 1

Of the above keys, only 'url' is a requirement.

If verify_hostname is undef, the following enviromental variables are checked in the following order.

    VIRANI_VERIFY_HOSTNAME
    HTTPS_VERIFY_HOSTNAME
    PERL_LWP_VERIFY_HOSTNAME

fetch

Reaches out via HTTP or HTTPS and fetches the PCAP and JSON metadata.

    - start :: A L<Time::Piece> object of when to start looking.
        - Default :: undef

    - end :: A L<Time::Piece> object of when to stop looking.
        - Default :: undef

    - filter :: The BPF or tshark filter to use.
        - Default :: undef

    - set :: The PCAP set to use. Will use what ever the default is set to if undef or blank.
        - Default :: undef

    - file :: The file to output to. The metadata writen to a file of the same name
              with '.json' appended.
        - Default :: out.pcap

    - type :: 'tcpdump', 'bpf2tshark', or 'tshark', depending on what one wants the filter todo.
              If not set, the remote system uses what ever is defined as the default for that set.
        - Default :: undef

The following are required

    start
    end
    filter

IF the command success the raw unparsed JSON of the metadata is returned.

    my $raw_metadata_json=$virani_client->(start=>$start, end=>$end, filter=>$filter);

AUTHOR

Zane C. Bowers-Hadley, <vvelox at vvelox.net>

BUGS

Please report any bugs or feature requests to bug-virani at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Virani. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Virani::Client

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

This software is Copyright (c) 2023 by Zane C. Bowers-Hadley.

This is free software, licensed under:

  The GNU Lesser General Public License, Version 2.1, February 1999