+short ns_bh[] = {-1,-1,-1};
+
+char *
+ns_print(sns)
+struct sockaddr_ns *sns;
+{
+ register struct ns_addr *dna = &sns->sns_addr;
+ long net = ntohl(ns_netof(*dna));
+ static char mybuf[50];
+ register char *p = mybuf;
+ short port = dna->x_port;
+
+ sprintf(p,"%ld:", net);
+
+ while(*p)p++; /* find end of string */
+
+ if (strncmp(ns_bh,dna->x_host.c_host,6)==0)
+ sprintf(p,"any");
+ else
+ sprintf(p,"%x.%x.%x.%x.%x.%x",
+ dna->x_host.c_host[0], dna->x_host.c_host[1],
+ dna->x_host.c_host[2], dna->x_host.c_host[3],
+ dna->x_host.c_host[4], dna->x_host.c_host[5]);
+ if (port) {
+ while(*p)p++; /* find end of string */
+ printf(":%d",port);
+ }
+ return(mybuf);
+}
+char *
+ns_phost(sns)
+struct sockaddr_ns *sns;
+{
+ register struct ns_addr *dna = &sns->sns_addr;
+ long net = ntohl(ns_netof(*dna));
+ static char mybuf[50];
+ register char *p = mybuf;
+ if (strncmp(ns_bh,dna->x_host.c_host,6)==0)
+ sprintf(p,"any");
+ else
+ sprintf(p,"%x,%x,%x",
+ dna->x_host.s_host[0], dna->x_host.s_host[1],
+ dna->x_host.s_host[2]);
+ return(mybuf);
+}