Lines Matching refs:dsmp
55 send_declines(dhcp_smach_t *dsmp) in send_declines() argument
67 if (dsmp->dsm_isv6) { in send_declines()
68 if ((dpkt = init_pkt(dsmp, DHCPV6_MSG_DECLINE)) == NULL) in send_declines()
71 dsmp->dsm_serverid, dsmp->dsm_serveridlen); in send_declines()
80 if (dsmp->dsm_ack->opts[CD_DHCP_TYPE] == NULL) in send_declines()
83 if ((dpkt = init_pkt(dsmp, DECLINE)) == NULL) in send_declines()
85 IN6_V4MAPPED_TO_IPADDR(&dsmp->dsm_server, serverip); in send_declines()
95 for (dlp = dsmp->dsm_leases; dlp != NULL; dlp = dlpn) { in send_declines()
114 (void) set_smach_state(dsmp, DECLINING); in send_declines()
116 if (dsmp->dsm_isv6) { in send_declines()
117 (void) send_pkt_v6(dsmp, dpkt, dsmp->dsm_server, in send_declines()
122 (void) send_pkt(dsmp, dpkt, htonl(INADDR_BROADCAST), NULL); in send_declines()
137 dhcp_release(dhcp_smach_t *dsmp, void *arg) in dhcp_release() argument
146 if ((dsmp->dsm_dflags & DHCP_IF_BOOTP) || in dhcp_release()
147 !check_cmd_allowed(dsmp->dsm_state, DHCP_RELEASE)) { in dhcp_release()
148 ipc_action_finish(dsmp, DHCP_IPC_E_INT); in dhcp_release()
153 dsmp->dsm_name); in dhcp_release()
154 (void) set_smach_state(dsmp, RELEASING); in dhcp_release()
156 (void) remove_hostconf(dsmp->dsm_name, dsmp->dsm_isv6); in dhcp_release()
158 if (dsmp->dsm_isv6) { in dhcp_release()
159 dpkt = init_pkt(dsmp, DHCPV6_MSG_RELEASE); in dhcp_release()
161 dsmp->dsm_serverid, dsmp->dsm_serveridlen); in dhcp_release()
163 for (dlp = dsmp->dsm_leases; dlp != NULL; dlp = dlp->dl_next) { in dhcp_release()
176 deprecate_leases(dsmp); in dhcp_release()
183 (void) send_pkt_v6(dsmp, dpkt, dsmp->dsm_server, in dhcp_release()
186 if ((dlp = dsmp->dsm_leases) != NULL && dlp->dl_nlifs > 0) { in dhcp_release()
187 dpkt = init_pkt(dsmp, RELEASE); in dhcp_release()
195 IN6_V4MAPPED_TO_IPADDR(&dsmp->dsm_server, serverip); in dhcp_release()
198 (void) send_pkt(dsmp, dpkt, serverip, NULL); in dhcp_release()
209 deprecate_leases(dsmp); in dhcp_release()
211 finished_smach(dsmp, DHCP_IPC_SUCCESS); in dhcp_release()
227 dhcp_drop(dhcp_smach_t *dsmp, void *arg) in dhcp_drop() argument
230 dsmp->dsm_name); in dhcp_drop()
232 if (dsmp->dsm_state == PRE_BOUND || dsmp->dsm_state == BOUND || in dhcp_drop()
233 dsmp->dsm_state == RENEWING || dsmp->dsm_state == REBINDING) { in dhcp_drop()
234 if (dsmp->dsm_dflags & DHCP_IF_BOOTP) { in dhcp_drop()
237 dsmp->dsm_name); in dhcp_drop()
239 write_lease_to_hostconf(dsmp); in dhcp_drop()
243 dsmp->dsm_name, dhcp_state_to_string(dsmp->dsm_state)); in dhcp_drop()
245 deprecate_leases(dsmp); in dhcp_drop()
246 finished_smach(dsmp, DHCP_IPC_SUCCESS); in dhcp_drop()
261 stop_release_decline(dhcp_smach_t *dsmp, unsigned int n_requests) in stop_release_decline() argument
263 if (dsmp->dsm_state == RELEASING) { in stop_release_decline()
266 "transaction on %s", dsmp->dsm_name); in stop_release_decline()
267 finished_smach(dsmp, DHCP_IPC_SUCCESS); in stop_release_decline()
275 dsmp->dsm_name); in stop_release_decline()
277 if (dsmp->dsm_leases == NULL) { in stop_release_decline()
279 "%s has no leases left", dsmp->dsm_name); in stop_release_decline()
280 dhcp_restart(dsmp); in stop_release_decline()