Lines Matching refs:uint8_t

30 static const uint8_t kRequestParameters[] = { OPT_SUBNET_MASK,
44 Message::Message(const uint8_t* data, size_t size) { in Message()
54 Message Message::discover(const uint8_t (&sourceMac)[ETH_ALEN]) { in discover()
57 static_cast<uint8_t>(DHCPDISCOVER)); in discover()
65 Message Message::request(const uint8_t (&sourceMac)[ETH_ALEN], in request()
71 static_cast<uint8_t>(DHCPREQUEST)); in request()
89 uint8_t macAddress[ETH_ALEN]; in offer()
91 Message message(OP_BOOTREPLY, macAddress, static_cast<uint8_t>(DHCPOFFER)); in offer()
118 uint8_t macAddress[ETH_ALEN]; in ack()
120 Message message(OP_BOOTREPLY, macAddress, static_cast<uint8_t>(DHCPACK)); in ack()
141 uint8_t macAddress[ETH_ALEN]; in nack()
143 Message message(OP_BOOTREPLY, macAddress, static_cast<uint8_t>(DHCPNAK)); in nack()
155 bool Message::isValidDhcpMessage(uint8_t expectedOp, in isValidDhcpMessage()
167 bool Message::isValidDhcpMessage(uint8_t expectedOp) const { in isValidDhcpMessage()
201 auto options = reinterpret_cast<const uint8_t*>(&dhcpData.options); in optionsSize()
202 const uint8_t* msgEnd = end(); in optionsSize()
209 uint8_t Message::type() const { in type()
210 uint8_t length = 0; in type()
211 const uint8_t* opt = getOption(OPT_MESSAGE_TYPE, &length); in type()
219 uint8_t length = 0; in serverId()
220 const uint8_t* opt = getOption(OPT_SERVER_ID, &length); in serverId()
228 uint8_t length = 0; in requestedIp()
229 const uint8_t* opt = getOption(OPT_REQUESTED_IP, &length); in requestedIp()
236 Message::Message(uint8_t operation, in Message()
237 const uint8_t (&macAddress)[ETH_ALEN], in Message()
238 uint8_t type) { in Message()
252 uint8_t* opts = dhcpData.options; in Message()
266 void Message::addOption(uint8_t type, const void* data, uint8_t size) { in addOption()
267 uint8_t* opts = nextOption(); in addOption()
278 uint8_t* opts = nextOption(); in endOptions()
285 const uint8_t* Message::getOption(uint8_t expectedOptCode, in getOption()
286 uint8_t* length) const { in getOption()
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()
305 uint8_t* Message::nextOption() { in nextOption()
306 return reinterpret_cast<uint8_t*>(&dhcpData) + size(); in nextOption()
309 void Message::updateSize(uint8_t* optionsEnd) { in updateSize()
310 mSize = optionsEnd - reinterpret_cast<uint8_t*>(&dhcpData); in updateSize()