Temporarily add go-agentx (w/ fixes to lexico ordering)
This commit is contained in:
28
go-agentx/pdu/get_next.go
Normal file
28
go-agentx/pdu/get_next.go
Normal file
@ -0,0 +1,28 @@
|
||||
// Copyright 2018 The agentx authors
|
||||
// Licensed under the LGPLv3 with static-linking exception.
|
||||
// See LICENCE file for details.
|
||||
|
||||
package pdu
|
||||
|
||||
// GetNext defines the pdu get next packet.
|
||||
type GetNext struct {
|
||||
SearchRanges Ranges
|
||||
}
|
||||
|
||||
// Type returns the pdu packet type.
|
||||
func (g *GetNext) Type() Type {
|
||||
return TypeGetNext
|
||||
}
|
||||
|
||||
// MarshalBinary returns the pdu packet as a slice of bytes.
|
||||
func (g *GetNext) MarshalBinary() ([]byte, error) {
|
||||
return []byte{}, nil
|
||||
}
|
||||
|
||||
// UnmarshalBinary sets the packet structure from the provided slice of bytes.
|
||||
func (g *GetNext) UnmarshalBinary(data []byte) error {
|
||||
if err := g.SearchRanges.UnmarshalBinary(data); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
Reference in New Issue
Block a user