+ if (strcmp(type, "net") == 0) {
+ net = getnetbyname(dname);
+ if (net == 0 || net->n_addrtype != AF_INET)
+ continue;
+ dst.sin_addr = inet_makeaddr(net->n_net, INADDR_ANY);
+ } else if (strcmp(type, "host") == 0) {
+ host = gethostbyname(dname);
+ if (host == 0)
+ continue;
+ bcopy(host->h_addr, &dst.sin_addr, host->h_length);
+ } else
+ continue;
+ host = gethostbyname(gname);
+ if (host == 0)
+ continue;
+ bcopy(host->h_addr, &gate.sin_addr, host->h_length);