SCCS-vsn: usr.bin/netstat/inet.c 4.2
SCCS-vsn: usr.bin/netstat/route.c 4.2
-static char sccsid[] = "@(#)inet.c 4.1 82/08/25";
+static char sccsid[] = "@(#)inet.c 4.2 82/10/05";
#endif
#include <sys/types.h>
#endif
#include <sys/types.h>
port = ntohs((u_short)port);
#endif
if (!nflag && port)
port = ntohs((u_short)port);
#endif
if (!nflag && port)
- sp = getservport(port, proto);
+ sp = getservbyport(port, proto);
if (sp || port == 0)
sprintf(cp, "%.8s", sp ? sp->s_name : "*");
else
if (sp || port == 0)
sprintf(cp, "%.8s", sp ? sp->s_name : "*");
else
if (!nflag) {
if (in_lnaof(in) == INADDR_ANY) {
if (!nflag) {
if (in_lnaof(in) == INADDR_ANY) {
- struct netent *np = getnetaddr(in_netof(in));
+ struct netent *np = getnetbyaddr(in_netof(in));
if (np)
cp = np->n_name;
} else {
if (np)
cp = np->n_name;
} else {
- struct hostent *hp = gethostaddr(in.s_addr);
+ hp = gethostbyaddr(&in, sizeof (struct in_addr));
if (hp)
cp = hp->h_name;
}
if (hp)
cp = hp->h_name;
}
-static char sccsid[] = "@(#)route.c 4.1 82/08/25";
+static char sccsid[] = "@(#)route.c 4.2 82/10/05";
#endif
#include <sys/types.h>
#endif
#include <sys/types.h>
lna = in_lnaof(in);
if (!nflag) {
if (lna == INADDR_ANY) {
lna = in_lnaof(in);
if (!nflag) {
if (lna == INADDR_ANY) {
- struct netent *np = getnetaddr(net);
+ struct netent *np = getnetbyaddr(net);
if (np)
cp = np->n_name;
} else {
if (np)
cp = np->n_name;
} else {
- struct hostent *hp = gethostaddr(in.s_addr);
+ hp = gethostbyaddr(&in, sizeof (struct in_addr));
if (hp)
cp = hp->h_name;
}
if (hp)
cp = hp->h_name;
}