func (d *Decoder) DecodeAbort() error {
	if err := d.cmd.Process.Kill(); err != nil {
		log.Println("cmd.Process kill fail:", err)
		return err
	}
	return nil
}
DecodeAbort aborts the ongoing reading and kills tshark process
package goshark
import (
	"bufio"
	"bytes"
	"encoding/xml"
	"errors"
	"fmt"
	"io"
	"log"
	"os/exec"
	"strings"
)
type Field struct {
	Attrs  map[string]string
	Childs []*Field
	Parent *Field
}
type Decoder struct {
	cmd         *exec.Cmd
	reader      io.ReadCloser
	bufioReader *bufio.Reader
}
func NewDecoder() (decoder *Decoder) {
	decoder = &Decoder{}
	return decoder
}
func (d *Decoder) DecodeStart(file string) (err error) {
	_, err = exec.LookPath("tshark")
	if err != nil {
		err = fmt.Errorf("Please install \"tshark\" tool")
		return err
	}
	cmd := exec.Command("tshark", "-T", "pdml", "-r", file)
	d.cmd = cmd
	d.reader, err = cmd.StdoutPipe()
	if err != nil {
		return
	}
	d.bufioReader = bufio.NewReader(d.reader)
	err = cmd.Start()
	if err != nil {
		return
	}
	return
}
func (d *Decoder) DecodeStartWithArgs(file string, args ...string) (err error) {
	_, err = exec.LookPath("tshark")
	if err != nil {
		err = fmt.Errorf("Please install \"tshark\" tool")
		return err
	}
	cmdargs := append([]string{"-T", "pdml", "-r", file}, args...)
	fmt.Println("Arguments are ", cmdargs)
	cmd := exec.Command("tshark",cmdargs...)
	d.cmd = cmd
	d.reader, err = cmd.StdoutPipe()
	if err != nil {
		return
	}
	d.bufioReader = bufio.NewReader(d.reader)
	err = cmd.Start()
	if err != nil {
		return
	}
	return
}