pcap_to_json: Convert an entire PCAP file to JSON

Description Usage Arguments Value Examples

View source: R/pcap-to-json.R

Description

Convert an entire PCAP file to JSON

Usage

1
pcap_to_json(pcap, json, protos = c(), include_child_nodes = FALSE)

Arguments

pcap

path to PCAP file (path.expand() will be called on this value)

json

path (including filename) to the location where you want the JSON file stored (path.expand() will be called on this value)

protos

character vector of protocols to include. (default is all)

include_child_nodes

if protos is specified, this logical parameter (default FALSE) controls whether child nodes are included.

Value

(expanded) path to json (invisibly)

Examples

1
2
3
4
tryCatch(
  pcap_to_json(system.file("pcap", "http.pcap", package = "tsharrk"), tempfile()),
  error = function(e) message("No tshark")
)

hrbrmstr/tsharrk documentation built on Dec. 20, 2021, 4:49 p.m.