summaryrefslogtreecommitdiff
path: root/wiretap/visual.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2007-11-25 00:23:37 +0000
committerGuy Harris <guy@alum.mit.edu>2007-11-25 00:23:37 +0000
commit1304dbf5f69a0f4e67dfd4aeec8e85a1d80a714a (patch)
tree77f4719a5e92f65d80c730f09b00b1c208f38748 /wiretap/visual.c
parent6a97eaebfddbc46981486840a2939364be071a55 (diff)
downloadwireshark-1304dbf5f69a0f4e67dfd4aeec8e85a1d80a714a.tar.gz
Note that the encapsulation type values are SNMP ifType values, and
suggest that perhaps WTAP_ENCAP_PER_PACKET be used for propPointToPointSerial and HDLC. svn path=/trunk/; revision=23575
Diffstat (limited to 'wiretap/visual.c')
-rw-r--r--wiretap/visual.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/wiretap/visual.c b/wiretap/visual.c
index ae214d07c1..2df4ab0078 100644
--- a/wiretap/visual.c
+++ b/wiretap/visual.c
@@ -220,33 +220,38 @@ int visual_open(wtap *wth, int *err, gchar **err_info)
return -1;
}
- /* Translate the encapsulation type. Note that a file with media
- type 22 may contain Cisco HDLC or PPP over HDLC. This will
- get sorted out after the first packet is read. */
+ /* Translate the encapsulation type; these values are SNMP ifType
+ values, as found in http://www.iana.org/assignments/smi-numbers.
+
+ Note that a file with media type 22 ("propPointToPointSerial") may
+ contain Cisco HDLC or PPP over HDLC. This will get sorted out after
+ the first packet is read.
+
+ XXX - should we use WTAP_ENCAP_PER_PACKET for that? */
switch (pletohs(&vfile_hdr.media_type))
{
- case 6:
+ case 6: /* ethernet-csmacd */
encap = WTAP_ENCAP_ETHERNET;
break;
- case 9:
+ case 9: /* IEEE802.5 */
encap = WTAP_ENCAP_TOKEN_RING;
break;
- case 16:
+ case 16: /* lapb */
encap = WTAP_ENCAP_LAPB;
break;
- case 22:
- case 118:
+ case 22: /* propPointToPointSerial */
+ case 118: /* HDLC */
encap = WTAP_ENCAP_CHDLC_WITH_PHDR;
break;
- case 32:
+ case 32: /* frame-relay */
encap = WTAP_ENCAP_FRELAY_WITH_PHDR;
break;
- case 37:
+ case 37: /* ATM */
encap = WTAP_ENCAP_ATM_PDUS;
break;