[OLSR-users] Re: [olsr-dev] httpinfo plugin

Andreas Tønnesen (spam-protected)
Fri Apr 1 07:55:37 CEST 2005


Spoggle is absolutley right here, you cannot do this safley
without making fundamental changes to the plugin(multithread it).
In theory, even reading local files is blocking I/O and should
not be done in the current plugin.
This KISS style design(non-multithreaded) was chosen because
the plugin should be as light weight as possible to be able to
run on embedded systems of all kinds.

But if the file is already available via HTTP, why not just add
a link?

- Andreas

spoggle wrote:
> You need to be careful with loading URLs -  The comment in the
> httpinfo source says it's not multi-threaded, hence if you block on
> fetching, you block the entire daemon from running.
> 
> dave c
> 
> On Thu, 31 Mar 2005 19:41:37 -0600, Andrew Hodel <(spam-protected)> wrote:
> 
>>I have updated the files at http://www.nxwi.com/olsr to include support
>>for selecting which file on the system to load into the other tab based
>>on a loadplugin parameter.
>>
>>right now you can define othersource to the location of any file and it
>>should show on the httpinfo other tab.
>>
>>I later plan on allowing a http:// url to be entered as the value of the
>>othersource parameter which will load a file over http.
>>
>>I would also like to have another parameter, othername, which can be set
>>to change the name of the other tab.  I have tried for hours and cannot
>>figure a way to get the return value from a function into the struct
>>that loads the tab information.  If anyone can help, please do.
>>
>>
>>Thanks,
>>Andrew Hodel
>>
>>Andrew Hodel wrote:
>>
>>
>>>I like to be able to change the way the httpinfo plugin looks easily.
>>>This is because my plans are to have people looking to the httpinfo
>>>page for more information, gps locations, temperature, ...
>>>
>>>We are installing nodes on boats so this will be useful information.
>>>
>>>Perhaps a better way of implementing this would be a parameter in
>>>olsrd.conf where you load the httpinfo module.
>>>
>>>othersource="file"
>>>or
>>>othersource="http://domain.tld/file.ext"
>>>and if othersource is not set, don't include the other tab.
>>>
>>>From here you could load your xml file via the fs, or over http.
>>>
>>>However, I wouldn't load the xml file directly into the other tab as
>>>it would only display the actual xml doc.  I would setup a perl or
>>>bash script that parses all of the information you want to display and
>>>write to a file.  Then set othersource to the location of the output
>>>file.
>>>
>>>I could also setup an othersourcename parameter in the plugin load
>>>that will allow you to set the name of the tab.
>>>
>>>I will get to work on implementing the "other" tab based on parameters
>>>set when loading httpinfo, if anyone has anything to consider or wants
>>>easily editable css/html files, speak up.
>>>
>>>
>>>
>>>
>>>Andrew
>>>
>>>Aldert J.B.P. Hazenberg wrote:
>>>
>>>
>>>>I do not really understand why 'you; would like to do this.
>>>>
>>>>But I could easily oversee a good reason, can you elaborate a bit so
>>>>my feedback could be of better quality ?
>>>>
>>>>
>>>>Myself I am more interrested in an XML 'tab'/URL in httpinfo so I can
>>>>read the XML from all my nodes and compile and display them on a central
>>>>place. (Something like http://<name or ip>:8080/xml )
>>>>
>>>>Aldert.
>>>>
>>>>
>>>>Andrew Hodel wrote:
>>>>
>>>>
>>>>
>>>>>If there is an interest other then mine in having external files for
>>>>>the
>>>>>httpinfo plugin that allow users to change the css layout and default
>>>>>text of the output, I would be willing to implement it.
>>>>>
>>>>>I have cross posted this to the users and dev lists to get user input.
>>>>>
>>>>>The only problem I can see with this is multiple olsrd config files in
>>>>>/etc, this could be fixed by creating an /etc/olsrd directory for all
>>>>>olsrd config files.
>>>>>
>>>>>Any comments.. anyone?
>>>>>
>>>>>
>>>>>
>>>>>Thanks,
>>>>>Andrew Hodel
>>>>>
>>>>>
>>>>>Andrew Hodel wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>I made a few changes for the httpinfo plugin from cvs today.
>>>>>>
>>>>>>There is a new menu option, "Other", which will display the contents
>>>>>>of the file /etc/olsr.other
>>>>>>
>>>>>>I also added a section to the About page describing the Other page,
>>>>>>and fixed a missing close tag for li in the html source.
>>>>>>
>>>>>>I am having 2 problems:
>>>>>>1.If the file /etc/olsr.other is not there, olsrd segfaults.  There is
>>>>>>error checking when opening the file but it is not working.
>>>>>>
>>>>>>2. If the file /etc/olsr.other only contains 1 line, it will be
>>>>>>printed twice.
>>>>>>
>>>>>>If anyone can use or improve this, please do.  I use it to show
>>>>>>information from other sources easily on the httpinfo plugin, i.e.
>>>>>>another daemon writing to the file.  This way I don't have to use C to
>>>>>>show something simple, bash, perl, python, _anything_ can write to a
>>>>>>file.
>>>>>>
>>>>>>
>>>>>>P.S. modified olsrd_httpinfo.c & html.h at: http://www.nxwi.com/olsr
>>>>>>
>>>>>>
>>>>>>Thanks,
>>>>>>Andrew Hodel
>>>>>>_______________________________________________
>>>>>>olsr-dev mailing list
>>>>>>(spam-protected)
>>>>>>https://www.olsr.org/mailman/listinfo/olsr-dev
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>_______________________________________________
>>>>>olsr-users mailing list
>>>>>(spam-protected)
>>>>>https://www.olsr.org/mailman/listinfo/olsr-users
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>_______________________________________________
>>>>olsr-users mailing list
>>>>(spam-protected)
>>>>https://www.olsr.org/mailman/listinfo/olsr-users
>>>>
>>>>
>>>>
>>>>
>>>
>>>_______________________________________________
>>>olsr-dev mailing list
>>>(spam-protected)
>>>https://www.olsr.org/mailman/listinfo/olsr-dev
>>>
>>>
>>
>>_______________________________________________
>>olsr-dev mailing list
>>(spam-protected)
>>https://www.olsr.org/mailman/listinfo/olsr-dev
>>
> 
> _______________________________________________
> olsr-dev mailing list
> (spam-protected)
> https://www.olsr.org/mailman/listinfo/olsr-dev

-- 
Andreas Tønnesen
http://www.olsr.org



More information about the Olsr-dev mailing list