-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathARCDUMP.C
48 lines (44 loc) · 1009 Bytes
/
ARCDUMP.C
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
47
48
/* ARCNET trace routines
* Copyright 1990 Russ Nelson
*/
/* Tracing to sockets, mods April '95 by Johan. K. Reinalda, WG7J */
#include "global.h"
#ifdef ARCNET
#include "mbuf.h"
#include "arcnet.h"
#include "trace.h"
#include "socket.h"
void
arc_dump(s,bpp,check)
int s;
struct mbuf **bpp;
int check; /* Not used */
{
struct arc ahdr;
char src[20],d[20];
ntoharc(&ahdr,bpp);
parc(src,ahdr.source);
parc(d,ahdr.dest);
usprintf(s,"Arcnet: len %u %s->%s",ARCLEN + len_p(*bpp),src,d);
switch(uchar(ahdr.type)){
case ARC_IP:
usprintf(s," type IP\n");
ip_dump(s,bpp,1);
break;
case ARC_ARP:
usprintf(s," type ARP\n");
arp_dump(s,bpp);
break;
default:
usprintf(s," type 0x%x\n",ahdr.type);
break;
}
}
int
arc_forus(iface,bp)
struct iface *iface;
struct mbuf *bp;
{
return 1;
}
#endif /* ARCNET */