diff options
author | Guy Harris <guy@alum.mit.edu> | 2010-06-06 19:37:49 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2010-06-06 19:37:49 +0000 |
commit | ae3049a04fd414e086f48906024a3e5a88f25438 (patch) | |
tree | 0f2c858ce008dd9d4623f3f32ecd4d5d58134d0f /wiretap/wtap-int.h | |
parent | 1bf478fdef0992236d338ee0158fbcdd2e69007a (diff) |
Move the seekback stuff out of esc_read() to the one place where it's
done.
Use the wtap_dump_file_ routines to write out capture files, and check
for errors.
Use the phton macros, when available, to translate to big-endian byte
order. Add a new phton24() macro.
Clean up indentation.
svn path=/trunk/; revision=33114
Diffstat (limited to 'wiretap/wtap-int.h')
-rw-r--r-- | wiretap/wtap-int.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/wiretap/wtap-int.h b/wiretap/wtap-int.h index a8867b49b8..361b57a819 100644 --- a/wiretap/wtap-int.h +++ b/wiretap/wtap-int.h @@ -247,6 +247,15 @@ extern gint wtap_num_file_types; } #endif +#ifndef phton24 +#define phton24(p, v) \ + { \ + (p)[0] = (guint8)((v) >> 16); \ + (p)[1] = (guint8)((v) >> 8); \ + (p)[2] = (guint8)((v) >> 0); \ + } +#endif + #ifndef phtonl #define phtonl(p, v) \ { \ |