Skip to content

Commit

Permalink
CFE-2933 The network_connections() function is only supported on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
nickanderson committed Oct 30, 2018
1 parent 26be91f commit 07f2b25
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions reference/functions/network_connections.markdown
Expand Up @@ -9,8 +9,6 @@ tags: [reference, network functions, functions, network_connections, network, co

**Description:** Return the list of current network connections.

This function looks in `/proc/net` to find the current network connections.

[%CFEngine_function_attributes(regex)%]

The returned data container has four keys:
Expand All @@ -36,13 +34,12 @@ Under each key, there's an array of connection objects that all look like this:
}
```

All the data is collected from the files `/proc/net/tcp`,
`/proc/net/tcp6`, `/proc/net/udp`, and `/proc/net/udp6`.

The address will be either IPv4 or IPv6 as appropriate. The port will
be an integer stored as a string. The state will be a string like
`UNKNOWN`.

**Note:** This function is supported on Linux.

On Linux, usually a state of `UNKNOWN` and a remote address `0.0.0.0`
or `0:0:0:0:0:0:0:0` with port `0` mean this is a listening IPv4 and
IPv6 server. In addition, usually a local address of `0.0.0.0` or
Expand All @@ -54,6 +51,9 @@ coming from the same machine.
A state of `ESTABLISHED` usually means you're looking at a live
connection.

On Linux, all the data is collected from the files `/proc/net/tcp`,
`/proc/net/tcp6`, `/proc/net/udp`, and `/proc/net/udp6`.

**Example:**

```cf3
Expand Down

0 comments on commit 07f2b25

Please sign in to comment.