[Olsr-dev] [PATCH RFC v1 0/4] Smart Gateway dynamic bandwidth

Markus Kittenberger (spam-protected)
Tue May 15 11:19:22 CEST 2012


On Fri, May 11, 2012 at 1:24 AM, Hans-Christoph Steiner <
(spam-protected)> wrote:

>
> Mac OS X claims that defining _POSIX_C_SOURCE will give you:
>
>        time_t          st_mtime;       /* [XSI] Last data modification
> time */
>        long            st_mtimensec;   /* last data modification nsec */
>
> It seems that NetBSD agrees:
> http://www.daemon-systems.org/man/stat.2.html
>
> So it would be easy to add *BSD support it seems.
>

but to have actually use of this in bsd, we would need smart-gateway
support in bsd too!

which we tried last summer, but failed (ipip tunnels can`t be used that
creative in bsd as in linux)

Markus

>
> .hc
>
>
> On May 10, 2012, at 5:28 PM, Ferry Huberts wrote:
>
> > that's not the point
> > mtime is in _seconds_ accuracy.
> > a file can very easily change within a second...
> >
> > On 10-05-12 23:03, Hans-Christoph Steiner wrote:
> >>
> >> Given that it is highly unlikely that a file would change on a time
> scale less than 1ms, I think its safe to use the generic versions, at least
> on other platforms, no?  I think you need a special Linux kernel to get
> thread/process time slices with smaller than 1-2ms anyhow.
> >>
> >> .hc
> >>
> >> On May 10, 2012, at 3:49 PM, Ferry Huberts wrote:
> >>
> >>>
> >>> It's not a typo.
> >>> It appears that this is a linux extension: it provides nanosecond
> accuracy to stat system calls.
> >>>
> >>> On 10-05-12 21:05, Hans-Christoph Steiner wrote:
> >>>>
> >>>> Also, it looks like the Mac OS X build issue is actually caused by a
> typo in the code:
> >>>>
> >>>> src/gatewaySpeedFile.c: In function ‘readGatewaySpeedFile’:
> >>>> src/gatewaySpeedFile.c:124: error: ‘struct stat’ has no member named
> ‘st_mtim’
> >>>> src/gatewaySpeedFile.c:134: error: ‘struct stat’ has no member named
> ‘st_mtim’
> >>>> src/gatewaySpeedFile.c:134: error: ‘struct stat’ has no member named
> ‘st_mtim’
> >>>>
> >>>> I believe the struct element is called st_mtime not st_mtim.  Both
> Ubuntu and Mac OS X have stat.st_mtime, but I find no reference to
> stat.st_mtim.
> >>>>
> >>>> .hc
> >>>>
> >>>> On May 10, 2012, at 2:58 PM, Henning Rogge wrote:
> >>>>
> >>>>> At the moment the whole smart gateway system is linux only too... ;)
> >>>>>
> >>>>> Henning
> >>>>>
> >>>>> On Thu, May 10, 2012 at 8:54 PM, Ferry Huberts<(spam-protected)>
>   wrote:
> >>>>>>
> >>>>>>
> >>>>>> ok, then.
> >>>>>> Tomorrow I'll refactor it into a plugin but I'll make it linux only.
> >>>>>> It people want it on other platforms as well, they can make it build
> >>>>>> themselves ;-)
> >>>>>>
> >>>>>> On 10-05-12 20:46, Henning Rogge wrote:
> >>>>>>>
> >>>>>>> As they can with plugins... its not that it needs to be a
> linux-only
> >>>>>>> plugin.
> >>>>>>>
> >>>>>>> Henning
> >>>>>>>
> >>>>>>> On Thu, May 10, 2012 at 8:25 PM, Ferry Huberts<(spam-protected)>
>    wrote:
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> On 10-05-12 20:22, Henning Rogge wrote:
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> On Thu, May 10, 2012 at 7:17 PM, Ferry Huberts<
> (spam-protected)>
> >>>>>>>>>  wrote:
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> Thinking about this...
> >>>>>>>>>>
> >>>>>>>>>> I added this to the core, but what do you guys think of making
> this a
> >>>>>>>>>> plugin? I think that should be possible, right Henning?
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> Might work as a plugin I think, the only think it does in the
> core is
> >>>>>>>>> set the link up/down speed. That should be easy to do from a
> plugin
> >>>>>>>>> during runtime.
> >>>>>>>>>
> >>>>>>>>>> However, I'm _not_ saying I want to make it a plugin because I
> think
> >>>>>>>>>> this
> >>>>>>>>>> should be part of the core, but a plugin might mitigate some of
> the
> >>>>>>>>>> objections.
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> Whats the advantage to put it into the core?
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> then all platforms can benefit from it
> >>>>>>>>
> >>>>>>>>>
> >>>>>>>>> Henning
> >>>>>>>>>
> >>>>>>>>
> >>>>>>>> --
> >>>>>>>> Ferry Huberts
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>
> >>>>>> --
> >>>>>> Ferry Huberts
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> Steven Hawkings about cosmic inflation: "An increase of billions of
> >>>>> billions of percent in a tiny fraction of a second. Of course, that
> >>>>> was before the present government."
> >>>>>
> >>>>> --
> >>>>> Olsr-dev mailing list
> >>>>> (spam-protected)
> >>>>> https://lists.olsr.org/mailman/listinfo/olsr-dev
> >>>
> >>> --
> >>> Ferry Huberts
> >
> > --
> > Ferry Huberts
>
>
> --
> Olsr-dev mailing list
> (spam-protected)
> https://lists.olsr.org/mailman/listinfo/olsr-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20120515/0847bd5d/attachment.html>


More information about the Olsr-dev mailing list