arcdump.c
资源名称:export.zip [点击查看]
上传用户:hepax88
上传日期:2007-01-03
资源大小:1101k
文件大小:1k
源码类别:
TCP/IP协议栈
开发平台:
Visual C++
- /* ARCNET trace routines
- * Copyright 1990 Russ Nelson
- */
- #include <stdio.h>
- #include "global.h"
- #include "mbuf.h"
- #include "arcnet.h"
- #include "trace.h"
- void
- arc_dump(fp,bpp,check)
- FILE *fp;
- struct mbuf **bpp;
- int check; /* Not used */
- {
- struct arc ahdr;
- char s[20],d[20];
- ntoharc(&ahdr,bpp);
- parc(s,ahdr.source);
- parc(d,ahdr.dest);
- fprintf(fp,"Arcnet: len %u %s->%s",ARCLEN + len_p(*bpp),s,d);
- switch(ahdr.type){
- case ARC_IP:
- fprintf(fp," type IPn");
- ip_dump(fp,bpp,1);
- break;
- case ARC_ARP:
- fprintf(fp," type ARPn");
- arp_dump(fp,bpp);
- break;
- default:
- fprintf(fp," type 0x%xn",ahdr.type);
- break;
- }
- }
- int
- arc_forus(iface,bp)
- struct iface *iface;
- struct mbuf *bp;
- {
- return 1;
- }