Lines Matching defs:dsmp

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