Lines Matching refs:dhcpData
40 memset(&dhcpData, 0, sizeof(dhcpData)); in Message()
45 if (size <= sizeof(dhcpData)) { in Message()
46 memcpy(&dhcpData, data, size); in Message()
49 memset(&dhcpData, 0, sizeof(dhcpData)); in Message()
90 memcpy(macAddress, sourceMessage.dhcpData.chaddr, sizeof(macAddress)); in offer()
93 message.dhcpData.xid = sourceMessage.dhcpData.xid; in offer()
94 message.dhcpData.flags = sourceMessage.dhcpData.flags; in offer()
95 message.dhcpData.yiaddr = offeredAddress; in offer()
96 message.dhcpData.giaddr = sourceMessage.dhcpData.giaddr; in offer()
119 memcpy(macAddress, sourceMessage.dhcpData.chaddr, sizeof(macAddress)); in ack()
122 message.dhcpData.xid = sourceMessage.dhcpData.xid; in ack()
123 message.dhcpData.flags = sourceMessage.dhcpData.flags; in ack()
124 message.dhcpData.yiaddr = offeredAddress; in ack()
125 message.dhcpData.giaddr = sourceMessage.dhcpData.giaddr; in ack()
142 memcpy(macAddress, sourceMessage.dhcpData.chaddr, sizeof(macAddress)); in nack()
145 message.dhcpData.xid = sourceMessage.dhcpData.xid; in nack()
146 message.dhcpData.flags = sourceMessage.dhcpData.flags; in nack()
147 message.dhcpData.giaddr = sourceMessage.dhcpData.giaddr; in nack()
161 if (dhcpData.xid != expectedXid) { in isValidDhcpMessage()
169 if (dhcpData.options + 4 > end()) { in isValidDhcpMessage()
173 if (dhcpData.op != expectedOp) { in isValidDhcpMessage()
176 if (dhcpData.htype != HTYPE_ETHER) { in isValidDhcpMessage()
179 if (dhcpData.hlen != ETH_ALEN) { in isValidDhcpMessage()
184 if (dhcpData.options[0] != OPT_COOKIE1) { in isValidDhcpMessage()
187 if (dhcpData.options[1] != OPT_COOKIE2) { in isValidDhcpMessage()
190 if (dhcpData.options[2] != OPT_COOKIE3) { in isValidDhcpMessage()
193 if (dhcpData.options[3] != OPT_COOKIE4) { in isValidDhcpMessage()
201 auto options = reinterpret_cast<const uint8_t*>(&dhcpData.options); in optionsSize()
239 memset(&dhcpData, 0, sizeof(dhcpData)); in Message()
241 dhcpData.op = operation; in Message()
242 dhcpData.htype = HTYPE_ETHER; in Message()
243 dhcpData.hlen = ETH_ALEN; in Message()
244 dhcpData.hops = 0; in Message()
246 dhcpData.flags = htons(FLAGS_BROADCAST); in Message()
248 dhcpData.xid = htonl(sNextTransactionId++); in Message()
250 memcpy(dhcpData.chaddr, macAddress, ETH_ALEN); in Message()
252 uint8_t* opts = dhcpData.options; in Message()
289 uint8_t optCode = dhcpData.options[i]; in getOption()
290 uint8_t optLen = dhcpData.options[i + 1]; in getOption()
291 const uint8_t* opt = dhcpData.options + i + 2; in getOption()
306 return reinterpret_cast<uint8_t*>(&dhcpData) + size(); in nextOption()
310 mSize = optionsEnd - reinterpret_cast<uint8_t*>(&dhcpData); in updateSize()