Documentation ¶
Overview ¶
Copyright 2020 The Prometheus Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. FROM: https://github.com/prometheus/procfs/blob/master/net_ip_socket.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAvailableBytes ¶
Under linux FIONREAD returns the size of the waiting datagram if one exists and not the total available bytes See: https://manpages.debian.org/bullseye/manpages/udp.7.en.html#FIONREAD Sadly the only way to get the available bytes under linux is through proc/udp
Types ¶
type NetIPSocket ¶
type NetIPSocket []*netIPSocketLine
NetIPSocket represents the contents of /proc/net/{t,u}dp{,6} file without the header.
func NewNetIPSocket ¶
func NewNetIPSocket(file string) (NetIPSocket, error)