Commit 434ec0c7 authored by Mikio Hara's avatar Mikio Hara

dns/dnsmessage: update docs for terminology alignment

s/packet/message/g

Change-Id: I2adf809bb4b90e78cf894e4cb6832c117042deb7
Reviewed-on: https://go-review.googlesource.com/65830
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarIan Gudger <igudger@google.com>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 42fe2e1c
...@@ -13,7 +13,7 @@ import ( ...@@ -13,7 +13,7 @@ import (
"errors" "errors"
) )
// Packet formats // Message formats
// A Type is a type of DNS request and response. // A Type is a type of DNS request and response.
type Type uint16 type Type uint16
...@@ -826,8 +826,8 @@ func (m *Message) AppendPack(b []byte) ([]byte, error) { ...@@ -826,8 +826,8 @@ func (m *Message) AppendPack(b []byte) ([]byte, error) {
// unconditionally enabling it is fine. // unconditionally enabling it is fine.
// //
// DNS lookups are typically done over UDP, and RFC 1035 states that UDP // DNS lookups are typically done over UDP, and RFC 1035 states that UDP
// DNS packets can be a maximum of 512 bytes long. Without compression, // DNS messages can be a maximum of 512 bytes long. Without compression,
// many DNS response packets are over this limit, so enabling // many DNS response messages are over this limit, so enabling
// compression will help ensure compliance. // compression will help ensure compliance.
compression := map[string]int{} compression := map[string]int{}
...@@ -1207,7 +1207,7 @@ func (b *Builder) AAAAResource(h ResourceHeader, r AAAAResource) error { ...@@ -1207,7 +1207,7 @@ func (b *Builder) AAAAResource(h ResourceHeader, r AAAAResource) error {
return nil return nil
} }
// Finish ends message building and generates a binary packet. // Finish ends message building and generates a binary message.
func (b *Builder) Finish() ([]byte, error) { func (b *Builder) Finish() ([]byte, error) {
if b.section < sectionHeader { if b.section < sectionHeader {
return nil, ErrNotStarted return nil, ErrNotStarted
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment