func (a *AddrPort) String() string {
	return net.JoinHostPort(a.Addr, a.Port)
}
String returns the string representation of the AddrPort.
package conntrack
import (
	"bufio"
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"log"
	"net"
	"strconv"
	"strings"
	"github.com/yuuki/lsconntrack/netutil"
)
type FlowDirection int
const (
	FlowUnknown FlowDirection = 1 << iota
	FlowActive
	FlowPassive
)
func (c FlowDirection) MarshalJSON() ([]byte, error) {
	switch c {
	case FlowActive:
		return json.Marshal("active")
	case FlowPassive:
		return json.Marshal("passive")
	case FlowUnknown:
		return json.Marshal("unknown")
	}
	return nil, errors.New("unreachable code")
}
type FilterPorts struct {
	Active  []string
	Passive []string
}
type flow struct {
	originalSaddr   string
	originalDaddr   string
	originalSport   string
	originalDport   string
	originalPackets int64
	originalBytes   int64
	replySaddr      string
	replyDaddr      string
	replySport      string
	replyDport      string
	replyPackets    int64
	replyBytes      int64
}
type HostFlowStat struct {
	TotalInboundPackets  int64 `json:"total_inbound_packets"`
	TotalInboundBytes    int64 `json:"total_inbound_bytes"`
	TotalOutboundPackets int64 `json:"total_outbound_packets"`
	TotalOutboundBytes   int64 `json:"total_outbound_bytes"`
}
func (s *HostFlowStat) String() string {
	return fmt.Sprintf("%d \t%d \t%d \t%d", s.TotalInboundPackets, s.TotalInboundBytes, s.TotalOutboundPackets, s.TotalOutboundBytes)
}
type AddrPort struct {
	Addr string `json:"addr"`
	Port string `json:"port"`
}