https://github.com/Enchufa2/Rtins
Tools for Reading and Parsing Network Packet Capture (PCAP) Files in R
https://github.com/Enchufa2/Rtins
networking pcap r r-package
Last synced: 3 months ago
JSON representation
Tools for Reading and Parsing Network Packet Capture (PCAP) Files in R
- Host: GitHub
- URL: https://github.com/Enchufa2/Rtins
- Owner: Enchufa2
- License: other
- Created: 2017-06-17T19:52:36.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-17T21:03:40.000Z (over 7 years ago)
- Last Synced: 2024-11-09T02:15:54.179Z (3 months ago)
- Topics: networking, pcap, r, r-package
- Language: C++
- Homepage:
- Size: 301 KB
- Stars: 4
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - Enchufa2/Rtins - Tools for Reading and Parsing Network Packet Capture (PCAP) Files in R (C++)
README
---
output: github_document
---```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```# Rtins: Tools for Reading and Parsing Network Packet Capture (PCAP) Files in R
The **Rtins** package provides tools for analysing network captures in R on top of [`libtins`](http://libtins.github.io), a high-level, multiplatform C++ network packet decoding and crafting library.
## Installation
You need to install the [`libtins`](http://libtins.github.io) library first. And as a minimum requirement, `libtins` needs the development package of `libpcap` (or `WinPcap` for Windows). On Linux,
```{bash, eval=FALSE}
# install libpcap-devel, openssl-devel is also recommended
git clone https://github.com/mfontanini/libtins.git
mkdir libtins/build
cd libtins/build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make
sudo make install
```Please, refer to the `libtins` documentation for the installation in other platforms. Then, `Rtins` can be installed using `devtools`:
```{r, eval=FALSE}
devtools::install_github("Enchufa2/Rtins")
```## Usage
```{r}
library(Rtins)fname <- system.file("pcaps/http.cap", package="Rtins")
pcap <- read_pcap(fname)
head(pcap)
summary(pcap)
head(read_pcap(fname, "udp port 53"))
```