summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/option_clientid.go
diff options
context:
space:
mode:
authorAndrea Barberio <insomniac@slackware.it>2018-04-30 23:57:38 +0100
committerAndrea Barberio <insomniac@slackware.it>2018-04-30 23:57:38 +0100
commit0a594bd0cd2eedcdb3b3c0ae394d03d2036e8e2c (patch)
tree12771ac429e239be29e66fd577b72e4f6c8cf020 /dhcpv6/option_clientid.go
parentc8ffd0e7fcb2eb19d0c9bfefe608302418eae7f9 (diff)
Made client ID field public
Diffstat (limited to 'dhcpv6/option_clientid.go')
-rw-r--r--dhcpv6/option_clientid.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/dhcpv6/option_clientid.go b/dhcpv6/option_clientid.go
index 1a61047..47ab685 100644
--- a/dhcpv6/option_clientid.go
+++ b/dhcpv6/option_clientid.go
@@ -9,7 +9,7 @@ import (
)
type OptClientId struct {
- cid Duid
+ Cid Duid
}
func (op *OptClientId) Code() OptionCode {
@@ -20,24 +20,24 @@ func (op *OptClientId) ToBytes() []byte {
buf := make([]byte, 4)
binary.BigEndian.PutUint16(buf[0:2], uint16(OPTION_CLIENTID))
binary.BigEndian.PutUint16(buf[2:4], uint16(op.Length()))
- buf = append(buf, op.cid.ToBytes()...)
+ buf = append(buf, op.Cid.ToBytes()...)
return buf
}
func (op *OptClientId) ClientID() Duid {
- return op.cid
+ return op.Cid
}
func (op *OptClientId) SetClientID(cid Duid) {
- op.cid = cid
+ op.Cid = cid
}
func (op *OptClientId) Length() int {
- return op.cid.Length()
+ return op.Cid.Length()
}
func (op *OptClientId) String() string {
- return fmt.Sprintf("OptClientId{cid=%v}", op.cid.String())
+ return fmt.Sprintf("OptClientId{cid=%v}", op.Cid.String())
}
// build an OptClientId structure from a sequence of bytes.
@@ -52,6 +52,6 @@ func ParseOptClientId(data []byte) (*OptClientId, error) {
if err != nil {
return nil, err
}
- opt.cid = *cid
+ opt.Cid = *cid
return &opt, nil
}