Lines Matching refs:pl

217 remove_list(PKT_LIST *pl, int flag)  in remove_list()  argument
224 } else if (list_hd == pl) { in remove_list()
225 list_hd = pl->next; in remove_list()
227 } else if (list_tl == pl) { in remove_list()
231 pl->prev->next = pl->next; in remove_list()
232 pl->next->prev = pl->prev; in remove_list()
236 bkmem_free((char *)pl->pkt, pl->len); in remove_list()
237 bkmem_free((char *)pl, sizeof (PKT_LIST)); in remove_list()
254 PKT_LIST *pl; in bootp_collect() local
265 if (((pl = (PKT_LIST *)bkmem_zalloc(sizeof (PKT_LIST))) == in bootp_collect()
266 NULL) || ((pl->pkt = (PKT *)bkmem_zalloc(len)) == NULL)) { in bootp_collect()
268 if (pl != NULL) in bootp_collect()
269 bkmem_free((char *)pl, sizeof (PKT_LIST)); in bootp_collect()
272 bcopy(dhcp_rcv_bufp, pl->pkt, len); in bootp_collect()
273 pl->len = len; in bootp_collect()
275 list_hd = list_tl = pl; in bootp_collect()
276 pl->prev = NULL; in bootp_collect()
278 list_tl->next = pl; in bootp_collect()
279 pl->prev = list_tl; in bootp_collect()
280 list_tl = pl; in bootp_collect()
283 pl->next = NULL; in bootp_collect()
597 dhcp_decline(char *msg, PKT_LIST *pl) in dhcp_decline() argument
604 if (pl != NULL) { in dhcp_decline()
605 if (pl->opts[CD_SERVER_ID] != NULL && in dhcp_decline()
606 pl->opts[CD_SERVER_ID]->len == sizeof (struct in_addr)) { in dhcp_decline()
607 bcopy(pl->opts[CD_SERVER_ID]->value, in dhcp_decline()
608 &t_server, pl->opts[CD_SERVER_ID]->len); in dhcp_decline()
611 t_yiaddr.s_addr = pl->pkt->yiaddr.s_addr; in dhcp_decline()
711 PKT_LIST *pl, *wk; in dhcp_requesting() local
723 if ((pl = select_best()) == NULL) { in dhcp_requesting()
729 pl_pkt = pl->pkt; in dhcp_requesting()
736 if (pl->opts[CD_DHCP_TYPE] == NULL) { in dhcp_requesting()
741 bkmem_free((char *)pl->pkt, pl->len); in dhcp_requesting()
742 bkmem_free((char *)pl, sizeof (PKT_LIST)); in dhcp_requesting()
745 state_pl = pl; in dhcp_requesting()
752 if (pl->opts[CD_MESSAGE]) in dhcp_requesting()
753 prt_server_msg(pl->opts[CD_MESSAGE]); 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()
778 pl->opts[CD_SERVER_ID]->len); in dhcp_requesting()
779 opt += pl->opts[CD_SERVER_ID]->len; in dhcp_requesting()
784 bcopy(pl->opts[CD_LEASE_TIME]->value, &t_time, in dhcp_requesting()
815 bkmem_free((char *)pl->pkt, pl->len); in dhcp_requesting()
816 bkmem_free((char *)pl, sizeof (PKT_LIST)); in dhcp_requesting()
1043 create_bootpresponse_bprop(PKT_LIST *pl) in create_bootpresponse_bprop() argument
1047 if (pl == NULL || bootp_response != NULL) in create_bootpresponse_bprop()
1050 buflen = (pl->len * 2) + 1; /* extra space for null (1) */ in create_bootpresponse_bprop()
1054 if (octet_to_hexascii((uint8_t *)pl->pkt, pl->len, bootp_response, in create_bootpresponse_bprop()
1056 bkmem_free(bootp_response, (pl->len * 2) + 1); in create_bootpresponse_bprop()
1061 prom_create_encoded_prop("bootp-response", pl->pkt, pl->len, in create_bootpresponse_bprop()
1088 PKT_LIST *pl; in prom_cached_reply() local
1103 if (((pl = (PKT_LIST *)bkmem_zalloc(sizeof (PKT_LIST))) == NULL) || in prom_cached_reply()
1104 ((pl->pkt = (PKT *)bkmem_zalloc(len)) == NULL)) { in prom_cached_reply()
1106 if (pl != NULL) in prom_cached_reply()
1107 bkmem_free((char *)pl, sizeof (PKT_LIST)); in prom_cached_reply()
1111 (void) prom_getprop(chosen, prop, (caddr_t)pl->pkt); in prom_cached_reply()
1113 pl->len = len; in prom_cached_reply()
1115 if (dhcp_options_scan(pl, B_TRUE) != 0) { in prom_cached_reply()
1117 bkmem_free((char *)pl->pkt, pl->len); in prom_cached_reply()
1118 bkmem_free((char *)pl, sizeof (PKT_LIST)); in prom_cached_reply()
1122 state_pl = pl; in prom_cached_reply()