/
githubmirror
/
nftables
Обзор
Документация
Войти
/
githubmirror
/
nftables
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
xt/unknown.go
17 строк
524 B
thediveo
add typed xtables information un/marshalling
16 май 2022, 00:12
16 май 2022, 00:12
8ea9440
Код
Авторство
О чём код?
package xt // Unknown represents the bytes Info payload for unknown Info types where no // dedicated match/target info type has (yet) been defined. type Unknown []byte func (x *Unknown) marshal(fam TableFamily, rev uint32) ([]byte, error) { // In case of unknown payload we assume its creator knows what she/he does // and thus we don't do any alignment padding. Just take the payload "as // is". return *x, nil } func (x *Unknown) unmarshal(fam TableFamily, rev uint32, data []byte) error { *x = data return nil }