unknown.go 524 B

1234567891011121314151617
  1. package xt
  2. // Unknown represents the bytes Info payload for unknown Info types where no
  3. // dedicated match/target info type has (yet) been defined.
  4. type Unknown []byte
  5. func (x *Unknown) marshal(fam TableFamily, rev uint32) ([]byte, error) {
  6. // In case of unknown payload we assume its creator knows what she/he does
  7. // and thus we don't do any alignment padding. Just take the payload "as
  8. // is".
  9. return *x, nil
  10. }
  11. func (x *Unknown) unmarshal(fam TableFamily, rev uint32, data []byte) error {
  12. *x = data
  13. return nil
  14. }