summaryrefslogtreecommitdiffhomepage
path: root/types/netlogfunc/netlogfunc.go
blob: 6185fcb715c650ba2cfa067b459144e5492fe40d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause

// Package netlogfunc defines types for network logging.
package netlogfunc

import (
	"net/netip"

	"tailscale.com/types/ipproto"
)

// ConnectionCounter is a function for counting packets and bytes
// for a particular connection.
type ConnectionCounter func(proto ipproto.Proto, src, dst netip.AddrPort, packets, bytes int, recv bool)