1package proto 2 3import "github.com/pion/stun" 4 5// DontFragmentAttr represents DONT-FRAGMENT attribute. 6type DontFragmentAttr struct{} 7 8// AddTo adds DONT-FRAGMENT attribute to message. 9func (DontFragmentAttr) AddTo(m *stun.Message) error { 10 m.Add(stun.AttrDontFragment, nil) 11 return nil 12} 13 14// IsSet returns true if DONT-FRAGMENT attribute is set. 15func (DontFragmentAttr) IsSet(m *stun.Message) bool { 16 _, err := m.Get(stun.AttrDontFragment) 17 return err == nil 18} 19