aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/tcp_graph.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-12-10 23:27:25 +0000
committerGuy Harris <guy@alum.mit.edu>2001-12-10 23:27:25 +0000
commit975be62d24f53097ab97d3428dac11533a54a83a (patch)
tree39dd66dc42c47a1ab62d933219fcbfa5452f2a0d /gtk/tcp_graph.c
parentbe4179a86512e18944ffcfe7c37f366ebf2b975d (diff)
Put in a comment indicating that even loading a one-byte field from an
unaligned data structure could get an unaligned load fault on Alpha. svn path=/trunk/; revision=4381
Diffstat (limited to 'gtk/tcp_graph.c')
-rw-r--r--gtk/tcp_graph.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gtk/tcp_graph.c b/gtk/tcp_graph.c
index 0332f5b0f1..112b43abc1 100644
--- a/gtk/tcp_graph.c
+++ b/gtk/tcp_graph.c
@@ -3,7 +3,7 @@
* By Pavel Mores <pvl@uh.cz>
* Win32 port: rwh@unifiedtech.com
*
- * $Id: tcp_graph.c,v 1.7 2001/12/10 21:42:02 guy Exp $
+ * $Id: tcp_graph.c,v 1.8 2001/12/10 23:27:25 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1776,6 +1776,17 @@ static int get_headers (frame_data *fd, char *pd, struct segment *hdrs)
void *ip;
void *tcp;
+ /*
+ * XXX - on Alpha, even fetching one-byte fields from structures
+ * pointed to by unaligned pointers may be risky, as, unless
+ * the BWX instructions are being used, a one-byte load is done
+ * by loading the word containing the byte and then extracting
+ * the byte.
+ *
+ * This means that the references to "p->ppp_type" and
+ * "((struct iphdr *)ip)->protocol" may turn into a load of
+ * an unaligned word.
+ */
switch (fd->lnk_t) {
case WTAP_ENCAP_ETHERNET: