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
128 reset_smach(dsmp); in dhcp_selecting()
129 if (!set_smach_state(dsmp, SELECTING)) { in dhcp_selecting()
132 "reverting to INIT on %s", dsmp->dsm_name); in dhcp_selecting()
138 (void) remove_hostconf(dsmp->dsm_name, dsmp->dsm_isv6); in dhcp_selecting()
140 dsmp->dsm_offer_timer = iu_schedule_timer(tq, in dhcp_selecting()
141 dsmp->dsm_offer_wait, dhcp_requesting, dsmp); in dhcp_selecting()
142 if (dsmp->dsm_offer_timer == -1) { in dhcp_selecting()
144 "%s packets", dsmp->dsm_isv6 ? "Advertise" : "OFFER"); in dhcp_selecting()
148 hold_smach(dsmp); in dhcp_selecting()
156 if (dsmp->dsm_isv6) { in dhcp_selecting()
159 if ((dpkt = init_pkt(dsmp, DHCPV6_MSG_SOLICIT)) == NULL) { in dhcp_selecting()
166 d6in.d6in_iaid = htonl(dsmp->dsm_lif->lif_iaid); in dhcp_selecting()
174 (void) add_pkt_prl(dpkt, dsmp); in dhcp_selecting()
181 (void) send_pkt_v6(dsmp, dpkt, ipv6_all_dhcp_relay_and_servers, in dhcp_selecting()
184 if ((dpkt = init_pkt(dsmp, DISCOVER)) == NULL) { in dhcp_selecting()
195 htons(dsmp->dsm_lif->lif_max - sizeof (struct udpiphdr))); in dhcp_selecting()
202 (void) add_pkt_prl(dpkt, dsmp); in dhcp_selecting()
204 if (df_get_bool(dsmp->dsm_name, dsmp->dsm_isv6, in dhcp_selecting()
209 "/etc/hostname.%s", dsmp->dsm_name); in dhcp_selecting()
214 dsmp->dsm_reqhost = strdup(reqhost); in dhcp_selecting()
215 if (dsmp->dsm_reqhost != NULL) in dhcp_selecting()
217 dsmp->dsm_reqhost, in dhcp_selecting()
218 strlen(dsmp->dsm_reqhost)); in dhcp_selecting()
227 (void) send_pkt(dsmp, dpkt, htonl(INADDR_BROADCAST), in dhcp_selecting()
233 (void) set_smach_state(dsmp, INIT); in dhcp_selecting()
234 dsmp->dsm_dflags |= DHCP_IF_FAILED; in dhcp_selecting()
235 ipc_action_finish(dsmp, DHCP_IPC_E_MEMORY); in dhcp_selecting()
252 stop_selecting(dhcp_smach_t *dsmp, unsigned int n_discovers) in stop_selecting() argument
258 if (!dsmp->dsm_isv6 && !verify_lif(dsmp->dsm_lif)) { in stop_selecting()
259 finished_smach(dsmp, DHCP_IPC_E_UNKIF); in stop_selecting()
263 if (dsmp->dsm_recv_pkt_list != NULL) { in stop_selecting()
264 dhcp_requesting(NULL, dsmp); in stop_selecting()
265 if (dsmp->dsm_state != SELECTING) in stop_selecting()