Documentation ¶
Overview ¶
Package indexfile provides methods for querying stenotype indexes to find the blockfile positions of packets.
Index ¶
- func BlockfilePathFromIndexPath(p string) string
- func IndexPathFromBlockfilePath(p string) string
- type IndexFile
- func (i *IndexFile) Close() error
- func (i *IndexFile) Dump(out io.Writer, start, finish []byte)
- func (i *IndexFile) IPPositions(ctx context.Context, from, to net.IP) (base.Positions, error)
- func (i *IndexFile) MPLSPositions(ctx context.Context, mpls uint32) (base.Positions, error)
- func (i *IndexFile) Name() string
- func (i *IndexFile) PortPositions(ctx context.Context, port uint16) (base.Positions, error)
- func (i *IndexFile) ProtoPositions(ctx context.Context, proto byte) (base.Positions, error)
- func (i *IndexFile) VLANPositions(ctx context.Context, port uint16) (base.Positions, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlockfilePathFromIndexPath ¶
BlockfilePathFromIndexPath returns the path to a block file based on the path to an index file.
func IndexPathFromBlockfilePath ¶
IndexPathFromBlockfilePath returns the path to an index file based on the path to a block file.
Types ¶
type IndexFile ¶
type IndexFile struct {
// contains filtered or unexported fields
}
IndexFile wraps a stenotype index, allowing it to be queried.
func NewIndexFile ¶
NewIndexFile returns a new handle to the named index file.
func (*IndexFile) IPPositions ¶
IPPositions returns the positions in the block file of all packets with IPs between the given ranges. Both IPs must be 4 or 16 bytes long, both must be the same length, and from must be <= to.
func (*IndexFile) MPLSPositions ¶
MPLSPositions returns the positions in the block file of all packets with the given MPLS number.
func (*IndexFile) PortPositions ¶
PortPositions returns the positions in the block file of all packets with the give port number (TCP or UDP).
func (*IndexFile) ProtoPositions ¶
ProtoPositions returns the positions in the block file of all packets with the give IP protocol number.