Fix presentation format

This commit is contained in:
Miek Gieben 2012-11-17 23:01:35 +01:00
parent c1ae9a3039
commit 85366b595b
1 changed files with 4 additions and 2 deletions

View File

@ -1387,8 +1387,9 @@ func (rr *RR_NID) Header() *RR_Header {
func (rr *RR_NID) String() string {
s := rr.Hdr.String() + strconv.Itoa(int(rr.Preference))
node := fmt.Sprintf("%0.16x", rr.NodeID)
s += node[0:3] + ":" + node[4:7] + ":" + node[8:11] + ":" + node[12:15]
return s
// TODO(mg): hexadecimal
}
func (rr *RR_NID) Len() int {
@ -1433,8 +1434,9 @@ func (rr *RR_L64) Header() *RR_Header {
func (rr *RR_L64) String() string {
s := rr.Hdr.String() + strconv.Itoa(int(rr.Preference))
node := fmt.Sprintf("%0.16x", rr.Locator64)
s += node[0:3] + ":" + node[4:7] + ":" + node[8:11] + ":" + node[12:15]
return s
// TODO(mg): locator64 as NID.NodeID
}
func (rr *RR_L64) Len() int {