Commit 37a156ff authored by Kevin Bracey's avatar Kevin Bracey
Browse files

Tweaks for latest Internet/TCPIPLibs.

InetStat can now tell which ports are dynamically assigned and doesn't attempt
to look up their names.
parent 69ba00f5
...@@ -221,7 +221,7 @@ set(argc, argv) ...@@ -221,7 +221,7 @@ set(argc, argv)
sizeof sin->sin_addr); sizeof sin->sin_addr);
} }
ea = (u_char *)LLADDR(&sdl_m); ea = (u_char *)LLADDR(&sdl_m);
if (ether_aton(eaddr, ea) == 0) if (my_ether_aton(eaddr, ea) == 0)
sdl_m.sdl_alen = 6; sdl_m.sdl_alen = 6;
doing_proxy = flags = export_only = expire_time = 0; doing_proxy = flags = export_only = expire_time = 0;
while (argc-- > 0) { while (argc-- > 0) {
...@@ -443,9 +443,8 @@ ether_print(cp) ...@@ -443,9 +443,8 @@ ether_print(cp)
printf("%x:%x:%x:%x:%x:%x", cp[0], cp[1], cp[2], cp[3], cp[4], cp[5]); printf("%x:%x:%x:%x:%x:%x", cp[0], cp[1], cp[2], cp[3], cp[4], cp[5]);
} }
ether_aton(a, n) int
char *a; my_ether_aton(char *a, u_char *n)
u_char *n;
{ {
int i, o[6]; int i, o[6];
......
...@@ -46,6 +46,7 @@ static char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94"; ...@@ -46,6 +46,7 @@ static char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94";
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <net/if.h> #include <net/if.h>
#include <net/if_var.h>
#include <net/if_dl.h> #include <net/if_dl.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <netinet/in_var.h> #include <netinet/in_var.h>
...@@ -103,7 +104,7 @@ int errvarflag; ...@@ -103,7 +104,7 @@ int errvarflag;
int setifflags(), setifaddr(), setifdstaddr(), setifnetmask(); int setifflags(), setifaddr(), setifdstaddr(), setifnetmask();
int setifmetric(), setifmtu(), setifbroadaddr(), setifipdst(); int setifmetric(), setifmtu(), setifbroadaddr(), setifipdst();
int notealias(), setsnpaoffset(), setnsellength(), notrailers(); int notealias(), setsnpaoffset(), setnsellength();
#ifdef __riscos #ifdef __riscos
char *gstrans(const char *s); char *gstrans(const char *s);
#endif #endif
...@@ -117,8 +118,6 @@ struct cmd { ...@@ -117,8 +118,6 @@ struct cmd {
} cmds[] = { } cmds[] = {
{ "up", IFF_UP, setifflags } , { "up", IFF_UP, setifflags } ,
{ "down", -IFF_UP, setifflags }, { "down", -IFF_UP, setifflags },
{ "trailers", -1, notrailers },
{ "-trailers", 1, notrailers },
{ "arp", -IFF_NOARP, setifflags }, { "arp", -IFF_NOARP, setifflags },
{ "-arp", IFF_NOARP, setifflags }, { "-arp", IFF_NOARP, setifflags },
{ "debug", IFF_DEBUG, setifflags }, { "debug", IFF_DEBUG, setifflags },
...@@ -469,14 +468,6 @@ notealias(addr, param) ...@@ -469,14 +468,6 @@ notealias(addr, param)
clearaddr = 0; clearaddr = 0;
} }
/*ARGSUSED*/
notrailers(vname, value)
char *vname;
int value;
{
printf("Note: trailers are no longer sent, but always received\n");
}
/*ARGSUSED*/ /*ARGSUSED*/
setifdstaddr(addr, param) setifdstaddr(addr, param)
char *addr; char *addr;
...@@ -531,8 +522,9 @@ setsnpaoffset(val) ...@@ -531,8 +522,9 @@ setsnpaoffset(val)
} }
#define IFFBITS \ #define IFFBITS \
"\020\1UP\2BROADCAST\3DEBUG\4LOOPBACK\5POINTOPOINT\6NOTRAILERS\7RUNNING\10NOARP\ "\020\1UP\2BROADCAST\3DEBUG\4LOOPBACK\5POINTOPOINT\6SMART\7RUNNING"\
\11PROMISC\12ALLMULTI\13OACTIVE\14SIMPLEX\15LINK0\16LINK1\17LINK2\20MULTICAST" "\10NOARP\11PROMISC\12ALLMULTI\13OACTIVE\14SIMPLEX\15LINK0\16LINK1\17LINK2"\
"\20MULTICAST"
/* /*
* Print the status of the interface. If an address family was * Print the status of the interface. If an address family was
......
...@@ -40,6 +40,7 @@ static char sccsid[] = "@(#)if.c 8.2 (Berkeley) 2/21/94"; ...@@ -40,6 +40,7 @@ static char sccsid[] = "@(#)if.c 8.2 (Berkeley) 2/21/94";
#include <sys/socket.h> #include <sys/socket.h>
#include <net/if.h> #include <net/if.h>
#include <net/if_var.h>
#include <net/if_dl.h> #include <net/if_dl.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <netinet/in_var.h> #include <netinet/in_var.h>
......
...@@ -102,6 +102,9 @@ protopr(off, name) ...@@ -102,6 +102,9 @@ protopr(off, name)
register struct inpcb *prev, *next; register struct inpcb *prev, *next;
int istcp; int istcp;
static int first = 1; static int first = 1;
#ifdef __riscos
struct inpcb *inp = &inpcb; /* Transitional hack */
#endif
if (off == 0) if (off == 0)
return; return;
...@@ -153,7 +156,6 @@ protopr(off, name) ...@@ -153,7 +156,6 @@ protopr(off, name)
} }
printf("%-5.5s %6ld %6ld ", name, sockb.so_rcv.sb_cc, printf("%-5.5s %6ld %6ld ", name, sockb.so_rcv.sb_cc,
sockb.so_snd.sb_cc); sockb.so_snd.sb_cc);
#if 0
if (nflag) { if (nflag) {
inetprint(&inp->inp_laddr, (int)inp->inp_lport, inetprint(&inp->inp_laddr, (int)inp->inp_lport,
name, 1); name, 1);
...@@ -170,10 +172,6 @@ protopr(off, name) ...@@ -170,10 +172,6 @@ protopr(off, name)
inetprint(&inp->inp_faddr, (int)inp->inp_fport, inetprint(&inp->inp_faddr, (int)inp->inp_fport,
name, inp->inp_lport != inp->inp_fport); name, inp->inp_lport != inp->inp_fport);
} }
#else
inetprint(&inpcb.inp_laddr, (int)inpcb.inp_lport, name, nflag);
inetprint(&inpcb.inp_faddr, (int)inpcb.inp_fport, name, nflag);
#endif
if (istcp) { if (istcp) {
if (tcpcb.t_state < 0 || tcpcb.t_state >= TCP_NSTATES) if (tcpcb.t_state < 0 || tcpcb.t_state >= TCP_NSTATES)
printf(" %d", tcpcb.t_state); printf(" %d", tcpcb.t_state);
......
...@@ -45,9 +45,7 @@ static const char rcsid[] = ...@@ -45,9 +45,7 @@ static const char rcsid[] =
#include <sys/time.h> #include <sys/time.h>
#include <net/if.h> #include <net/if.h>
#if 0
#include <net/if_var.h> #include <net/if_var.h>
#endif
#include <net/if_dl.h> #include <net/if_dl.h>
#include <net/if_types.h> #include <net/if_types.h>
#include <net/route.h> #include <net/route.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment