implemented query types constants

This commit is contained in:
2024-12-19 18:27:11 +03:00
parent 02e8002f2c
commit 4ccc8bae99
2 changed files with 22 additions and 0 deletions
+12
View File
@@ -1 +1,13 @@
package dns
type DNSMessage struct {
Header DNSHeader
Question DNSQuestion
}
// convert dns message into a byte slice
func (m *DNSMessage) Serialize() []byte {
header := m.Header.Serialize()
question := m.Question.Serialize()
return append(header, question...)
}