summaryrefslogtreecommitdiff
path: root/net/tcpview/files/patch-tv__addrtoname.c
blob: 0e90afb30d6ddbf59c5274d4f0f967509f4cf9dc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
--- tv_addrtoname.c.orig	1993-04-22 20:40:35 UTC
+++ tv_addrtoname.c
@@ -110,6 +110,7 @@ struct ipproto {
   u_short p;
 };
 
+#define IPPROTO_HELLO           63              /* "hello" routing protocol */
 struct ipproto ipproto_db[] = {
   { "IP", IPPROTO_IP },
   { "ICMP", IPPROTO_ICMP },
@@ -307,7 +308,7 @@ intoa(addr)
 	register int n;
 	static char buf[sizeof(".xxx.xxx.xxx.xxx")];
 
-	NTOHL(addr);
+	ntohl(addr);
 	cp = &buf[sizeof buf];
 	*--cp = '\0';
 
@@ -643,7 +644,7 @@ int flag;
   static char buffer[8];
   char *cp;
 
-  NTOHS(port); 
+  ntohs(port); 
 
   if (!(flag&ADDR_NUMERICAL)) {
     for(i=0;eproto_db[i].s;i++) {
@@ -668,7 +669,7 @@ u_short pro;
 {
   int i;
 
-/*  NTOHS(pro); */
+/*  ntohs(pro); */
   
   for(i=0;ipproto_db[i].s;i++) {
     if (ipproto_db[i].p == pro)
@@ -750,7 +751,7 @@ init_servarray()
   register struct hnamemem *table;
   
   while (sv = GetServent()) {
-    NTOHS(sv->s_port);
+    ntohs(sv->s_port);
     if (strcmp(sv->s_proto, "tcp") == 0) {
       table = lookup_port(sv->s_port,LOOKUP_TCP);
     } else if (strcmp(sv->s_proto, "udp") == 0) {