[Commotion-dev] jsoninfo updates: UUID and /sys/class/net info

Benjamin Chodoroff anonyben at gmail.com
Tue Jul 3 13:52:11 UTC 2012


hi josh! did you end up getting started on the openwrt json mesh
endpoint? is there a reason to do this via luci vs. via an olsrd
plugin?

-b

On Wed, Jun 6, 2012 at 3:23 PM, Josh King <jking at chambana.net> wrote:
> Hi Hans,
>
> This is great, and I like the addition of the UUID (especially since
> I'm working on better unique identifiers for nodes right now anyway).
> I'm thinking about working on a LuCI plugin to expose mesh information
> through the JSON API on OpenWRT; I'm planning on using this as a
> template.
>
> On Tue 05 Jun 2012 08:05:22 PM EDT, Hans-Christoph Steiner wrote:
>>
>> jsoninfo is now officially part of olsrd, it was included by default in
>> the 0.6.3 release today.  In the released version, the whole JSON dump
>> is wrapped as one big chunk with a timestamp.  I just did some more work
>> on it for some more experimental stuff.  First, I added the possibility
>> for setting a UUID in a file, configurable in the jsoninfo section of
>> olsrd.conf, then if its present, that UUID is included in the outermost
>> json wrapper:
>>
>> {
>>       "data": [all of the requested data],
>>       "systemTime": 1338940817,
>>       "uuid": "khjhaskldjfhajksetnrjky41h98uij23u4h"}
>> }
>>
>> Next, I started gathering lots of data from /sys/class/net and adding it
>> to interfaces:
>>
>> {
>> "data": [{"interfaces": [
>> {
>>       "name": "wlan0",
>>       "state": "up",
>>       "mtu": 1472,
>>       "wireless": true,
>>       "ipv4Address": "172.29.126.189",
>>       "netmask": "255.255.0.0",
>>       "broadcast": "172.29.255.255",
>>       "addressLength": "6",
>>       "carrier": "1",
>>       "dormant": "0",
>>       "flags": "0x1003",
>>       "linkMode": "0",
>>       "macAddress": "00:1b:63:cc:7e:bd",
>>       "MTU": "1500",
>>       "operationalState": "unknown",
>>       "txQueueLength": "1000",
>>       "collisions": "0",
>>       "multicastPackets": "0",
>>       "rxBytes": "4020976",
>>       "rxCompressed": "0",
>>       "rxCrcErrors": "0",
>>       "rxDropped": "0",
>>       "rxErrors": "0",
>>       "rxFifoErrors": "0",
>>       "rxFrameErrors": "0",
>>       "rxLengthErrors": "0",
>>       "rxMissedErrors": "0",
>>       "rxOverErrors": "0",
>>       "rxPackets": "48842",
>>       "txAbortedErrors": "0",
>>       "txBytes": "851046",
>>       "txCarrierErrors": "0",
>>       "txCompressed": "0",
>>       "txDropped": "0",
>>       "txErrors": "0",
>>       "txFifoErrors": "0",
>>       "txHeartbeatErrors": "0",
>>       "txPackets": "6675",
>>       "txWindowErrors": "0"}]}
>> ]
>> ,
>>       "systemTime": 1338940817,
>>       "uuid": "khjhaskldjfhajksetnrjky41h98uij23u4h"}
>>
>> _______________________________________________
>> Commotion-dev mailing list
>> Commotion-dev at lists.chambana.net
>> http://lists.chambana.net/mailman/listinfo/commotion-dev
>>
>
> --
> Josh King
>
> "I am an Anarchist not because I believe Anarchism is the final goal,
> but because there is no such thing as a final goal." -Rudolf Rocker
>
>
> _______________________________________________
> Commotion-dev mailing list
> Commotion-dev at lists.chambana.net
> http://lists.chambana.net/mailman/listinfo/commotion-dev
>



-- 
Work Department / theworkdept.com
Thermitic / thermitic.net
Detroit Digital Justice Coalition / detroitdjc.org


More information about the Commotion-dev mailing list