documentation

This commit is contained in:
Miek Gieben 2012-03-18 22:41:29 +01:00
parent cd99dca8bc
commit 99d26fb386
1 changed files with 5 additions and 6 deletions

View File

@ -4,27 +4,27 @@
package dns
// RawSetId sets the message ID in buf.
// RawSetId sets the message id in buf.
func RawSetId(msg []byte, i uint16) {
msg[0], msg[1] = packUint16(i)
}
// RawSetQuestionLen sets the len of the question section.
// RawSetQuestionLen sets the lenght of the question section.
func RawSetQuestionLen(msg []byte, i uint16) {
msg[4], msg[5] = packUint16(i)
}
// RawSetAnswerLen sets the len of the question section.
// RawSetAnswerLen sets the lenght of the answer section.
func RawSetAnswerLen(msg []byte, i uint16) {
msg[6], msg[7] = packUint16(i)
}
// RawSetsNsLen sets the len of the question section.
// RawSetsNsLen sets the lenght of the authority section.
func RawSetNsLen(msg []byte, i uint16) {
msg[8], msg[9] = packUint16(i)
}
// RawSetExtraLen sets the len of the question section.
// RawSetExtraLen sets the lenght of the additional section.
func RawSetExtraLen(msg []byte, i uint16) {
msg[10], msg[11] = packUint16(i)
}
@ -34,7 +34,6 @@ func RawSetExtraLen(msg []byte, i uint16) {
// start of the header of the RR, 'end' must be the
// end of the RR. There is no check if we overrun the buffer.
func RawSetRdlength(msg []byte, off, end int) {
// We are at the start of the header, walk the domainname (might be compressed)
Loop:
for {
c := int(msg[off])