extension.go 422 B

12345678910111213141516
  1. // Copyright 2015 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package icmp
  5. // An Extension represents an ICMP extension.
  6. type Extension interface {
  7. // Len returns the length of ICMP extension.
  8. Len() int
  9. // Marshal returns the binary enconding of ICMP extension.
  10. Marshal() ([]byte, error)
  11. }
  12. const extensionVersion = 2