Type: | Package |
Title: | Retrieve Network Statistics Including Available TCP Ports |
Version: | 0.1.2 |
Maintainer: | Steve Condylios <steve.condylios@gmail.com> |
BugReports: | https://github.com/stevecondylios/netstat/issues |
URL: | https://github.com/stevecondylios/netstat |
Description: | R interface for the 'netstat' command line utility used to retrieve and parse commonly used network statistics, including available and in-use transmission control protocol (TCP) ports. Primers offering technical background information on the 'netstat' command line utility are available in the "Linux System Administrator's Manual" by Michael Kerrisk (2014) https://man7.org/linux/man-pages/man8/netstat.8.html, and on the Microsoft website (2017) https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/netstat. |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
RoxygenNote: | 7.1.2 |
Imports: | utils |
Language: | en-US |
NeedsCompilation: | no |
Packaged: | 2022-08-28 04:05:13 UTC; st |
Author: | Steve Condylios |
Repository: | CRAN |
Date/Publication: | 2022-08-28 04:20:02 UTC |
Retrieve a Transmission Control Protocol (TCP) port that is not currently in use
Description
Retrieve a Transmission Control Protocol (TCP) port that is not currently in use
Usage
free_port(random)
Arguments
random |
Boolean value that defaults to FALSE |
Value
An integer vector of length one
Examples
## Not run:
free_port()
free_port(random = TRUE)
## End(Not run)
Retrieve many (not all) Transmission Control Protocol (TCP) ports that are not currently in use
Description
Retrieve many (not all) Transmission Control Protocol (TCP) ports that are not currently in use
Usage
free_ports()
Value
An integer vector
Examples
## Not run:
free_ports()
## End(Not run)
Retrieve the output of the 'netstat' command line utility
Description
Retrieve the output of the 'netstat' command line utility
Usage
netstat()
Value
A character vector containing the lines of the output of the netstat' command line utility
Examples
## Not run:
netstat()
## End(Not run)
Parse the output of the 'Netstat' command line utility - obtained via netstat()
Description
Parse the output of the 'Netstat' command line utility - obtained via netstat()
Usage
parse_netstat(netstat_output)
Arguments
netstat_output |
The output of netstat() - i.e. a character vector comprising the output of the Netstat command line utility |
Value
A data.frame containing the Active Internet Connections from netstat() output
Examples
## Not run:
netstat_output <- netstat()
(active_connections_table <- parse_netstat(netstat_output))
## End(Not run)
Obtain the TCP ports currently in use
Description
Obtain the TCP ports currently in use
Usage
ports_in_use()
Value
An integer vector of the TCP ports currently in use
Examples
## Not run:
(active_ports <- ports_in_use())
## End(Not run)
Obtain a list of the largest ranges of unassigned Transmission Control Protocol (TCP) ports as provided by the Internet Assigned Numbers Authority (IANA)
Description
Obtain a list of the largest ranges of unassigned Transmission Control Protocol (TCP) ports as provided by the Internet Assigned Numbers Authority (IANA)
Usage
unassigned_ports()
Value
A character vector comprising unassigned Transmission Control Protocol (TCP) ports provided by the Internet Assigned Numbers Authority (IANA). Note that not all unassigned ports will necessarily be returned.
Examples
## Not run:
unassigned_ports()
## End(Not run)