glpi-project / android-inventory-library

Inventory client library written in Java for developing applications on Android
GNU General Public License v3.0
19 stars 21 forks source link

Enhance Specs for Networks #64

Closed ajsb85 closed 6 years ago

ajsb85 commented 7 years ago

Hi, @rafaelje

This is a report from @g-bougard

For the node, IPMASK & MACADDR seems wrong while reported by Android agent.

Android - Inventory Agent by @flyve-mdm 0.1.0:

<NETWORKS>
  <TYPE>WIFI</TYPE>
  <MACADDR>02:00:00:00:00:00</MACADDR>
  <SPEED>1</SPEED>
  <BSSID>02:1d:7e:43:96:...</BSSID>
  <SSID>02:1d:7e:43:96:...</SSID>
  <IPGATEWAY>192.168.12.1</IPGATEWAY>
  <IPADDRESS>192.168.12.37</IPADDRESS>
  <IPMASK>0.0.0.0</IPMASK>
  <IPDHCP>192.168.12.1</IPDHCP>
</NETWORKS>

Linux FusionInventory 2.4.x:

<NETWORKS>
  <DESCRIPTION>wlp1s0</DESCRIPTION>
  <DRIVER>ath10k_pci</DRIVER>
  <IPADDRESS>172.28........</IPADDRESS>
  <IPGATEWAY>172.28........</IPGATEWAY>
  <IPMASK>255.255.255.0</IPMASK>
  <IPSUBNET>172.28.220.0</IPSUBNET>
  <MACADDR>74:c6:3b:f8:25:...</MACADDR>
  <PCIID>168C:0042:1A3B:2A51</PCIID>
  <PCISLOT>0000:01:00.0</PCISLOT>
  <STATUS>Up</STATUS>
  <TYPE>wifi</TYPE>
  <VIRTUALDEV>0</VIRTUALDEV>
  <WIFI_BSSID>00:1D:7E:43:96:...</WIFI_BSSID>
  <WIFI_MODE>Managed</WIFI_MODE>
  <WIFI_SSID>Teclib_Montpellier</WIFI_SSID>
  <WIFI_VERSION>802.11</WIFI_VERSION>
</NETWORKS>
<NETWORKS>
  <DESCRIPTION>wlp1s0</DESCRIPTION>
  <DRIVER>ath10k_pci</DRIVER>
  <IPADDRESS6>fe80::9b27:419e:b55f:...</IPADDRESS6>
  <IPMASK6>ffff:ffff:ffff:ffff::</IPMASK6>
  <IPSUBNET6>fe80::</IPSUBNET6>
  <MACADDR>74:c6:3b:f8:25:...</MACADDR>
  <PCIID>168C:0042:1A3B:2A51</PCIID>
  <PCISLOT>0000:01:00.0</PCISLOT>
  <STATUS>Up</STATUS>
  <TYPE>wifi</TYPE>
  <VIRTUALDEV>0</VIRTUALDEV>
  <WIFI_BSSID>00:1D:7E:43:96:59</WIFI_BSSID>
  <WIFI_MODE>Managed</WIFI_MODE>
  <WIFI_SSID>Teclib_Montpellier</WIFI_SSID>
  <WIFI_VERSION>802.11</WIFI_VERSION>
</NETWORKS>
<NETWORKS>
  <DESCRIPTION>lo</DESCRIPTION>
  <IPADDRESS>127.0.0.1</IPADDRESS>
  <IPMASK>255.0.0.0</IPMASK>
  <IPSUBNET>127.0.0.0</IPSUBNET>
  <MACADDR>00:00:00:00:00:00</MACADDR>
  <STATUS>Up</STATUS>
  <TYPE>loopback</TYPE>
  <VIRTUALDEV>1</VIRTUALDEV>
</NETWORKS>
<NETWORKS>
  <DESCRIPTION>lo</DESCRIPTION>
  <IPADDRESS6>::1</IPADDRESS6>
  <IPMASK6>fff0::</IPMASK6>
  <IPSUBNET6>::</IPSUBNET6>
  <MACADDR>00:00:00:00:00:00</MACADDR>
  <STATUS>Up</STATUS>
  <TYPE>loopback</TYPE>
  <VIRTUALDEV>1</VIRTUALDEV>
</NETWORKS>
<NETWORKS>
  <DESCRIPTION>virbr0</DESCRIPTION>
  <IPADDRESS>192.168.122.1</IPADDRESS>
  <IPMASK>255.255.255.0</IPMASK>
  <IPSUBNET>192.168.122.0</IPSUBNET>
  <MACADDR>52:54:00:1d:44:...</MACADDR>
  <SLAVES></SLAVES>
  <STATUS>Up</STATUS>
  <TYPE>bridge</TYPE>
  <VIRTUALDEV>1</VIRTUALDEV>
</NETWORKS>
<NETWORKS>
  <DESCRIPTION>virbr0-nic</DESCRIPTION>
  <MACADDR>52:54:00:1d:44:...</MACADDR>
  <SPEED>10</SPEED>
  <STATUS>Down</STATUS>
  <VIRTUALDEV>1</VIRTUALDEV>
</NETWORKS>

Note: Added ellipsis to hidde real MAC and IP address

btry commented 7 years ago

@ajsb85 as far as I know a MAC addresse with 02 as first byte is for a special case (managed MAC addresses, for example when you setup several hotspots on a single physical wifi interface)

the valus is probably reserved for such use cases (I did not checked myself though)

Ivans51 commented 6 years ago

With cat /sys/class/net/wlan0/operstate get information about status wifi

up
Ivans51 commented 6 years ago

PCI no information avaible in OS Android