Hi Lalith, This change looks generally good, but surely ns defines some version variables that we can use to detect whether "cursimnode->curtime" is a timespec or a timeval. If it doesn't, then please add one: #define NS_CURTIME_IS_TIMESPEC 1. Then Click can be made to work cleanly with either, for instance:
#if NS_CURTIME_IS_TIMESPEC *ts = cursimnode->curtime; #else ts->tv_sec = cursimnode->curtime.tv_sec; ts->tv_nsec = cursimnode->curtime.tv_usec * 1000; #endif The timer scheduling code in routerthread.cc would also need a fork: #if CLICK_NS && NS_CURTIME_IS_TIMESPEC /timespec-code/ #elif CLICK_NS /timeval-code/ #endif. Make sense? Sascha, did you end up trying this? Eddie On 12/31/11 7:46 AM, Lalith Suresh wrote: > Hello all, > > After Sascha raised this issue on the ns-3-users list [1], I tried > making a quick patch to make Click's NS code use timespec, and make > the corresponding changes on the ns-3 side as well. > > I've pushed the changes to my ns-3-click [2] and Click [3] > repositories. Kindly review. I'll push to ns-3-dev once the Click side > changes are applied. Note that this will probably break the ns-2 > patches for nsclick. > > > [1] > http://groups.google.com/group/ns-3-users/browse_thread/thread/2be8d60531bd82a8 > [2] http://code.nsnam.org/lalith/ns-3-click-dev > [3] https://github.com/lalithsuresh/click > _______________________________________________ click mailing list [email protected] https://amsterdam.lcs.mit.edu/mailman/listinfo/click
