Lines Matching defs:options
687 if (!picked->options[DHO_DHCP_MESSAGE_TYPE].len) {
757 if (ip->client->new->options[DHO_DHCP_LEASE_TIME].data)
759 ip->client->new->options[DHO_DHCP_LEASE_TIME].data);
772 if (ip->client->new->options[DHO_DHCP_RENEWAL_TIME].len)
774 ip->client->new->options[DHO_DHCP_RENEWAL_TIME].data);
779 if (ip->client->new->options[DHO_DHCP_REBINDING_TIME].len)
781 ip->client->new->options[DHO_DHCP_REBINDING_TIME].data);
855 if (ip->client->active->options[DHO_DHCP_SERVER_IDENTIFIER].len == 4) {
857 options[DHO_DHCP_SERVER_IDENTIFIER].data, 4);
933 char *name = packet->options[DHO_DHCP_MESSAGE_TYPE].len ?
951 if (!packet->options[ip->client->config->
977 if (!packet->options[DHO_DHCP_MESSAGE_TYPE].len)
1061 /* Copy the lease options. */
1063 if (packet->options[i].len) {
1064 lease->options[i].data =
1065 malloc(packet->options[i].len + 1);
1066 if (!lease->options[i].data) {
1071 memcpy(lease->options[i].data,
1072 packet->options[i].data,
1073 packet->options[i].len);
1074 lease->options[i].len =
1075 packet->options[i].len;
1076 lease->options[i].data[lease->options[i].len] =
1100 if ((!packet->options[DHO_DHCP_OPTION_OVERLOAD].len ||
1101 !(packet->options[DHO_DHCP_OPTION_OVERLOAD].data[0] & 2)) &&
1114 if ((!packet->options[DHO_DHCP_OPTION_OVERLOAD].len ||
1115 !(packet->options[DHO_DHCP_OPTION_OVERLOAD].data[0] & 1)) &&
1506 struct tree_cache *options[256];
1511 memset(options, 0, sizeof(options));
1516 options[i] = &option_elements[i];
1517 options[i]->value = &discover;
1518 options[i]->len = sizeof(discover);
1519 options[i]->buf_size = sizeof(discover);
1520 options[i]->timeout = 0xFFFFFFFF;
1522 /* Request the options we want */
1524 options[i] = &option_elements[i];
1525 options[i]->value = ip->client->config->requested_options;
1526 options[i]->len = ip->client->config->requested_option_count;
1527 options[i]->buf_size =
1529 options[i]->timeout = 0xFFFFFFFF;
1535 options[i] = &option_elements[i];
1536 options[i]->value = lease->address.iabuf;
1537 options[i]->len = lease->address.len;
1538 options[i]->buf_size = lease->address.len;
1539 options[i]->timeout = 0xFFFFFFFF;
1543 /* Send any options requested in the config file. */
1545 if (!options[i] &&
1547 options[i] = &option_elements[i];
1548 options[i]->value =
1550 options[i]->len =
1552 options[i]->buf_size =
1554 options[i]->timeout = 0xFFFFFFFF;
1558 if (!options[DHO_HOST_NAME]) {
1566 options[DHO_HOST_NAME] = &option_elements[DHO_HOST_NAME];
1567 options[DHO_HOST_NAME]->value = hostname;
1568 options[DHO_HOST_NAME]->len = len;
1569 options[DHO_HOST_NAME]->buf_size = len;
1570 options[DHO_HOST_NAME]->timeout = 0xFFFFFFFF;
1576 if (!options[DHO_DHCP_CLIENT_IDENTIFIER]) {
1581 options[DHO_DHCP_CLIENT_IDENTIFIER] = &option_elements[DHO_DHCP_CLIENT_IDENTIFIER];
1582 options[DHO_DHCP_CLIENT_IDENTIFIER]->value = client_ident;
1583 options[DHO_DHCP_CLIENT_IDENTIFIER]->len = hwlen+1;
1584 options[DHO_DHCP_CLIENT_IDENTIFIER]->buf_size = hwlen+1;
1585 options[DHO_DHCP_CLIENT_IDENTIFIER]->timeout = 0xFFFFFFFF;
1590 options, 0, 0, 0, NULL, 0);
1619 struct tree_cache *options[256];
1623 memset(options, 0, sizeof(options));
1628 options[i] = &option_elements[i];
1629 options[i]->value = &request;
1630 options[i]->len = sizeof(request);
1631 options[i]->buf_size = sizeof(request);
1632 options[i]->timeout = 0xFFFFFFFF;
1634 /* Request the options we want */
1636 options[i] = &option_elements[i];
1637 options[i]->value = ip->client->config->requested_options;
1638 options[i]->len = ip->client->config->requested_option_count;
1639 options[i]->buf_size =
1641 options[i]->timeout = 0xFFFFFFFF;
1648 options[i] = &option_elements[i];
1649 options[i]->value = lease->options[i].data;
1650 options[i]->len = lease->options[i].len;
1651 options[i]->buf_size = lease->options[i].len;
1652 options[i]->timeout = 0xFFFFFFFF;
1658 options[i] = &option_elements[i];
1659 options[i]->value = lease->address.iabuf;
1660 options[i]->len = lease->address.len;
1661 options[i]->buf_size = lease->address.len;
1662 options[i]->timeout = 0xFFFFFFFF;
1666 /* Send any options requested in the config file. */
1668 if (!options[i] &&
1670 options[i] = &option_elements[i];
1671 options[i]->value =
1673 options[i]->len =
1675 options[i]->buf_size =
1677 options[i]->timeout = 0xFFFFFFFF;
1681 if (!options[DHO_HOST_NAME]) {
1689 options[DHO_HOST_NAME] = &option_elements[DHO_HOST_NAME];
1690 options[DHO_HOST_NAME]->value = hostname;
1691 options[DHO_HOST_NAME]->len = len;
1692 options[DHO_HOST_NAME]->buf_size = len;
1693 options[DHO_HOST_NAME]->timeout = 0xFFFFFFFF;
1699 if (!options[DHO_DHCP_CLIENT_IDENTIFIER]) {
1704 options[DHO_DHCP_CLIENT_IDENTIFIER] = &option_elements[DHO_DHCP_CLIENT_IDENTIFIER];
1705 options[DHO_DHCP_CLIENT_IDENTIFIER]->value = client_ident;
1706 options[DHO_DHCP_CLIENT_IDENTIFIER]->len = hwlen+1;
1707 options[DHO_DHCP_CLIENT_IDENTIFIER]->buf_size = hwlen+1;
1708 options[DHO_DHCP_CLIENT_IDENTIFIER]->timeout = 0xFFFFFFFF;
1713 options, 0, 0, 0, NULL, 0);
1751 struct tree_cache *options[256], message_type_tree;
1757 memset(options, 0, sizeof(options));
1762 options[i] = &message_type_tree;
1763 options[i]->value = &decline;
1764 options[i]->len = sizeof(decline);
1765 options[i]->buf_size = sizeof(decline);
1766 options[i]->timeout = 0xFFFFFFFF;
1770 options[i] = &server_id_tree;
1771 options[i]->value = lease->options[i].data;
1772 options[i]->len = lease->options[i].len;
1773 options[i]->buf_size = lease->options[i].len;
1774 options[i]->timeout = 0xFFFFFFFF;
1778 options[i] = &requested_address_tree;
1779 options[i]->value = lease->address.iabuf;
1780 options[i]->len = lease->address.len;
1781 options[i]->buf_size = lease->address.len;
1782 options[i]->timeout = 0xFFFFFFFF;
1787 options[i] = &client_id_tree;
1788 options[i]->value = ip->client->config->send_options[i].data;
1789 options[i]->len = ip->client->config->send_options[i].len;
1790 options[i]->buf_size = ip->client->config->send_options[i].len;
1791 options[i]->timeout = 0xFFFFFFFF;
1797 options, 0, 0, 0, NULL, 0);
1832 if (lease->options[i].len)
1833 free(lease->options[i].data);
1919 if (lease->options[i].len)
1922 pretty_print_option(i, lease->options[i].data,
1923 lease->options[i].len, 1, 1));
2020 dp = lease->options[DHO_SUBNET_MASK].data;
2021 len = lease->options[DHO_SUBNET_MASK].len;
2032 if (!lease->options[DHO_BROADCAST_ADDRESS].len) {
2051 if (lease->options[i].len) {
2055 dp = lease->options[i].data;
2056 len = lease->options[i].len;
2068 lease->options[i].len;
2083 lease->options[i].data,
2084 lease->options[i].len);
2096 lease->options[i].len;
2104 lease->options[i].data,
2105 lease->options[i].len);
2106 for (dp = dbuf + lease->options[i].len;
2124 } else if (lease->options[i].len) {
2125 len = lease->options[i].len;
2126 dp = lease->options[i].data;
2164 hdr.len += sizeof(int) + lease->options[i].len;
2182 errs += buf_add(buf, &lease->options[i].len,
2183 sizeof(lease->options[i].len));
2184 errs += buf_add(buf, lease->options[i].data,
2185 lease->options[i].len);
2413 opbuf = pretty_print_option(option, l->options[option].data,
2414 l->options[option].len, 0, 0);
2416 sbuf = option_as_string(option, l->options[option].data,
2417 l->options[option].len);
2460 l->options[option].len = 0;
2461 free(l->options[option].data);
2470 l->options[option].len = 0;
2471 free(l->options[option].data);
2521 return (check_classless_option(l->options[option].data,
2522 l->options[option].len));