summaryrefslogtreecommitdiffhomepage
path: root/types/netlogfunc/netlogfunc.go
blob: db856f0cf49f175a3c033812e35d293ad63d3c84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright (c) Tailscale Inc & contributors
// 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)