Lines Matching refs:nb
343 struct netbuf *nb = NULL;
393 struct netbuf *nb;
398 nb = &(tbind->addr);
404 nb->len = nb->maxlen = sizeof (struct sockaddr_in6);
408 nb->len = nb->maxlen = sizeof (struct sockaddr_in);
417 nb->buf = (char *)calloc(1, nb->maxlen);
418 if (nb->buf == NULL) {
425 nb->buf[j+4] = hp->h_addr[j];
427 ((struct sockaddr_in *)(nb->buf))->sin_port = port;
429 ((struct sockaddr_in *)(nb->buf))->sin_family = AF_INET;
432 nb->buf[j+8] = hp->h_addr[j];
434 ((struct sockaddr_in6 *)(nb->buf))->sin6_port = port;
436 ((struct sockaddr_in6 *)(nb->buf))->sin6_family =
450 nb->len = nb->maxlen = sizeof (struct sockaddr_in);
451 nb->buf = (char *)calloc(1, nb->maxlen);
452 if (nb->buf == NULL) {
454 free(nb);
455 nb = NULL;
460 nb->buf[j+4] = hp->h_addr[j];
463 ((struct sockaddr_in *)(nb->buf))->sin_port = port;
464 ((struct sockaddr_in *)(nb->buf))->sin_family = AF_INET;
472 nb = (struct netbuf *)calloc(1, sizeof (*nb));
473 if (nb == NULL) {
478 *nb = tbind->addr; /* structure copy */
480 nb->buf = (char *)calloc(1, nb->maxlen);
481 if (nb->buf == NULL) {
483 free(nb);
484 nb = NULL;
488 (void) memcpy(nb->buf, tbind->addr.buf, tbind->addr.len);
508 return (nb);
529 struct netbuf *nb = NULL;
588 if ((nb = get_the_addr(hostname, prog, vers, nconf, port,
625 if ((nb = get_the_addr(hostname, prog, vers, nconf,
635 if ((nb->len == 8) &&
640 free(nb);
648 * Got nconf and nb. Now dup the netconfig structure (nconf)
654 free(nb);
655 nb = NULL;
660 return (nb);