• Home
  • Raw
  • Download

Lines Matching refs:dhcpData

42     memset(&dhcpData, 0, sizeof(dhcpData));  in Message()
47 if (size <= sizeof(dhcpData)) { in Message()
48 memcpy(&dhcpData, data, size); in Message()
51 memset(&dhcpData, 0, sizeof(dhcpData)); in Message()
92 memcpy(macAddress, sourceMessage.dhcpData.chaddr, sizeof(macAddress)); in offer()
95 message.dhcpData.xid = sourceMessage.dhcpData.xid; in offer()
96 message.dhcpData.flags = sourceMessage.dhcpData.flags; in offer()
97 message.dhcpData.yiaddr = offeredAddress; in offer()
98 message.dhcpData.giaddr = sourceMessage.dhcpData.giaddr; in offer()
121 memcpy(macAddress, sourceMessage.dhcpData.chaddr, sizeof(macAddress)); in ack()
124 message.dhcpData.xid = sourceMessage.dhcpData.xid; in ack()
125 message.dhcpData.flags = sourceMessage.dhcpData.flags; in ack()
126 message.dhcpData.yiaddr = offeredAddress; in ack()
127 message.dhcpData.giaddr = sourceMessage.dhcpData.giaddr; in ack()
144 memcpy(macAddress, sourceMessage.dhcpData.chaddr, sizeof(macAddress)); in nack()
147 message.dhcpData.xid = sourceMessage.dhcpData.xid; in nack()
148 message.dhcpData.flags = sourceMessage.dhcpData.flags; in nack()
149 message.dhcpData.giaddr = sourceMessage.dhcpData.giaddr; in nack()
163 if (dhcpData.xid != expectedXid) { in isValidDhcpMessage()
171 if (dhcpData.options + 4 > end()) { in isValidDhcpMessage()
175 if (dhcpData.op != expectedOp) { in isValidDhcpMessage()
178 if (dhcpData.htype != HTYPE_ETHER) { in isValidDhcpMessage()
181 if (dhcpData.hlen != ETH_ALEN) { in isValidDhcpMessage()
186 if (dhcpData.options[0] != OPT_COOKIE1) { in isValidDhcpMessage()
189 if (dhcpData.options[1] != OPT_COOKIE2) { in isValidDhcpMessage()
192 if (dhcpData.options[2] != OPT_COOKIE3) { in isValidDhcpMessage()
195 if (dhcpData.options[3] != OPT_COOKIE4) { in isValidDhcpMessage()
203 auto options = reinterpret_cast<const uint8_t*>(&dhcpData.options); in optionsSize()
241 memset(&dhcpData, 0, sizeof(dhcpData)); in Message()
243 dhcpData.op = operation; in Message()
244 dhcpData.htype = HTYPE_ETHER; in Message()
245 dhcpData.hlen = ETH_ALEN; in Message()
246 dhcpData.hops = 0; in Message()
248 dhcpData.flags = htons(FLAGS_BROADCAST); in Message()
250 dhcpData.xid = htonl(sNextTransactionId++); in Message()
252 memcpy(dhcpData.chaddr, macAddress, ETH_ALEN); in Message()
254 uint8_t* opts = dhcpData.options; in Message()
291 uint8_t optCode = dhcpData.options[i]; in getOption()
292 uint8_t optLen = dhcpData.options[i + 1]; in getOption()
293 const uint8_t* opt = dhcpData.options + i + 2; in getOption()
308 return reinterpret_cast<uint8_t*>(&dhcpData) + size(); in nextOption()
312 mSize = optionsEnd - reinterpret_cast<uint8_t*>(&dhcpData); in updateSize()