dont export

This commit is contained in:
Miek Gieben 2012-08-17 08:34:46 +02:00
parent b1140cec5f
commit 7b406f80ce
4 changed files with 9 additions and 9 deletions

View File

@ -117,7 +117,7 @@ func (k *RR_DNSKEY) KeyTag() uint16 {
keywire.Algorithm = k.Algorithm
keywire.PublicKey = k.PublicKey
wire := make([]byte, DefaultMsgSize)
n, ok := PackStruct(keywire, wire, 0)
n, ok := packStruct(keywire, wire, 0)
if !ok {
return 0
}
@ -155,7 +155,7 @@ func (k *RR_DNSKEY) ToDS(h int) *RR_DS {
keywire.Algorithm = k.Algorithm
keywire.PublicKey = k.PublicKey
wire := make([]byte, DefaultMsgSize)
n, ok := PackStruct(keywire, wire, 0)
n, ok := packStruct(keywire, wire, 0)
if !ok {
return nil
}
@ -236,7 +236,7 @@ func (s *RR_RRSIG) Sign(k PrivateKey, rrset []RR) error {
// Create the desired binary blob
signdata := make([]byte, DefaultMsgSize)
n, ok := PackStruct(sigwire, signdata, 0)
n, ok := packStruct(sigwire, signdata, 0)
if !ok {
return ErrPack
}
@ -348,7 +348,7 @@ func (s *RR_RRSIG) Verify(k *RR_DNSKEY, rrset []RR) error {
sigwire.SignerName = strings.ToLower(s.SignerName)
// Create the desired binary blob
signeddata := make([]byte, DefaultMsgSize)
n, ok := PackStruct(sigwire, signeddata, 0)
n, ok := packStruct(sigwire, signeddata, 0)
if !ok {
return ErrPack
}

2
msg.go
View File

@ -650,7 +650,7 @@ func structValue(any interface{}) reflect.Value {
return reflect.ValueOf(any).Elem()
}
func PackStruct(any interface{}, msg []byte, off int) (off1 int, ok bool) {
func packStruct(any interface{}, msg []byte, off int) (off1 int, ok bool) {
off, ok = packStructValue(structValue(any), msg, off, nil, false)
return off, ok
}

View File

@ -38,7 +38,7 @@ func HashName(label string, ha uint8, iter uint16, salt string) string {
saltwire := new(saltWireFmt)
saltwire.Salt = salt
wire := make([]byte, DefaultMsgSize)
n, ok := PackStruct(saltwire, wire, 0)
n, ok := packStruct(saltwire, wire, 0)
if !ok {
return ""
}

View File

@ -259,7 +259,7 @@ func tsigBuffer(msgbuf []byte, rr *RR_TSIG, requestMAC string, timersOnly bool)
m.MACSize = uint16(len(requestMAC) / 2)
m.MAC = requestMAC
buf = make([]byte, len(requestMAC)) // long enough
n, _ := PackStruct(m, buf, 0)
n, _ := packStruct(m, buf, 0)
buf = buf[:n]
}
@ -268,7 +268,7 @@ func tsigBuffer(msgbuf []byte, rr *RR_TSIG, requestMAC string, timersOnly bool)
tsig := new(timerWireFmt)
tsig.TimeSigned = rr.TimeSigned
tsig.Fudge = rr.Fudge
n, _ := PackStruct(tsig, tsigvar, 0)
n, _ := packStruct(tsig, tsigvar, 0)
tsigvar = tsigvar[:n]
} else {
tsig := new(tsigWireFmt)
@ -281,7 +281,7 @@ func tsigBuffer(msgbuf []byte, rr *RR_TSIG, requestMAC string, timersOnly bool)
tsig.Error = rr.Error
tsig.OtherLen = rr.OtherLen
tsig.OtherData = rr.OtherData
n, _ := PackStruct(tsig, tsigvar, 0)
n, _ := packStruct(tsig, tsigvar, 0)
tsigvar = tsigvar[:n]
}