aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2006-11-07 09:12:30 +0000
committerGuy Harris <guy@alum.mit.edu>2006-11-07 09:12:30 +0000
commit8f3f19975d763de647e751256c7c51cc57d40b03 (patch)
tree781e0a3f9932994ac20ac26c9fa619c155bb54c0 /doc
parenta19025c3f6d93738b425ea02663cc0e400064fb4 (diff)
Add Yet Another Portability Recommendation.
svn path=/trunk/; revision=19855
Diffstat (limited to 'doc')
-rw-r--r--doc/README.developer8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/README.developer b/doc/README.developer
index 1cc73f4b46..14d0873fe3 100644
--- a/doc/README.developer
+++ b/doc/README.developer
@@ -201,6 +201,14 @@ Wireshark is running. Use the tvbuff routines to extract individual
items from the packet, or use "proto_tree_add_item()" and let it extract
the items for you.
+Don't use structures that overlay packet data, or into which you copy
+packet data; the C programming language does not guarantee any
+particular alignment of fields within a structure, and even the
+extensions that try to guarantee that are compiler-specific and not
+necessarily supported by all compilers used to build Wireshark. Using
+bitfields in those structures are even worse; the order of bitfields
+is not guaranteed.
+
Don't use "ntohs()", "ntohl()", "htons()", or "htonl()"; the header
files required to define or declare them differ between platforms, and
you might be able to get away with not including the appropriate header