Home | History | Annotate | Download | only in qemu

Lines Matching refs:port

44             .name = "port",
82 static void inet_setport(struct addrinfo *e, int port)
90 i6->sin6_port = htons(port);
94 i4->sin_port = htons(port);
119 fprintf(stderr,"%s: getaddrinfo: family %s, host %s, port %s\n",
128 char port[33];
146 (qemu_opt_get(opts, "port") == NULL)) {
147 fprintf(stderr, "%s: host and/or port not specified\n", __FUNCTION__);
150 pstrcpy(port, sizeof(port), qemu_opt_get(opts, "port"));
161 snprintf(port, sizeof(port), "%d", atoi(port) + port_offset);
162 rc = getaddrinfo(strlen(addr) ? addr : NULL, port, &ai, &res);
164 fprintf(stderr,"getaddrinfo(%s,%s): %s\n", addr, port,
225 qemu_opt_set(opts, "port", uport);
236 const char *port;
254 port = qemu_opt_get(opts, "port");
255 if (addr == NULL || port == NULL) {
256 fprintf(stderr, "inet_connect: host and/or port not specified\n");
266 if (0 != (rc = getaddrinfo(addr, port, &ai, &res))) {
267 fprintf(stderr,"getaddrinfo(%s,%s): %s\n", addr, port,
313 const char *port;
325 port = qemu_opt_get(opts, "port");
329 if (port == NULL || strlen(port) == 0) {
330 fprintf(stderr, "inet_dgram: port not specified\n");
339 if (0 != (rc = getaddrinfo(addr, port, &ai, &peer))) {
340 fprintf(stderr,"getaddrinfo(%s,%s): %s\n", addr, port,
345 fprintf(stderr, "%s: peer (%s:%s)\n", __FUNCTION__, addr, port);
356 port = qemu_opt_get(opts, "localport");
360 if (!port || strlen(port) == 0)
361 port = "0";
363 if (0 != (rc = getaddrinfo(addr, port, &ai, &local))) {
364 fprintf(stderr,"getaddrinfo(%s,%s): %s\n", addr, port,
369 fprintf(stderr, "%s: local (%s:%s)\n", __FUNCTION__, addr, port);
428 char port[33];
435 if (1 != sscanf(str,":%32[^,]%n",port,&pos)) {
442 if (2 != sscanf(str,"[%64[^]]]:%32[^,]%n",addr,port,&pos)) {
450 if (2 != sscanf(str,"%64[0-9.]:%32[^,]%n",addr,port,&pos)) {
458 if (2 != sscanf(str,"%64[^:]:%32[^,]%n",addr,port,&pos)) {
465 qemu_opt_set(opts, "port", port);
513 qemu_opt_get(opts, "port"),
518 qemu_opt_get(opts, "port"),