Lines Matching refs:opt

107 parameter_request_list(uint8_t **opt)  in parameter_request_list()  argument
122 if (opt && *opt) { in parameter_request_list()
123 bcopy(prlist, *opt, sizeof (prlist)); in parameter_request_list()
124 *opt += sizeof (prlist); in parameter_request_list()
132 set_hw_spec_data(PKT *p, uint8_t **opt, uint8_t *pkttype) in set_hw_spec_data() argument
156 if (opt && *opt) { in set_hw_spec_data()
195 bcopy(dhcp_classid, *opt, dhcp_classid[1] + 2); in set_hw_spec_data()
196 *opt += dhcp_classid[1] + 2; in set_hw_spec_data()
600 uint8_t *opt, ulen; in dhcp_decline() local
614 opt = init_msg(pkt, opt_decline); in dhcp_decline()
615 set_hw_spec_data(pkt, &opt, opt_decline); in dhcp_decline()
617 *opt++ = CD_SERVER_ID; in dhcp_decline()
618 *opt++ = sizeof (struct in_addr); in dhcp_decline()
619 bcopy(&t_server, opt, sizeof (struct in_addr)); in dhcp_decline()
620 opt += sizeof (struct in_addr); in dhcp_decline()
632 *opt++ = CD_MESSAGE; in dhcp_decline()
633 *opt++ = ulen; in dhcp_decline()
634 bcopy(msg, opt, ulen); in dhcp_decline()
635 opt += ulen; in dhcp_decline()
636 *opt++ = CD_END; in dhcp_decline()
638 pkt_size = (uint8_t *)opt - (uint8_t *)pkt; in dhcp_decline()
654 uint8_t *opt; in dhcp_selecting() local
660 opt = init_msg(pkt, opt_discover); in dhcp_selecting()
663 *opt++ = CD_MAX_DHCP_SIZE; in dhcp_selecting()
664 *opt++ = sizeof (size); in dhcp_selecting()
668 bcopy(&size, opt, sizeof (size)); in dhcp_selecting()
669 opt += sizeof (size); in dhcp_selecting()
671 set_hw_spec_data(pkt, &opt, opt_discover); in dhcp_selecting()
673 *opt++ = CD_LEASE_TIME; in dhcp_selecting()
674 *opt++ = sizeof (lease); in dhcp_selecting()
676 bcopy(&lease, opt, sizeof (lease)); in dhcp_selecting()
677 opt += sizeof (lease); in dhcp_selecting()
684 *opt++ = CD_CLIENT_ID; in dhcp_selecting()
685 *opt++ = dhcp_clientid_len; in dhcp_selecting()
686 bcopy(dhcp_clientid, opt, dhcp_clientid_len); in dhcp_selecting()
687 opt += dhcp_clientid_len; in dhcp_selecting()
690 parameter_request_list(&opt); in dhcp_selecting()
692 *opt++ = CD_END; in dhcp_selecting()
694 pkt_size = (uint8_t *)opt - (uint8_t *)pkt; in dhcp_selecting()
713 uint8_t *opt; in dhcp_requesting() local
761 opt = init_msg(pkt, opt_request); in dhcp_requesting()
769 *opt++ = CD_MAX_DHCP_SIZE; in dhcp_requesting()
770 *opt++ = sizeof (size); in dhcp_requesting()
771 bcopy(&size, opt, sizeof (size)); in dhcp_requesting()
772 opt += sizeof (size); in dhcp_requesting()
774 set_hw_spec_data(pkt, &opt, opt_request); in dhcp_requesting()
775 *opt++ = CD_SERVER_ID; in dhcp_requesting()
776 *opt++ = pl->opts[CD_SERVER_ID]->len; in dhcp_requesting()
777 bcopy(pl->opts[CD_SERVER_ID]->value, opt, in dhcp_requesting()
779 opt += pl->opts[CD_SERVER_ID]->len; in dhcp_requesting()
782 *opt++ = CD_LEASE_TIME; in dhcp_requesting()
783 *opt++ = 4; in dhcp_requesting()
790 bcopy(&t_time, opt, sizeof (t_time)); in dhcp_requesting()
791 opt += sizeof (t_time); in dhcp_requesting()
794 *opt++ = CD_REQUESTED_IP_ADDR; in dhcp_requesting()
795 *opt++ = sizeof (struct in_addr); in dhcp_requesting()
796 bcopy(&pl_pkt->yiaddr, opt, sizeof (struct in_addr)); in dhcp_requesting()
797 opt += sizeof (struct in_addr); in dhcp_requesting()
804 *opt++ = CD_CLIENT_ID; in dhcp_requesting()
805 *opt++ = dhcp_clientid_len; in dhcp_requesting()
806 bcopy(dhcp_clientid, opt, dhcp_clientid_len); in dhcp_requesting()
807 opt += dhcp_clientid_len; in dhcp_requesting()
810 parameter_request_list(&opt); in dhcp_requesting()
812 *opt++ = CD_END; in dhcp_requesting()
822 pkt_size = (uint8_t *)opt - (uint8_t *)pkt; in dhcp_requesting()