Lines Matching defs:cfg_p

59 	struct isns_config_s *cfg_p = (struct isns_config_s *)arg;
70 while ((cfg_p->curtask_p == NULL)
71 && ((cfg_p->curtask_p = isns_get_next_task(cfg_p)) != NULL))
72 isns_run_task(cfg_p->curtask_p);
74 nevents = kevent(cfg_p->kq, NULL, 0, evt_chgs,
82 run_thread = (evt_handler_p(evt_p, cfg_p) == 0);
93 isns_get_next_task(struct isns_config_s *cfg_p)
100 task_p = isns_taskq_remove(cfg_p);
102 if (cfg_p->sd_connected)
109 isns_taskq_insert_head(cfg_p, task_p);
111 task_p = isns_new_task(cfg_p,
113 task_p->var.reconnect_server.ai_p = cfg_p->ai_p;
125 isns_kevent_pipe(struct kevent* evt_p, struct isns_config_s *cfg_p)
137 rbytes = read(cfg_p->pipe_fds[0], &cmd_type,
153 rbytes = read(cfg_p->pipe_fds[0], &trans_id,
162 isns_abort_trans(cfg_p, trans_id);
230 isns_process_in_pdu(struct isns_config_s *cfg_p)
237 if ((curtask_p = cfg_p->curtask_p) == NULL)
238 isns_free_pdu(cfg_p->pdu_in_p);
240 isns_free_pdu(cfg_p->pdu_in_p);
241 else if (!isns_is_valid_resp(trans_p, cfg_p->pdu_in_p))
242 isns_free_pdu(cfg_p->pdu_in_p);
244 isns_add_pdu_response(trans_p, cfg_p->pdu_in_p);
252 cfg_p->pdu_in_p = NULL;
259 isns_kevent_socket(struct kevent *evt_p, struct isns_config_s *cfg_p)
279 if (cfg_p->pdu_in_p == NULL) {
293 pdu_p = isns_new_pdu(cfg_p, 0, 0, 0);
301 rv = isns_socket_readv(cfg_p->sd, iovp, iovcnt);
351 cfg_p->pdu_in_p = pdu_p;
370 pdu_p = cfg_p->pdu_in_p;
400 rv = isns_socket_readv(cfg_p->sd, iovp, iovcnt);
404 isns_free_pdu(cfg_p->pdu_in_p);
405 cfg_p->pdu_in_p = NULL;
433 isns_process_in_pdu(cfg_p);
443 isns_socket_close(cfg_p->sd);
444 cfg_p->sd_connected = 0;
446 if (cfg_p->curtask_p != NULL)
447 isns_process_connection_loss(cfg_p);
449 if (cfg_p->pdu_in_p != NULL) {
450 isns_free_pdu(cfg_p->pdu_in_p);
451 cfg_p->pdu_in_p = NULL;
463 isns_kevent_timer_recon(struct kevent *evt_p, struct isns_config_s *cfg_p)
470 rv = isns_socket_create(&(cfg_p->sd), cfg_p->ai_p->ai_family,
471 cfg_p->ai_p->ai_socktype);
475 rv = isns_socket_connect(cfg_p->sd, cfg_p->ai_p->ai_addr,
476 cfg_p->ai_p->ai_addrlen);
479 rv = isns_change_kevent_list(cfg_p,
486 cfg_p->sd_connected = 1;
488 /* Add cfg_p->sd to kqueue */
489 rv = isns_change_kevent_list(cfg_p, (uintptr_t)cfg_p->sd,
496 isns_end_task(cfg_p->curtask_p);
508 isns_kevent_timer_refresh(struct kevent* evt_p, struct isns_config_s *cfg_p)
518 ref_p = cfg_p->refresh_p;
536 trans = isns_new_trans((ISNS_HANDLE)cfg_p, isnsp_DevAttrQry, 0);