tshark

package
v0.0.0-...-7818ced Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Copyright (C) 2019-2020 TETSUHARU HANADA <rhpenguine@gmail.com> All rights reserved.

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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tshark

type Tshark struct {
	// contains filtered or unexported fields
}

func New

func New(config *TsharkConfig) *Tshark

func (*Tshark) Filter

func (tsk *Tshark) Filter(pcapName string, fields *[]string,
	filter func(indexJson, packetJson map[string]interface{}, ctx interface{}) (bool, error),
	ctx interface{}) ([]map[string]interface{}, error)

func (*Tshark) FilterImpl

func (tsk *Tshark) FilterImpl(pcapName string, fields *[]string,
	start func(ctx interface{}),
	filter func(indexJson, packetJson map[string]interface{}, ctx interface{}) (bool, error),
	end func(ctx interface{}, results *[]map[string]interface{}),
	ctx interface{}) ([]map[string]interface{}, error)

func (*Tshark) Load

func (tsk *Tshark) Load(pcapName string, fields *[]string,
	put func(indexJson, packetJson map[string]interface{}, ctx interface{}) error,
	ctx interface{}) error

func (*Tshark) LoadImpl

func (tsk *Tshark) LoadImpl(pcapName string, fields *[]string,
	start func(ctx interface{}),
	put func(indexJson, packetJson map[string]interface{}, ctx interface{}) error,
	end func(ctx interface{}),
	ctx interface{}) error

func (*Tshark) Write

func (tsk *Tshark) Write(data []byte) (int, error)

type TsharkConfig

type TsharkConfig struct {
	ExePath string
	Args    []string
	Verbose string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL