[Ninux-Wireless] Risultati smanettamento di ieri al Giovedì Nerd a Roma

Nemesis nemesis a ninux.org
Ven 20 Set 2013 19:46:15 CEST


Grazie matteo,

non sono riuscito ad usare esattamente quel comando con awk, però ho
trovato un modo simile e semplice di ottenere il risultato.

Queste sono le informazioni recuperate automaticamente di una delle mie
antenna viste attraverso l'API HTTP (*mancano le interfacce vap con ssid
e bssid perchè non so i comandi*):

{
    "id": 243, 
    "access_level": "public", 
    "node": "pomezia", 
    "name": "RM5PomeziaSNode", 
    "type": "radio device", 
    "status": "reachable", 
    "location": {
        "type": "Point", 
        "coordinates": [
            12.5046944618225, 
            41.6682635711979
        ]
    }, 
    "elev": 160.0, 
    "firmware": "XM.ar7240.v5.3.3.sdk.9634.111221.2238", 
    "os": "Linux version 2.6.15-5.2 (saverio a nockid) (gcc version 4.1.2) ", 
    "description": null, 
    "routing_protocols": [
        78
    ], 
    "routing_protocols_named": [
        "OLSR pre-0.6.3-git_-hash_b493c377b33f6e45d0b2e8b4c8e7c5db"
    ], 
    "data": null, 
    "added": "2013-09-20T17:31:39.421Z", 
    "updated": "2013-09-20T17:34:38.091Z", 
    "ethernet": [
        {
            "id": 22, 
            "access_level": "public", 
            "type": "ethernet", 
            "name": "eth0", 
            "mac": "00:27:22:17:8b:12", 
            "mtu": 1500, 
            "tx_rate": null, 
            "rx_rate": null, 
            "data": {
                "ip_addresses": "2001:4c00:893b:fede::1, 10.40.0.1"
            }, 
            "added": "2013-09-20T17:31:39.421Z", 
            "updated": "2013-09-20T17:34:39.745Z", 
            "ip_url": "http://freedom:8000/api/v1/interfaces/22/ip/", 
            "ip": [
                {
                    "address": "2001:4c00:893b:fede::1", 
                    "protocol": "ipv6", 
                    "netmask": null
                }, 
                {
                    "address": "10.40.0.1", 
                    "protocol": "ipv4", 
                    "netmask": null
                }
            ], 
            "standard": "fast", 
            "duplex": "full"
        }
    ], 
    "ethernet_url": "http://freedom:8000/api/v1/devices/243/ethernet/", 
    "wireless": [
        {
            "id": 21, 
            "access_level": "public", 
            "type": "wireless", 
            "name": "ath0", 
            "mac": "00:27:22:16:8b:12", 
            "mtu": 1500, 
            "tx_rate": null, 
            "rx_rate": null, 
            "data": {
                "ip_addresses": "2001:4c00:893b:1:40::24, 172.16.40.24"
            }, 
            "added": "2013-09-20T17:31:39.421Z", 
            "updated": "2013-09-20T17:34:39.346Z", 
            "ip_url": "http://freedom:8000/api/v1/interfaces/21/ip/", 
            "ip": [
                {
                    "address": "2001:4c00:893b:1:40::24", 
                    "protocol": "ipv6", 
                    "netmask": null
                }, 
                {
                    "address": "172.16.40.24", 
                    "protocol": "ipv4", 
                    "netmask": null
                }
            ], 
            "mode": "ap", 
            "standard": "802.11n", 
            "channel": "5765", 
            "channel_width": "20", 
            "output_power": 27, 
            "dbm": -74, 
            "noise": -98, 
            "vap": []
        }
    ], 
    "wireless_url": "http://freedom:8000/api/v1/devices/243/wireless/", 
    "bridge": [], 
    "bridge_url": "http://freedom:8000/api/v1/devices/243/bridge/", 
    "tunnel": [], 
    "tunnel_url": "http://freedom:8000/api/v1/devices/243/tunnel/", 
    "vlan": [], 
    "vlan_url": "http://freedom:8000/api/v1/devices/243/vlan/"
}

Queste le modifiche:
https://github.com/nemesisdesign/nodeshot/commit/02c08a7b5d251e7b6cd12bc57b3def5320e1607d

Fed.


On 09/20/2013 02:48 PM, _n355_1 (Matteo) wrote:
> On Fri, 20 Sep 2013 10:24:49 +0200 nemesis <nemesis a ninux.org> wrote:
> [...]
>>  Sapete se c'è un modo più facile per tirar fuori l'ipv6 con qualche 
>>  comando bash?
> Io sulla mia antenna con OpenWRT faccio così:
>
> ip -6 addr show dev eth0| awk '/inet6/ && ! /fe80/ && ! /'' ''::1\/128/ {print "eth0 " $2}'
> ip -6 addr show dev wlan0| awk '/inet6/ && ! /fe80/ && ! /'' ''::1\/128/ {print "wlan0 " $2}' 
>
> Sicuramente ci sono molti altri modi di usare awk (che non conosco).
>
> Saluti,
> _n355_1 [Matteo]  
> _______________________________________________
> Wireless mailing list
> Wireless a ml.ninux.org
> http://ml.ninux.org/mailman/listinfo/wireless

-------------- parte successiva --------------
Un allegato HTML è stato rimosso...
URL: <http://ml.ninux.org/pipermail/wireless/attachments/20130920/2dc926f8/attachment-0001.html>


Maggiori informazioni sulla lista Wireless