[Click] how to determine click version
Marco Canini
marco at reti.dist.unige.it
Fri Oct 31 08:09:54 EDT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Bart,
this is how I intend to use the versioning:
#ifndef CLICK_MAKE_VERSION_CODE
# define CLICK_MAKE_VERSION_CODE(a,b,c) (((a)<<16) | ((b)<<8) | (c))
#endif
#if CLICK_VERSION_CODE >= CLICK_MAKE_VERSION_CODE(1, 6, 9)
/* new annotation API */
# ifndef HAVE_INT64_IS_LONG
# define FLOW_INFO_ANNO(p) ((p)->anno_u32(4))
# define SET_FLOW_INFO_ANNO(p, v) ((p)->set_anno_u32(4, (v)))
# else
# define FLOW_INFO_ANNO(p) ((p)->anno_u64(4))
# define SET_FLOW_INFO_ANNO(p, v) ((p)->set_anno_u64(4, (v)))
# endif
#else
/* old annotation API */
# ifndef HAVE_INT64_IS_LONG
# define FLOW_INFO_ANNO(p) ((p)->user_anno_u32(4))
# define SET_FLOW_INFO_ANNO(p, v) ((p)->set_user_anno_u32(4, (v)))
# else
# define FLOW_INFO_ANNO(p) ((((uint64_t) (p)->user_anno_u32(4)) <<
32) | ((uint64_t) (p)->user_anno_u32(5)))
# define SET_FLOW_INFO_ANNO(p, v) do { (p)->set_user_anno_u32(4,
(uint32_t) (v >> 32)); (p)->set_user_anno_u32(5, (uint32_t) (v &
0xffffffff)); } while (0)
# endif
#endif
fundamentally I need FLOW_INFO_ANNO and SET_FLOW_INFO_ANNO to just work.
cheers
Bart Braem wrote:
> On 29 Oct 2008, at 20:55, Marco Canini wrote:
>
>> the reason I was looking for it is that I want to use the new (kind
>> of)
>> annotation functions.
>
>
> We were also looking into new annotation possibilities a while ago, so
> it would be very nice if you could share your ideas.
>
> Regards,
> Bart
- --
Marco Canini
Ph.D. Candidate
Department of Communication, Computer and System Sciences
University of Genoa
Via all'Opera Pia 13
16145 Genoa Italy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
iD8DBQFJCvWSK52QDm/mFCkRAj6pAKC//rZQ22OAhH6KNTkcvRSxVg4vzwCfchjt
gu4xI/GL/v4b/InsoiYKSHM=
=BIea
-----END PGP SIGNATURE-----
More information about the click
mailing list