func (self *SrcOfAuth) Pack() []byte { buf := new(bytes.Buffer) domain.PackLabels(buf, self.Mname) domain.PackLabels(buf, self.Rname) b := make([]byte, 20) enc.PutUint32(b[0:4], self.Serial) enc.PutUint32(b[4:8], self.Refresh) enc.PutUint32(b[8:12], self.Retry) enc.PutUint32(b[12:16], self.Expire) enc.PutUint32(b[16:20], self.Minimum) buf.Write(b) return buf.Bytes() }
func (self *MailEx) Pack() []byte { buf := new(bytes.Buffer) b := make([]byte, 2) enc.PutUint16(b, self.Priority) buf.Write(b) domain.PackLabels(buf, self.Domain) return buf.Bytes() }