Title: | Retrieve Network Statistics Including Available TCP Ports |
---|---|
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>. |
Authors: | Steve Condylios [aut, cre] , Bob Rudis [aut] , Patrice Kiener [aut] |
Maintainer: | Steve Condylios <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.2 |
Built: | 2024-10-31 21:07:28 UTC |
Source: | https://github.com/stevecondylios/netstat |
Retrieve a Transmission Control Protocol (TCP) port that is not currently in use
free_port(random)
free_port(random)
random |
Boolean value that defaults to FALSE |
An integer vector of length one
## Not run: free_port() free_port(random = TRUE) ## End(Not run)
## 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
free_ports()
free_ports()
An integer vector
## Not run: free_ports() ## End(Not run)
## Not run: free_ports() ## End(Not run)
Retrieve the output of the 'netstat' command line utility
netstat()
netstat()
A character vector containing the lines of the output of the netstat' command line utility
## Not run: netstat() ## End(Not run)
## Not run: netstat() ## End(Not run)
Parse the output of the 'Netstat' command line utility - obtained via netstat()
parse_netstat(netstat_output)
parse_netstat(netstat_output)
netstat_output |
The output of netstat() - i.e. a character vector comprising the output of the Netstat command line utility |
A data.frame containing the Active Internet Connections from netstat() output
## Not run: netstat_output <- netstat() (active_connections_table <- parse_netstat(netstat_output)) ## End(Not run)
## Not run: netstat_output <- netstat() (active_connections_table <- parse_netstat(netstat_output)) ## End(Not run)
Obtain the TCP ports currently in use
ports_in_use()
ports_in_use()
An integer vector of the TCP ports currently in use
## Not run: (active_ports <- ports_in_use()) ## End(Not run)
## 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)
unassigned_ports()
unassigned_ports()
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.
## Not run: unassigned_ports() ## End(Not run)
## Not run: unassigned_ports() ## End(Not run)