Lines Matching refs:dsmp
64 dhcp_smach_t *dsmp = arg; in dhcp_start() local
66 dsmp->dsm_start_timer = -1; in dhcp_start()
67 (void) set_smach_state(dsmp, INIT); in dhcp_start()
68 if (verify_smach(dsmp)) { in dhcp_start()
69 dhcpmsg(MSG_VERBOSE, "starting DHCP on %s", dsmp->dsm_name); in dhcp_start()
70 dhcp_selecting(dsmp); in dhcp_start()
82 set_start_timer(dhcp_smach_t *dsmp) in set_start_timer() argument
84 if (dsmp->dsm_start_timer != -1) in set_start_timer()
87 dsmp->dsm_start_timer = iu_schedule_timer_ms(tq, in set_start_timer()
88 lrand48() % DHCP_SELECT_WAIT, dhcp_start, dsmp); in set_start_timer()
89 if (dsmp->dsm_start_timer == -1) in set_start_timer()
92 hold_smach(dsmp); in set_start_timer()
106 dhcp_selecting(dhcp_smach_t *dsmp) in dhcp_selecting() argument
126 reset_smach(dsmp); in dhcp_selecting()
127 if (!set_smach_state(dsmp, SELECTING)) { in dhcp_selecting()
130 "reverting to INIT on %s", dsmp->dsm_name); in dhcp_selecting()
136 (void) remove_hostconf(dsmp->dsm_name, dsmp->dsm_isv6); in dhcp_selecting()
138 dsmp->dsm_offer_timer = iu_schedule_timer(tq, in dhcp_selecting()
139 dsmp->dsm_offer_wait, dhcp_requesting, dsmp); in dhcp_selecting()
140 if (dsmp->dsm_offer_timer == -1) { in dhcp_selecting()
142 "%s packets", dsmp->dsm_isv6 ? "Advertise" : "OFFER"); in dhcp_selecting()
146 hold_smach(dsmp); in dhcp_selecting()
154 if (dsmp->dsm_isv6) { in dhcp_selecting()
157 if ((dpkt = init_pkt(dsmp, DHCPV6_MSG_SOLICIT)) == NULL) { in dhcp_selecting()
164 d6in.d6in_iaid = htonl(dsmp->dsm_lif->lif_iaid); in dhcp_selecting()
172 (void) add_pkt_prl(dpkt, dsmp); in dhcp_selecting()
179 (void) send_pkt_v6(dsmp, dpkt, ipv6_all_dhcp_relay_and_servers, in dhcp_selecting()
182 if ((dpkt = init_pkt(dsmp, DISCOVER)) == NULL) { in dhcp_selecting()
193 htons(dsmp->dsm_lif->lif_max - sizeof (struct udpiphdr))); in dhcp_selecting()
200 (void) add_pkt_prl(dpkt, dsmp); in dhcp_selecting()
202 if (!dhcp_add_fqdn_opt(dpkt, dsmp)) in dhcp_selecting()
203 (void) dhcp_add_hostname_opt(dpkt, dsmp); in dhcp_selecting()
207 (void) send_pkt(dsmp, dpkt, htonl(INADDR_BROADCAST), in dhcp_selecting()
213 (void) set_smach_state(dsmp, INIT); in dhcp_selecting()
214 dsmp->dsm_dflags |= DHCP_IF_FAILED; in dhcp_selecting()
215 ipc_action_finish(dsmp, DHCP_IPC_E_MEMORY); in dhcp_selecting()
232 stop_selecting(dhcp_smach_t *dsmp, unsigned int n_discovers) in stop_selecting() argument
238 if (!dsmp->dsm_isv6 && !verify_lif(dsmp->dsm_lif)) { in stop_selecting()
239 finished_smach(dsmp, DHCP_IPC_E_UNKIF); in stop_selecting()
243 if (dsmp->dsm_recv_pkt_list != NULL) { in stop_selecting()
244 dhcp_requesting(NULL, dsmp); in stop_selecting()
245 if (dsmp->dsm_state != SELECTING) in stop_selecting()