[Bro-Dev] #761: 64bit types in binpac
Bro Tracker
bro at tracker.bro-ids.org
Mon Jan 30 14:42:06 PST 2012
#761: 64bit types in binpac
----------------------------+------------------------
Reporter: seth | Owner: robin
Type: Merge Request | Status: new
Priority: Normal | Milestone: Bro2.1
Component: Bro | Version: git/master
Resolution: | Keywords:
----------------------------+------------------------
Comment (by robin):
I'm trusting that these are correct ...
{{{
inline int64 pac_swap(int64 x)
{
return (x >> 56) |
((x & 0xff000000000000) >> 40) |
((x & 0xff0000000000) >> 24) |
((x & 0xff00000000) >> 8) |
((x & 0xff000000) << 8) |
((x & 0xff0000) << 24) |
((x & 0xff00) << 40) |
((x & 0xff) << 56);
}
inline uint64 pac_swap(uint64 x)
{
return (x >> 56) |
((x & 0xff000000000000) >> 40) |
((x & 0xff0000000000) >> 24) |
((x & 0xff00000000) >> 8) |
((x & 0xff000000) << 8) |
((x & 0xff0000) << 24) |
((x & 0xff00) << 40) |
((x & 0xff) << 56);
}
}}}
--
Ticket URL: <http://tracker.bro-ids.org/bro/ticket/761#comment:0>
Bro Tracker <http://tracker.bro-ids.org/bro>
Bro Issue Tracker
More information about the bro-dev
mailing list