Lines Matching defs:dsmp

445 	dhcp_smach_t		*dsmp;
462 if ((dsmp = lookup_smach_by_event(id)) != NULL) {
463 ipc_action_finish(dsmp, error);
508 dsmp = primary_smach(isv6);
510 dsmp = lookup_smach(ifname, isv6);
512 if (dsmp != NULL) {
514 hold_smach(dsmp);
515 if (!verify_smach(dsmp))
516 dsmp = NULL;
519 if (dsmp == NULL) {
528 dsmp = info_primary_smach(isv6);
529 if (dsmp == NULL)
542 (dsmp = insert_smach(lif, &error)) != NULL) {
547 error = get_smach_cid(dsmp);
549 remove_smach(dsmp);
550 dsmp = NULL;
552 dsm_created = (dsmp != NULL);
561 if (dsmp == NULL) {
573 (error = set_lif_dhcp(dsmp->dsm_lif)) != DHCP_IPC_SUCCESS) {
575 remove_smach(dsmp);
580 if ((dsmp->dsm_dflags & DHCP_IF_BOOTP) &&
583 dhcp_ipc_type_to_string(ia.ia_cmd), dsmp->dsm_name);
594 if (!check_cmd_allowed(dsmp->dsm_state, ia.ia_cmd)) {
597 dhcp_state_to_string(dsmp->dsm_state),
598 dhcp_ipc_type_to_string(ia.ia_cmd), dsmp->dsm_name);
600 ia.ia_cmd == DHCP_START && dsmp->dsm_state != INIT ?
606 dhcp_state_to_string(dsmp->dsm_state),
607 dhcp_ipc_type_to_string(ia.ia_cmd), dsmp->dsm_name);
610 make_primary(dsmp);
721 if (dsmp->dsm_dflags & DHCP_IF_BUSY) {
726 if (!ipc_action_start(dsmp, &ia)) {
728 "failed for %s", dsmp->dsm_name);
734 iap = &dsmp->dsm_ia;
740 if (dsmp->dsm_droprelease)
742 dsmp->dsm_droprelease = B_TRUE;
749 * dsmp while our DHCP_DROP dismantling is ongoing.)
751 cancel_smach_timers(dsmp);
752 (void) script_start(dsmp, isv6 ? EVENT_DROP6 : EVENT_DROP,
757 (void) dhcp_extending(dsmp);
765 PKT_LIST *ack = dsmp->dsm_ack;
786 for (i = 0; i < dsmp->dsm_pillen; i++) {
787 if (dsmp->dsm_pil[i] == optnum.code)
790 if (i < dsmp->dsm_pillen)
926 } else if (ack != dsmp->dsm_orig_ack) {
932 ack = dsmp->dsm_orig_ack;
949 dhcp_inform(dsmp);
954 if (dsmp->dsm_dflags & DHCP_IF_FAILED)
961 if (dsmp->dsm_droprelease)
963 dsmp->dsm_droprelease = B_TRUE;
964 cancel_smach_timers(dsmp); /* see comment in DHCP_DROP above */
965 (void) script_start(dsmp, isv6 ? EVENT_RELEASE6 :
973 deprecate_leases(dsmp);
981 error = read_hostconf(dsmp->dsm_name, plp, 2, dsmp->dsm_isv6);
996 dsmp->dsm_orig_ack = oack;
997 dsmp->dsm_ack = ack;
998 dhcp_init_reboot(dsmp);
1008 if (debug_level == 0 && set_start_timer(dsmp)) {
1012 dhcp_selecting(dsmp);
1022 status.if_began = monosec_to_time(dsmp->dsm_curstart_monosec);
1029 dlp = dsmp->dsm_leases;
1046 status.if_state = dsmp->dsm_state;
1047 status.if_dflags = dsmp->dsm_dflags;
1048 status.if_sent = dsmp->dsm_sent;
1049 status.if_recv = dsmp->dsm_received;
1050 status.if_bad_offers = dsmp->dsm_bad_offers;
1052 (void) strlcpy(status.if_name, dsmp->dsm_name, LIFNAMSIZ);
1257 check_main_lif(dhcp_smach_t *dsmp, const struct ifa_msghdr *ifam, int msglen)
1259 dhcp_lif_t *lif = dsmp->dsm_lif;
1363 dhcp_smach_t *dsmp, *dsmnext;
1388 for (dsmp = lookup_smach_by_uindex(ifindex, NULL, isv6);
1389 dsmp != NULL; dsmp = dsmnext) {
1399 dsmnext = lookup_smach_by_uindex(ifindex, dsmp, isv6);
1400 oldstate = dsmp->dsm_state;
1406 if (dsmp->dsm_droprelease)
1414 process_link_up_down(dsmp->dsm_lif->lif_pif, &msg.ifm);
1427 for (dlp = dsmp->dsm_leases; dlp != NULL; dlp = dlnext) {
1436 dsmp->dsm_lif_wait--;
1446 if ((isv6 && !check_main_lif(dsmp, &msg.ifam, msglen)) ||
1447 (!isv6 && !verify_lif(dsmp->dsm_lif))) {
1448 finished_smach(dsmp, DHCP_IPC_E_INVIF);
1456 if (!lif_finished && dsmp->dsm_lif_down == 0 &&
1457 (dsmp->dsm_leases != NULL || !lease_removed))
1464 if (dsmp->dsm_lif_wait != 0) {
1466 "LIFs waiting on DAD", dsmp->dsm_name,
1467 dsmp->dsm_lif_wait);
1476 if (dsmp->dsm_lif_down != 0)
1477 send_declines(dsmp);
1479 if (dsmp->dsm_leases == NULL) {
1480 dsmp->dsm_bad_offers++;
1488 if (!dsmp->dsm_isv6) {
1490 "LIFs left", dsmp->dsm_name);
1491 dhcp_restart(dsmp);
1500 "on %s in %s state", dsmp->dsm_name,
1504 dhcp_bound_complete(dsmp);
1506 dhcp_adopt_complete(dsmp);