SCNetworkConnectionCopyStatistics(_:)
Returns the statistics of the specified connection.
Declaration
func SCNetworkConnectionCopyStatistics(_ connection: SCNetworkConnection) -> CFDictionary?Parameters
- connection:
The network connection.
Return Value
The statistics dictionary, or NULL if an error occurred (use the SCError() function to retrieve the specific error).
Discussion
A statistics dictionary contains specific dictionaries with statistics for each subcomponent of the service. For example, a statistics dictionary for PPP contains the following sub-dictionaries, keys, and values:
Sub-dictionary | Key | Value |
|---|---|---|
PPP |
| The number of bytes going up into the network stack for any networking protocol without the PPP headers and trailers. |
PPP |
| The number of bytes coming out of the network stack for any networking protocol without the PPP headers and trailers. |
PPP |
| The number of packets going up into the network stack for any networking protocol without the PPP headers and trailers. |
PPP |
| The number of packets coming out of the network stack for any networking protocol without the PPP headers and trailers. |
PPP |
| The number of errors going up into the network stack for any networking protocol without the PPP headers and trailers. |
PPP |
| The number of errors coming out of the network stack for any networking protocol without the PPP headers and trailers. |
See Statistics Dictionary Keys for the keys to use in the statistics dictionary.