doc.go 687 B

123456789101112131415
  1. // Copyright (c) Tailscale Inc & AUTHORS
  2. // SPDX-License-Identifier: BSD-3-Clause
  3. // Package packet contains packet parsing and marshaling utilities.
  4. //
  5. // Parsed provides allocation-free minimal packet header decoding, for
  6. // use in packet filtering. The other types in the package are for
  7. // constructing and marshaling packets into []bytes.
  8. //
  9. // To support allocation-free parsing, this package defines IPv4 and
  10. // IPv6 address types. You should prefer to use netaddr's types,
  11. // except where you absolutely need allocation-free IP handling
  12. // (i.e. in the tunnel datapath) and are willing to implement all
  13. // codepaths and data structures twice, once per IP family.
  14. package packet