2023-01-27 21:37:20 +00:00
|
|
|
// Copyright (c) Tailscale Inc & AUTHORS
|
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
2020-11-09 23:34:03 +00:00
|
|
|
|
|
|
|
// Package packet contains packet parsing and marshaling utilities.
|
|
|
|
//
|
2020-11-10 07:49:09 +00:00
|
|
|
// Parsed provides allocation-free minimal packet header decoding, for
|
|
|
|
// use in packet filtering. The other types in the package are for
|
|
|
|
// constructing and marshaling packets into []bytes.
|
2020-11-09 23:34:03 +00:00
|
|
|
//
|
|
|
|
// To support allocation-free parsing, this package defines IPv4 and
|
|
|
|
// IPv6 address types. You should prefer to use netaddr's types,
|
|
|
|
// except where you absolutely need allocation-free IP handling
|
|
|
|
// (i.e. in the tunnel datapath) and are willing to implement all
|
|
|
|
// codepaths and data structures twice, once per IP family.
|
|
|
|
package packet
|