summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4
diff options
context:
space:
mode:
Diffstat (limited to 'dhcpv4')
-rw-r--r--dhcpv4/bsdp.go25
-rw-r--r--dhcpv4/types.go3
2 files changed, 26 insertions, 2 deletions
diff --git a/dhcpv4/bsdp.go b/dhcpv4/bsdp.go
index 05542be..4096ce6 100644
--- a/dhcpv4/bsdp.go
+++ b/dhcpv4/bsdp.go
@@ -25,9 +25,12 @@ const (
BSDPOptionBootImageList
BSDPOptionNetboot1_0Firmware
BSDPOptionBootImageAttributesFilterList
+ BSDPOptionShadowMountPath OptionCode = 128
+ BSDPOptionShadowFilePath OptionCode = 129
+ BSDPOptionMachineName OptionCode = 130
)
-// Versions (seen so far)
+// Versions
var (
BSDPVersion1_0 = []byte{1, 0}
BSDPVersion1_1 = []byte{1, 1}
@@ -280,7 +283,7 @@ func InformSelectForAck(ack DHCPv4, replyPort uint16, selectedImage BootImage) (
},
Option{
Code: BSDPOptionSelectedBootImageID,
- Data: append([]byte{4}, selectedImage.ID.toBytes()...),
+ Data: selectedImage.ID.toBytes(),
},
}
@@ -315,6 +318,24 @@ func InformSelectForAck(ack DHCPv4, replyPort uint16, selectedImage BootImage) (
})
}
+ vendorClassID, err := makeVendorClassIdentifier()
+ if err != nil {
+ return nil, err
+ }
+ d.AddOption(Option{
+ Code: OptionClassIdentifier,
+ Data: []byte(vendorClassID),
+ })
+ d.AddOption(Option{
+ Code: OptionParameterRequestList,
+ Data: []byte{
+ OptionSubnetMask,
+ OptionRouter,
+ OptionBootfileName,
+ OptionVendorSpecificInformation,
+ OptionClassIdentifier,
+ },
+ })
d.AddOption(Option{
Code: OptionDHCPMessageType,
Data: []byte{MessageTypeInform},
diff --git a/dhcpv4/types.go b/dhcpv4/types.go
index f840609..4f3ad0f 100644
--- a/dhcpv4/types.go
+++ b/dhcpv4/types.go
@@ -374,4 +374,7 @@ var BSDPOptionCodeToString = map[OptionCode]string{
BSDPOptionBootImageList: "BSDP Boot Image List",
BSDPOptionNetboot1_0Firmware: "BSDP Netboot 1.0 Firmware",
BSDPOptionBootImageAttributesFilterList: "BSDP Boot Image Attributes Filter List",
+ BSDPOptionShadowMountPath: "BSDP Shadow Mount Path",
+ BSDPOptionShadowFilePath: "BSDP Shadow File Path",
+ BSDPOptionMachineName: "BSDP Machine Name",
}