Lines Matching refs:ret_duid

67 …nt8_t *addr, size_t addr_len, uint16_t arp_type, usec_t t, struct duid *ret_duid, size_t *ret_len)…  in dhcp_identifier_set_duid_llt()  argument
71 assert(ret_duid); in dhcp_identifier_set_duid_llt()
89 unaligned_write_be16(&ret_duid->type, DUID_TYPE_LLT); in dhcp_identifier_set_duid_llt()
90 unaligned_write_be16(&ret_duid->llt.htype, arp_type); in dhcp_identifier_set_duid_llt()
91 unaligned_write_be32(&ret_duid->llt.time, time_from_2000y); in dhcp_identifier_set_duid_llt()
92 memcpy(ret_duid->llt.haddr, addr, addr_len); in dhcp_identifier_set_duid_llt()
99 …l(const uint8_t *addr, size_t addr_len, uint16_t arp_type, struct duid *ret_duid, size_t *ret_len)… in dhcp_identifier_set_duid_ll() argument
101 assert(ret_duid); in dhcp_identifier_set_duid_ll()
114 unaligned_write_be16(&ret_duid->type, DUID_TYPE_LL); in dhcp_identifier_set_duid_ll()
115 unaligned_write_be16(&ret_duid->ll.htype, arp_type); in dhcp_identifier_set_duid_ll()
116 memcpy(ret_duid->ll.haddr, addr, addr_len); in dhcp_identifier_set_duid_ll()
123 int dhcp_identifier_set_duid_en(bool test_mode, struct duid *ret_duid, size_t *ret_len) { in dhcp_identifier_set_duid_en() argument
128 assert(ret_duid); in dhcp_identifier_set_duid_en()
141 unaligned_write_be16(&ret_duid->type, DUID_TYPE_EN); in dhcp_identifier_set_duid_en()
142 unaligned_write_be32(&ret_duid->en.pen, SYSTEMD_PEN); in dhcp_identifier_set_duid_en()
147 memcpy(ret_duid->en.id, &hash, sizeof(ret_duid->en.id)); in dhcp_identifier_set_duid_en()
149 *ret_len = offsetof(struct duid, en.id) + sizeof(ret_duid->en.id); in dhcp_identifier_set_duid_en()
152 …assert_se(memcmp(ret_duid, (const uint8_t[]) { 0x00, 0x02, 0x00, 0x00, 0xab, 0x11, 0x61, 0x77, 0x4… in dhcp_identifier_set_duid_en()
157 static int dhcp_identifier_set_duid_uuid(struct duid *ret_duid, size_t *ret_len) { in dhcp_identifier_set_duid_uuid() argument
161 assert(ret_duid); in dhcp_identifier_set_duid_uuid()
168 unaligned_write_be16(&ret_duid->type, DUID_TYPE_UUID); in dhcp_identifier_set_duid_uuid()
169 memcpy(&ret_duid->uuid.uuid, &machine_id, sizeof(machine_id)); in dhcp_identifier_set_duid_uuid()
183 struct duid *ret_duid, in dhcp_identifier_set_duid() argument
188 … return dhcp_identifier_set_duid_llt(addr, addr_len, arp_type, llt_time, ret_duid, ret_len); in dhcp_identifier_set_duid()
190 return dhcp_identifier_set_duid_en(test_mode, ret_duid, ret_len); in dhcp_identifier_set_duid()
192 return dhcp_identifier_set_duid_ll(addr, addr_len, arp_type, ret_duid, ret_len); in dhcp_identifier_set_duid()
194 return dhcp_identifier_set_duid_uuid(ret_duid, ret_len); in dhcp_identifier_set_duid()