Documentation ¶
Index ¶
- Constants
- type Packet
- func BuildPacket(version, packetType, statusCode uint16, statusLine []byte) *Packet
- func BuildPacketV2(packetType, statusCode uint16, statusLine []byte) *Packet
- func BuildPacketV4(packetType, statusCode uint16, statusLine []byte) *Packet
- func NewNrpePacket() *Packet
- func ReadNrpePacket(conn io.Reader) (*Packet, error)
Constants ¶
View Source
const ( NrpeV2MaxPacketDataLength = 1024 NrpeV2PacketLength = NrpeV2MaxPacketDataLength + 12 NrpeV2PacketVersion = 2 NrpeV3PacketVersion = 3 NrpeV4PacketVersion = 4 NrpeV4HeaderLength = 16 NrpeV4MaxPacketDataLength = 65536 // id code for a packet containing a query. NrpeQueryPacket = 1 // id code for a packet containing a response. NrpeResponsePacket = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Packet ¶
type Packet struct {
// contains filtered or unexported fields
}
Packet stores nrpe request / response packet.
func BuildPacket ¶
BuildPacket creates packet structure.
func BuildPacketV2 ¶
BuildPacketV2 creates new v2 packet structure.
func BuildPacketV4 ¶
BuildPacketV4 creates new v4 packet structure.
func NewNrpePacket ¶
func NewNrpePacket() *Packet
func ReadNrpePacket ¶
Read reads packet from the wire.
func (*Packet) BuildCRC32 ¶
BuildCRC32 returns the crc32 checksum.
Click to show internal directories.
Click to hide internal directories.