aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/ngsniffer.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-01-31 01:02:14 +0000
committerGuy Harris <guy@alum.mit.edu>2003-01-31 01:02:14 +0000
commitf88816e60f1f14f2662c20740db6ecf3764e82b6 (patch)
tree4fc64f4ea929901c9f1cc62467bfce72435baa2b /wiretap/ngsniffer.c
parent1c898c8a11d0d008719d2d563b65d7c362e530ce (diff)
Add WTAP_ENCAP_FRELAY_WITH_PHDR for use with Frame Relay capture files
that have direction information. Support writing WTAP_ENCAP_FRELAY_WITH_PHDR and WTAP_ENCAP_PPP_WITH_PHDR captures out in libpcap format - we throw away the direction information, but so it goes. When reading/writing Windows Sniffer format, read and write the direction flag. svn path=/trunk/; revision=7052
Diffstat (limited to 'wiretap/ngsniffer.c')
-rw-r--r--wiretap/ngsniffer.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/wiretap/ngsniffer.c b/wiretap/ngsniffer.c
index 40bd388e5d..33e336912d 100644
--- a/wiretap/ngsniffer.c
+++ b/wiretap/ngsniffer.c
@@ -1,6 +1,6 @@
/* ngsniffer.c
*
- * $Id: ngsniffer.c,v 1.108 2003/01/14 19:52:47 guy Exp $
+ * $Id: ngsniffer.c,v 1.109 2003/01/31 01:02:09 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
@@ -546,7 +546,7 @@ int ngsniffer_open(wtap *wth, int *err)
* one we've seen is a Frame Relay capture,
* so mark it as Frame Relay for now.
*/
- wth->file_encap = WTAP_ENCAP_FRELAY;
+ wth->file_encap = WTAP_ENCAP_FRELAY_WITH_PHDR;
break;
}
}
@@ -830,7 +830,7 @@ process_rec_header2_v145(wtap *wth, unsigned char *buffer, guint16 length,
break;
case NET_FRAME_RELAY:
- wth->file_encap = WTAP_ENCAP_FRELAY;
+ wth->file_encap = WTAP_ENCAP_FRELAY_WITH_PHDR;
break;
case NET_ROUTER:
@@ -1255,7 +1255,7 @@ static void set_pseudo_header_frame2(wtap *wth,
break;
case WTAP_ENCAP_LAPB:
- case WTAP_ENCAP_FRELAY:
+ case WTAP_ENCAP_FRELAY_WITH_PHDR:
case WTAP_ENCAP_PER_PACKET:
pseudo_header->x25.flags = (frame2->fs & 0x80) ? 0x00 : FROM_DCE;
break;
@@ -1632,7 +1632,7 @@ static int infer_pkt_encap(const guint8 *pd, int len)
* file, where we might just not yet have found where
* the subtype is specified in the capture?
*/
- return WTAP_ENCAP_FRELAY;
+ return WTAP_ENCAP_FRELAY_WITH_PHDR;
}
if (len >= 2) {