Lines Matching refs:port

86 #define IS_CONSOLE(p)	((p)->port == DCONS_CON)
87 #define IS_GDB(p) ((p)->port == DCONS_GDB)
109 int port;
120 } port[DCONS_NPORT];
196 p = &sc.port[DCONS_CON];
228 dc->port[DCONS_GDB].sport);
400 o = &dc->port[j].o;
412 i = &dc->port[j].i;
419 printf("port %d size offset gen pos\n", j);
431 if (IS_CONSOLE(&dc->port[j]) && new &&
470 dc->port[i].optr = ntohl(ptr[i + 1]);
471 dc->port[i].iptr = ntohl(ptr[DCONS_NPORT + i + 1]);
478 dconschat_read_dcons(struct dcons_state *dc, int port, char *buf, int len)
485 ch = &dc->port[port].o;
486 ptr = dc->port[port].optr;
556 dconschat_write_dcons(struct dcons_state *dc, int port, char *buf, int blen)
563 ch = &dc->port[port].i;
564 ptr = dc->port[port].iptr;
594 dc->port[port].iptr = ptr;
600 dc->paddr + __offsetof(struct dcons_buf, iptr[port]));
624 dconschat_init_socket(struct dcons_state *dc, int port, char *host, int sport)
632 p = &dc->port[port];
633 p->port = port;
670 printf("%s:%d for port %d\n",
671 host == NULL ? "*" : host, sport, port);
707 printf("port%d accepted\n", p->port);
726 /* discard backlog on GDB port */
734 printf("discard %d chars on GDB port\n", len);
857 dconschat_write_dcons(dc, p->port, wbuf, wlen);
869 warnx("port%d: closed", p->port);
871 warn("port%d: read", p->port);
910 int port, len, err;
919 for (port = 0; port < DCONS_NPORT; port ++) {
920 p = &dc->port[port];
923 while ((len = dconschat_read_dcons(dc, port, buf,
972 "usage: dconschat [-brvwRT1] [-h hz] [-C port] [-G port]\n"
975 "\t-b translate ctrl-C to CR+~+ctrl-B on gdb port\n"
980 "\t-T enable Telnet protocol workaround on console port\n"
983 "\t-C port number for console port\n"
984 "\t-G port number for gdb port\n"
1004 int port[DCONS_NPORT];
1011 port[0] = 0; /* stdin/out for console */
1012 port[1] = -1; /* disable gdb port */
1055 port[0] = strtol(optarg, NULL, 0);
1058 port[1] = strtol(optarg, NULL, 0);
1084 if (port[0] < 0 && port[1] < 0) {
1085 warnx("no port specified");
1149 wildcard ? NULL : "localhost", port[i]);
1154 freeaddrinfo(dc->port[i].res);