Documentation ¶
Index ¶
- type L2NetStatus
- type MeshDevice
- type Node
- func (*Node) Descriptor() ([]byte, []int)
- func (m *Node) GetBSSID() string
- func (m *Node) GetCap() string
- func (m *Node) GetFreq() int32
- func (m *Node) GetLastSeen() uint64
- func (m *Node) GetLevel() int32
- func (m *Node) GetMAC() string
- func (m *Node) GetName() string
- func (m *Node) GetNet() string
- func (m *Node) GetPSK() string
- func (m *Node) GetSSID() string
- func (m *Node) GetUserAgent() string
- func (*Node) ProtoMessage()
- func (m *Node) Reset()
- func (m *Node) String() string
- func (m *Node) XXX_DiscardUnknown()
- func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Node) XXX_Merge(src proto.Message)
- func (m *Node) XXX_Size() int
- func (m *Node) XXX_Unmarshal(b []byte) error
- type Status
- func (*Status) Descriptor() ([]byte, []int)
- func (m *Status) GetConnectedWifi() string
- func (m *Status) GetFreq() int32
- func (m *Status) GetLevel() int32
- func (m *Status) GetPSK() string
- func (m *Status) GetSSID() string
- func (m *Status) GetScan() []*Node
- func (m *Status) GetVisible() int32
- func (*Status) ProtoMessage()
- func (m *Status) Reset()
- func (m *Status) String() string
- func (m *Status) XXX_DiscardUnknown()
- func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Status) XXX_Merge(src proto.Message)
- func (m *Status) XXX_Size() int
- func (m *Status) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type L2NetStatus ¶
type L2NetStatus struct { // Visible devices at this moment, according to last scan results. // This only includes discovered P2P devices. Scan []*MeshDevice `json:"scan,omitempty"` Stats string `json:"stat,omitempty"` // Visible wifi networks (all kinds), on last scan result - including non-dmesh Visible int `json:"visible,omitempty"` // My SSID and PSK, when acting as a P2P or AP server SSID string `json:"s,omitempty"` PSK string `json:"p,omitempty"` // AP we are connected to, if operating as STA or P2P client. ConnectedWifi string `json:"w,omitempty"` // Frequency on the STA connection, from wpa_cli if available Freq int `json:"f,omitempty"` // Last level of AP signal, from wpa_cli Level int `json:"l,omitempty"` }
L2NetStatus device status and discovery info, sent as body of "/net/status" messages. Sync with android Wifi.sendWifiDiscoveryStatus()
type MeshDevice ¶
type MeshDevice struct { // If the device has a P2P or AP interface, the SSID and PSK of the device, // They may be obtained via P2P discovery or other means (nan, etc) SSID string `json:"s,omitempty"` // PSK - not included if it is the default or open network. To distinguish, use info from the beacon. PSK string `json:"p,omitempty"` // MAC is used with explicit P2P connect ( i.e. no hacks ) // User input required on the receiving end ( PBC ). // This is the MAC of the P2P interface, as reported. // For BLE/NAN, it is the current MAC of the device. MAC string `json:"d,omitempty"` // Name, from the discovery. // Deprecated - should be at L6 Name string `json:"N,omitempty"` // Set only if the device is currently visible in a recent scan. // Equivalent RSSI for BLE, Nan, etc - based on last packet Level int `json:"l,omitempty"` // Freq the device is listening on Freq int `json:"f,omitempty"` // Metadata extracted from DIRECT DNSSD // Deprecated: L6/control UserAgent string `json:"ua,omitempty"` // Net string `json:"n,omitempty"` // Capabilities and BSSID Cap string `json:"c,omitempty"` BSSID string `json:"b,omitempty"` LastSeen time.Time `json:"lastSeen,omitempty"` // Only on supplicant, not on android. Will change when the DNS-SD data changes. ServiceUpdateInd int `json:"sui,omitempty"` }
Info about a L2NetStatus-connected device. Originally used for Android P2P L2NetStatus connections. Must be in sync with com.github.costinm.dmesh.lm3.Device
func (*MeshDevice) String ¶
func (md *MeshDevice) String() string
type Node ¶
type Node struct { SSID string `protobuf:"bytes,1,opt,name=SSID,proto3" json:"SSID,omitempty"` PSK string `protobuf:"bytes,2,opt,name=PSK,proto3" json:"PSK,omitempty"` MAC string `protobuf:"bytes,3,opt,name=MAC,proto3" json:"MAC,omitempty"` Name string `protobuf:"bytes,4,opt,name=Name,proto3" json:"Name,omitempty"` Level int32 `protobuf:"varint,5,opt,name=Level,proto3" json:"Level,omitempty"` Freq int32 `protobuf:"varint,6,opt,name=Freq,proto3" json:"Freq,omitempty"` UserAgent string `protobuf:"bytes,7,opt,name=UserAgent,proto3" json:"UserAgent,omitempty"` Net string `protobuf:"bytes,8,opt,name=Net,proto3" json:"Net,omitempty"` Cap string `protobuf:"bytes,9,opt,name=cap,proto3" json:"cap,omitempty"` BSSID string `protobuf:"bytes,10,opt,name=BSSID,proto3" json:"BSSID,omitempty"` LastSeen uint64 `protobuf:"varint,11,opt,name=LastSeen,proto3" json:"LastSeen,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Node) Descriptor ¶
func (*Node) GetLastSeen ¶
func (*Node) GetUserAgent ¶
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
func (*Node) XXX_DiscardUnknown ¶
func (m *Node) XXX_DiscardUnknown()
func (*Node) XXX_Unmarshal ¶
type Status ¶
type Status struct { // Number of L2-visible nodes - wifi, BT, BLE, of any type // TODO: should it be a map or indicate the type ? Visible int32 `protobuf:"varint,1,opt,name=visible,proto3" json:"visible,omitempty"` // Device local SSID. Empty if device doesn't support P2P or never started. SSID string `protobuf:"bytes,2,opt,name=SSID,proto3" json:"SSID,omitempty"` // PSK, if different from the default. PSK string `protobuf:"bytes,3,opt,name=PSK,proto3" json:"PSK,omitempty"` // AP this node is connected to, or empty if no STA connection. ConnectedWifi string `protobuf:"bytes,4,opt,name=ConnectedWifi,proto3" json:"ConnectedWifi,omitempty"` // Wifi Frequency and Level, if device is connected as STA. Freq int32 `protobuf:"varint,5,opt,name=freq,proto3" json:"freq,omitempty"` Level int32 `protobuf:"varint,6,opt,name=level,proto3" json:"level,omitempty"` Scan []*Node `protobuf:"bytes,7,rep,name=Scan,proto3" json:"Scan,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Status) Descriptor ¶
func (*Status) GetConnectedWifi ¶
func (*Status) GetVisible ¶
func (*Status) ProtoMessage ¶
func (*Status) ProtoMessage()
func (*Status) XXX_DiscardUnknown ¶
func (m *Status) XXX_DiscardUnknown()
func (*Status) XXX_Marshal ¶
func (*Status) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.