Home | History | Annotate | Download | only in Dhcp6Dxe

Lines Matching defs:Duid

21   Generate client Duid in the format of Duid-llt.

35 EFI_DHCP6_DUID *Duid;
45 GetVariable2 (L"ClientId", &gEfiDhcp6ServiceBindingProtocolGuid, (VOID**)&Duid, NULL);
46 if (Duid != NULL) {
47 return Duid;
58 // . DUID .
65 // If System UUID is found from SMBIOS Table, use DUID-UUID type.
70 // The format of DUID-UUID:
74 // | DUID-Type (4) | UUID (128 bits) |
83 // sizeof (option-len + Duid-type + UUID-size) = 20 bytes
85 Duid = AllocateZeroPool (2 + 2 + sizeof (EFI_GUID));
86 if (Duid == NULL) {
91 // sizeof (Duid-type + UUID-size) = 18 bytes
93 Duid->Length = (UINT16) (18);
96 // Set the Duid-type and copy UUID.
98 WriteUnaligned16 ((UINT16 *) (Duid->Duid), HTONS (Dhcp6DuidTypeUuid));
100 CopyMem (Duid->Duid + 2, &Uuid, sizeof(EFI_GUID));
106 // The format of DUID-LLT:
110 // | Duid type (1) | hardware type (16 bits) |
132 // sizeof (option-len + Duid-type + hardware-type + time) = 10 bytes
134 Duid = AllocateZeroPool (10 + Mode->HwAddressSize);
135 if (Duid == NULL) {
140 // sizeof (Duid-type + hardware-type + time) = 8 bytes
142 Duid->Length = (UINT16) (Mode->HwAddressSize + 8);
145 // Set the Duid-type, hardware-type, time and copy the hardware address.
147 WriteUnaligned16 ((UINT16 *) ((UINT8 *) Duid + OFFSET_OF (EFI_DHCP6_DUID, Duid)), HTONS (Dhcp6DuidTypeLlt));
148 WriteUnaligned16 ((UINT16 *) ((UINT8 *) Duid + OFFSET_OF (EFI_DHCP6_DUID, Duid) + 2), HTONS (NET_IFTYPE_ETHERNET));
149 WriteUnaligned32 ((UINT32 *) ((UINT8 *) Duid + OFFSET_OF (EFI_DHCP6_DUID, Duid) + 4), HTONL (Stamp));
151 CopyMem (Duid->Duid + 8, &Mode->CurrentAddress, Mode->HwAddressSize);
158 Duid->Length + 2,
159 (VOID *) Duid
162 FreePool (Duid);
166 return Duid;