diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-08-22 00:31:58 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-08-22 00:31:58 +0000 |
commit | c68f62210fc20890502cb84dbc2ea4321de5b791 (patch) | |
tree | d7311a179eacd5a137e9e874b3bf2d0e15377de6 /epan/pint.h | |
parent | 9dcb077e460619b8ab54810e4fef850a0799bcde (diff) |
Add "tvb_get_ntoh64()" and "tvb_get_letoh64()" routines to fetch 64-bit
integers.
Make FT_INT64 and FT_UINT64 add numerical values, rather than byte-array
values, to the protocol tree, and add routines to add specified 64-bit
integer values to the protocol tree.
Use those routines in the RSVP dissector.
svn path=/trunk/; revision=11796
Diffstat (limited to 'epan/pint.h')
-rw-r--r-- | epan/pint.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/epan/pint.h b/epan/pint.h index 8e1f5e05f3..400cd8d7eb 100644 --- a/epan/pint.h +++ b/epan/pint.h @@ -46,6 +46,14 @@ (guint32)*((const guint8 *)(p)+1)<<16| \ (guint32)*((const guint8 *)(p)+2)<<8| \ (guint32)*((const guint8 *)(p)+3)<<0) +#define pntoh64(p) ((guint64)*((const guint8 *)(p)+0)<<56| \ + (guint64)*((const guint8 *)(p)+1)<<48| \ + (guint64)*((const guint8 *)(p)+2)<<40| \ + (guint64)*((const guint8 *)(p)+3)<<32| \ + (guint64)*((const guint8 *)(p)+4)<<24| \ + (guint64)*((const guint8 *)(p)+5)<<16| \ + (guint64)*((const guint8 *)(p)+6)<<8| \ + (guint64)*((const guint8 *)(p)+7)<<0) #define pletohs(p) ((guint16) \ @@ -60,6 +68,14 @@ (guint32)*((const guint8 *)(p)+2)<<16| \ (guint32)*((const guint8 *)(p)+1)<<8| \ (guint32)*((const guint8 *)(p)+0)<<0) +#define pletoh64(p) ((guint64)*((const guint8 *)(p)+7)<<56| \ + (guint64)*((const guint8 *)(p)+6)<<48| \ + (guint64)*((const guint8 *)(p)+5)<<40| \ + (guint64)*((const guint8 *)(p)+4)<<32| \ + (guint64)*((const guint8 *)(p)+3)<<24| \ + (guint64)*((const guint8 *)(p)+2)<<16| \ + (guint64)*((const guint8 *)(p)+1)<<8| \ + (guint64)*((const guint8 *)(p)+0)<<0) |