Lines Matching +full:num +full:- +full:rows

22  * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
90 return (-1); in ipmi_tsol_command()
106 rsp = intf->sendrecv(intf, &req); in ipmi_tsol_command()
109 return (-1); in ipmi_tsol_command()
111 if (rsp->ccode > 0) { in ipmi_tsol_command()
113 val2str(rsp->ccode, completion_code_vals)); in ipmi_tsol_command()
114 return (-1); in ipmi_tsol_command()
150 rsp = intf->sendrecv(intf, &req); in ipmi_tsol_send_keystroke()
154 return -1; in ipmi_tsol_send_keystroke()
156 if (rsp->ccode > 0) { in ipmi_tsol_send_keystroke()
158 val2str(rsp->ccode, completion_code_vals)); in ipmi_tsol_send_keystroke()
159 return -1; in ipmi_tsol_send_keystroke()
170 if (end.tv_sec - _start_keepalive.tv_sec <= 30) { in tsol_keepalive()
173 intf->keepalive(intf); in tsol_keepalive()
182 " %c. - terminate connection\n" in print_escape_seq()
183 " %c^Z - suspend ipmitool\n" in print_escape_seq()
184 " %c^X - suspend ipmitool, but don't restore tty on restart\n" in print_escape_seq()
185 " %c? - this message\n" in print_escape_seq()
186 " %c%c - send the escape character by typing it twice\n" in print_escape_seq()
188 intf->ssn_params.sol_escape_char, in print_escape_seq()
189 intf->ssn_params.sol_escape_char, in print_escape_seq()
190 intf->ssn_params.sol_escape_char, in print_escape_seq()
191 intf->ssn_params.sol_escape_char, in print_escape_seq()
192 intf->ssn_params.sol_escape_char, in print_escape_seq()
193 intf->ssn_params.sol_escape_char); in print_escape_seq()
200 return -1; in leave_raw_mode()
201 } else if (tcsetattr(fileno(stdin), TCSADRAIN, &_saved_tio) == -1) { in leave_raw_mode()
203 } else if (tcsetattr(fileno(stdout), TCSADRAIN, &_saved_tio) == -1) { in leave_raw_mode()
217 return -1; in enter_raw_mode()
267 (in_buff[i] == intf->ssn_params.sol_escape_char)) { in do_inbuf_actions()
269 memmove(in_buff, in_buff + 1, len - i - 1); in do_inbuf_actions()
270 len--; in do_inbuf_actions()
275 if (in_buff[i] == intf->ssn_params.sol_escape_char) { in do_inbuf_actions()
284 intf->ssn_params.sol_escape_char); in do_inbuf_actions()
285 return -1; in do_inbuf_actions()
286 case 'Z' - 64: in do_inbuf_actions()
288 intf->ssn_params.sol_escape_char); in do_inbuf_actions()
292 case 'X' - 64: in do_inbuf_actions()
294 intf->ssn_params.sol_escape_char); in do_inbuf_actions()
300 intf->ssn_params.sol_escape_char); in do_inbuf_actions()
305 memmove(in_buff, (in_buff + 1), (len - i - 1)); in do_inbuf_actions()
306 len--; in do_inbuf_actions()
325 lprintf(LOG_ERR, "Exiting due to error %d -> %s", in do_terminal_cleanup()
331 set_terminal_size(int rows, int cols) in set_terminal_size() argument
334 if (rows <= 0 || cols <= 0) { in set_terminal_size()
340 winsize.ws_row = rows; in set_terminal_size()
350 "Usage: tsol [recvip] [port=NUM] [ro|rw] [rows=NUM] [cols=NUM] [altterm]"); in print_tsol_usage()
354 " port=NUM Receiver UDP Port [default=%d]", in print_tsol_usage()
357 " ro|rw Set Read-Only or Read-Write [default=rw]"); in print_tsol_usage()
360 " rows=NUM Set terminal rows [default=%d]", in print_tsol_usage()
363 " cols=NUM Set terminal columns [default=%d]", in print_tsol_usage()
382 int read_only = 0, rows = 0, cols = 0; in ipmi_tsol_main() local
385 if (strlen(intf->name) < 3 || strncmp(intf->name, "lan", 3) != 0) { in ipmi_tsol_main()
387 return (-1); in ipmi_tsol_main()
397 } else if (sscanf(argv[i], "rows=%d", &ip1) == 1) { in ipmi_tsol_main()
398 rows = ip1; in ipmi_tsol_main()
418 return (-1); in ipmi_tsol_main()
427 sa_in = (struct sockaddr_in *)&intf->session->addr; in ipmi_tsol_main()
428 result = inet_pton(AF_INET, (const char *)intf->ssn_params.hostname, in ipmi_tsol_main()
429 &sa_in->sin_addr); in ipmi_tsol_main()
432 struct hostent *host = gethostbyname((const char *)intf->ssn_params.hostname); in ipmi_tsol_main()
435 intf->ssn_params.hostname); in ipmi_tsol_main()
436 return -1; in ipmi_tsol_main()
438 if (host->h_addrtype != AF_INET) { in ipmi_tsol_main()
441 intf->ssn_params.hostname, in ipmi_tsol_main()
442 (host->h_addrtype == AF_INET6) ? "IPv6" : "Unknown"); in ipmi_tsol_main()
443 return (-1); in ipmi_tsol_main()
445 sa_in->sin_family = host->h_addrtype; in ipmi_tsol_main()
446 memcpy(&sa_in->sin_addr, host->h_addr_list[0], host->h_length); in ipmi_tsol_main()
452 return -1; in ipmi_tsol_main()
454 if (bind(fd_socket, (struct sockaddr *)&sin, sizeof(sin)) == (-1)) { in ipmi_tsol_main()
457 return -1; in ipmi_tsol_main()
465 result = intf->open(intf); in ipmi_tsol_main()
468 return -1; in ipmi_tsol_main()
472 if (getsockname(intf->fd, (struct sockaddr *)&myaddr, &mylen) < 0) { in ipmi_tsol_main()
475 return -1; in ipmi_tsol_main()
482 return -1; in ipmi_tsol_main()
487 read_only ? "Read-only " : "", recvip, port); in ipmi_tsol_main()
489 set_terminal_size(rows, cols); in ipmi_tsol_main()
493 * talk to smdc to start Console redirect - IP address and port as parameter in ipmi_tsol_main()
494 * ipmitool -I lan -H 192.168.168.227 -U Administrator raw 0x30 0x06 0xC0 0xA8 0xA8 0x78 0x1A 0x0A in ipmi_tsol_main()
500 return (-1); in ipmi_tsol_main()
504 intf->ssn_params.sol_escape_char); in ipmi_tsol_main()
514 fds_wait[2].fd = -1; in ipmi_tsol_main()
543 if ((sizeof(out_buff) - out_buff_fill + 4) < buff_size) { in ipmi_tsol_main()
544 buff_size = (sizeof(out_buff) - out_buff_fill) + 4; in ipmi_tsol_main()
545 if ((buff_size - 4) <= 0) { in ipmi_tsol_main()
555 if ((result - 4) > 0) { in ipmi_tsol_main()
556 int length = result - 4; in ipmi_tsol_main()
564 sizeof(in_buff) - in_buff_fill); in ipmi_tsol_main()
584 out_buff_fill -= result; in ipmi_tsol_main()
593 * ipmitool -I lan -H 192.168.168.227 -U Administrator raw 0x30 0x03 0x04 0x1B 0x5B 0x43 in ipmi_tsol_main()
599 in_buff_fill -= result; in ipmi_tsol_main()