Lines Matching defs:clientp
69 typedef int (*e_func_t)(vntsd_client_t *clientp);
79 genbrk(vntsd_client_t *clientp)
84 assert(clientp);
85 assert(clientp->cons);
87 consp = clientp->cons;
89 consp->vcc_fd, clientp->sockfd);
92 if (consp->clientpq->handle != clientp) {
94 return (vntsd_write_line(clientp,
109 genaltbrk(vntsd_client_t *clientp)
114 assert(clientp);
115 assert(clientp->cons);
117 consp = clientp->cons;
119 consp->vcc_fd, clientp->sockfd);
122 if (consp->clientpq->handle != clientp) {
124 return (vntsd_write_line(clientp,
133 if ((vntsd_write_fd(clientp->cons->vcc_fd, brkseq, sizeof (brkseq))) ==
145 console_forward(vntsd_client_t *clientp)
148 if (clientp->cons->group->num_cons > 1)
160 console_backward(vntsd_client_t *clientp)
163 if (clientp->cons->group->num_cons > 1)
172 acquire_write(vntsd_client_t *clientp)
178 assert(clientp);
179 consp = clientp->cons;
182 if (consp->clientpq->handle == clientp) {
184 if ((rv = vntsd_write_line(clientp,
194 if ((rv = vntsd_write_client(clientp, vntsd_eol, VNTSD_EOL_LEN))
205 if ((rv = vntsd_write_lines(clientp,
214 if ((rv = vntsd_write_client(clientp, vntsd_eol,
219 if ((rv = vntsd_get_yes_no(clientp,
240 static int daemon_cmd_help(vntsd_client_t *clientp);
283 daemon_cmd_help(vntsd_client_t *clientp)
289 if ((rv = vntsd_write_client(clientp, vntsd_eol,
298 if ((rv = vntsd_write_line(clientp, gettext("VNTSD commands"))) !=
313 if ((rv = vntsd_write_line(clientp, buf)) != VNTSD_SUCCESS) {
323 exit_daemon_cmd(vntsd_client_t *clientp, int rv)
325 (void) mutex_lock(&clientp->lock);
326 clientp->status &= ~VNTSD_CLIENT_DISABLE_DAEMON_CMD;
327 (void) mutex_unlock(&clientp->lock);
337 vntsd_process_daemon_cmd(vntsd_client_t *clientp, char c)
343 prev_char = clientp->prev_char;
350 if (clientp->status & VNTSD_CLIENT_DISABLE_DAEMON_CMD) {
355 (void) mutex_lock(&clientp->lock);
356 clientp->status |= VNTSD_CLIENT_DISABLE_DAEMON_CMD;
357 (void) mutex_unlock(&clientp->lock);
360 clientp->cons->vcc_fd, clientp->sockfd);
363 if ((rv = vntsd_read_char(clientp, &c)) != VNTSD_SUCCESS) {
364 return (exit_daemon_cmd(clientp, rv));
372 (void) mutex_lock(&clientp->lock);
373 clientp->status &= ~VNTSD_CLIENT_DISABLE_DAEMON_CMD;
374 (void) mutex_unlock(&clientp->lock);
382 rv = (*p->e_func)(clientp);
383 return (exit_daemon_cmd(clientp, rv));
390 rv = (*p->e_func)(clientp);
392 return (exit_daemon_cmd(clientp, rv));
411 vntsd_telnet_cmd(vntsd_client_t *clientp, char c)
424 if ((rv = vntsd_read_char(clientp, &cmd)) != VNTSD_SUCCESS) {
430 if ((rv = vntsd_read_char(clientp, &c)) != VNTSD_SUCCESS) {
469 rv = vntsd_write_client(clientp, (char *)buf, 3);
476 rv = genbrk(clientp);
486 rv = vntsd_write_client(clientp, aytresp,
513 vntsd_ctrl_cmd(vntsd_client_t *clientp, char c)
518 clientp->cons->vcc_fd, clientp->sockfd);
531 if (ioctl(clientp->cons->vcc_fd, TCXONC, &cmd)) {
543 if (ioctl(clientp->cons->vcc_fd, TCXONC, &cmd)) {