dns/rawmsg.go

15 lines
429 B
Go
Raw Normal View History

2011-08-08 12:09:05 +00:00
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package dns
2011-09-26 07:11:14 +00:00
// Function defined in this subpackage work on []byte and but still
// provide some higher level functions.
2011-08-08 12:09:05 +00:00
2011-09-01 06:35:08 +00:00
// RawSetId sets the message ID in buf.
2011-08-08 14:29:13 +00:00
func RawSetId(buf []byte, off int, id uint16) bool {
2011-11-28 05:03:21 +00:00
buf[off], buf[off+1] = packUint16(id)
return true
2011-08-08 14:29:13 +00:00
}