## NMWifiP2PPeer NMWifiP2PPeer |

## Functions

NM80211ApFlags | nm_wifi_p2p_peer_get_flags ()
const char * | nm_wifi_p2p_peer_get_name ()
const char * | nm_wifi_p2p_peer_get_manufacturer ()
const char * | nm_wifi_p2p_peer_get_model ()
const char * | nm_wifi_p2p_peer_get_model_number ()
const char * | nm_wifi_p2p_peer_get_serial ()
GBytes * | nm_wifi_p2p_peer_get_wfd_ies ()
const char * | nm_wifi_p2p_peer_get_hw_address ()
guint8 | nm_wifi_p2p_peer_get_strength ()
int | nm_wifi_p2p_peer_get_last_seen ()
GPtrArray * | nm_wifi_p2p_peer_filter_connections ()
gboolean | nm_wifi_p2p_peer_connection_valid ()

## Properties

NM80211ApFlags | flags | Read
char * | hw-address | Read
int | last-seen | Read
char * | manufacturer | Read
char * | model | Read
char * | model-number | Read
char * | name | Read
char * | serial | Read
guchar | strength | Read
GBytes * | wfd-ies | Read

## Types and Values

#define | NM_WIFI_P2P_PEER_FLAGS
#define | NM_WIFI_P2P_PEER_NAME
#define | NM_WIFI_P2P_PEER_MANUFACTURER
#define | NM_WIFI_P2P_PEER_MODEL
#define | NM_WIFI_P2P_PEER_MODEL_NUMBER
#define | NM_WIFI_P2P_PEER_SERIAL
#define | NM_WIFI_P2P_PEER_WFD_IES
#define | NM_WIFI_P2P_PEER_HW_ADDRESS
#define | NM_WIFI_P2P_PEER_STRENGTH
#define | NM_WIFI_P2P_PEER_LAST_SEEN
| NMWifiP2PPeer

## Object Hierarchy

        GObject
        ╰── NMObject
            ╰── NMWifiP2PPeer

## Description

## Functions

### nm_wifi_p2p_peer_get_flags ()

    NM80211ApFlags
    nm_wifi_p2p_peer_get_flags (NMWifiP2PPeer *peer);

Gets the flags of the P2P peer.

#### Parameters

peer | a NMWifiP2PPeer |

#### Returns

the flags

Since: 1.16

### nm_wifi_p2p_peer_get_name ()

    const char *
    nm_wifi_p2p_peer_get_name (NMWifiP2PPeer *peer);

Gets the name of the P2P peer.

#### Parameters

peer | a NMWifiP2PPeer |

#### Returns

the name

Since: 1.16

### nm_wifi_p2p_peer_get_manufacturer ()

    const char *
    nm_wifi_p2p_peer_get_manufacturer (NMWifiP2PPeer *peer);

Gets the manufacturer of the P2P peer.

#### Parameters

peer | a NMWifiP2PPeer |

#### Returns

the manufacturer

Since: 1.16

### nm_wifi_p2p_peer_get_model ()

    const char *
    nm_wifi_p2p_peer_get_model (NMWifiP2PPeer *peer);

Gets the model of the P2P peer.

#### Parameters

peer | a NMWifiP2PPeer |

#### Returns

the model

Since: 1.16

### nm_wifi_p2p_peer_get_model_number ()

    const char *
    nm_wifi_p2p_peer_get_model_number (NMWifiP2PPeer *peer);

Gets the model number of the P2P peer.

#### Parameters

peer | a NMWifiP2PPeer |

#### Returns

the model number

Since: 1.16

### nm_wifi_p2p_peer_get_serial ()

    const char *
    nm_wifi_p2p_peer_get_serial (NMWifiP2PPeer *peer);

Gets the serial number of the P2P peer.

#### Parameters

peer | a NMWifiP2PPeer |

#### Returns

the serial number

Since: 1.16

### nm_wifi_p2p_peer_get_wfd_ies ()

    GBytes *
    nm_wifi_p2p_peer_get_wfd_ies (NMWifiP2PPeer *peer);

Gets the WFD information elements of the P2P peer.

#### Parameters

peer | a NMWifiP2PPeer |

#### Returns

the GBytes containing the WFD IEs, or `NULL`.

[transfer none]

Since: 1.16

### nm_wifi_p2p_peer_get_hw_address ()

    const char *
    nm_wifi_p2p_peer_get_hw_address (NMWifiP2PPeer *peer);

Gets the hardware address of the P2P peer.

#### Parameters

peer | a NMWifiP2PPeer |

#### Returns

the hardware address

Since: 1.16

### nm_wifi_p2p_peer_get_strength ()

    guint8
    nm_wifi_p2p_peer_get_strength (NMWifiP2PPeer *peer);

Gets the current signal strength of the P2P peer as a percentage.

#### Parameters

peer | a NMWifiP2PPeer |

#### Returns

the signal strength (0 to 100)

Since: 1.16

### nm_wifi_p2p_peer_get_last_seen ()

    int
    nm_wifi_p2p_peer_get_last_seen (NMWifiP2PPeer *peer);

Returns the timestamp (in CLOCK_BOOTTIME seconds) for the last time the P2P peer was seen. A value of -1 means the P2P peer has never been seen.

#### Parameters

peer | a NMWifiP2PPeer |

#### Returns

the last seen time in seconds

Since: 1.16

### nm_wifi_p2p_peer_filter_connections ()

    GPtrArray *
    nm_wifi_p2p_peer_filter_connections (NMWifiP2PPeer *peer,
                                         const GPtrArray *connections);

Filters a given array of connections for a given NMWifiP2PPeer object and returns connections which may be activated with the P2P peer. Any returned connections will match the `peers` 's HW address and in the future possibly other attributes.

To obtain the list of connections that are compatible with this P2P peer, use `nm_client_get_connections()` and then filter the returned list for a given NMDevice using `nm_device_filter_connections()` and finally filter that list with this function.

#### Parameters

peer | an NMWifiP2PPeer to filter connections for |
connections | an array of NMConnections to filter. | [element-type NMConnection]

#### Returns

an array of NMConnections that could be activated with the given `peer` . The array should be freed with `g_ptr_array_unref()` when it is no longer required.

[transfer container][element-type NMConnection]

Since: 1.16

### nm_wifi_p2p_peer_connection_valid ()

    gboolean
    nm_wifi_p2p_peer_connection_valid (NMWifiP2PPeer *peer,
                                       NMConnection *connection);

Validates a given connection against a given Wi-Fi P2P peer to ensure that the connection may be activated with that peer. The connection must match the `peer` 's address and in the future possibly other attributes.

#### Parameters

peer | an NMWifiP2PPeer to validate `connection` against |
connection | an NMConnection to validate against `peer` |

#### Returns

`TRUE` if the connection may be activated with this Wi-Fi P2P Peer, `FALSE` if it cannot be.

Since: 1.16

## Types and Values

### NM_WIFI_P2P_PEER_FLAGS

    #define NM_WIFI_P2P_PEER_FLAGS        "flags"

### NM_WIFI_P2P_PEER_NAME

    #define NM_WIFI_P2P_PEER_NAME         "name"

### NM_WIFI_P2P_PEER_MANUFACTURER

    #define NM_WIFI_P2P_PEER_MANUFACTURER "manufacturer"

### NM_WIFI_P2P_PEER_MODEL

    #define NM_WIFI_P2P_PEER_MODEL        "model"

### NM_WIFI_P2P_PEER_MODEL_NUMBER

    #define NM_WIFI_P2P_PEER_MODEL_NUMBER "model-number"

### NM_WIFI_P2P_PEER_SERIAL

    #define NM_WIFI_P2P_PEER_SERIAL       "serial"

### NM_WIFI_P2P_PEER_WFD_IES

    #define NM_WIFI_P2P_PEER_WFD_IES      "wfd-ies"

### NM_WIFI_P2P_PEER_HW_ADDRESS

    #define NM_WIFI_P2P_PEER_HW_ADDRESS   "hw-address"

### NM_WIFI_P2P_PEER_STRENGTH

    #define NM_WIFI_P2P_PEER_STRENGTH     "strength"

### NM_WIFI_P2P_PEER_LAST_SEEN

    #define NM_WIFI_P2P_PEER_LAST_SEEN    "last-seen"

### NMWifiP2PPeer

    typedef struct _NMWifiP2PPeer NMWifiP2PPeer;

Since: 1.16

## Property Details

### The `“flags”` property

      “flags”                    NM80211ApFlags

The flags of the P2P peer.

Owner: NMWifiP2PPeer

Flags: Read

Since: 1.16

### The `“hw-address”` property

      “hw-address”               char *

The hardware address of the P2P peer.

Owner: NMWifiP2PPeer

Flags: Read

Default value: NULL

Since: 1.16

### The `“last-seen”` property

      “last-seen”                int

The timestamp (in CLOCK_BOOTTIME seconds) for the last time the P2P peer was found. A value of -1 means the peer has never been seen.

Owner: NMWifiP2PPeer

Flags: Read

Allowed values: >= -1

Default value: -1

Since: 1.16

### The `“manufacturer”` property

      “manufacturer”             char *

The manufacturer of the P2P peer.

Owner: NMWifiP2PPeer

Flags: Read

Default value: NULL

Since: 1.16

### The `“model”` property

      “model”                    char *

The model of the P2P peer.

Owner: NMWifiP2PPeer

Flags: Read

Default value: NULL

Since: 1.16

### The `“model-number”` property

      “model-number”             char *

The hardware address of the P2P peer.

Owner: NMWifiP2PPeer

Flags: Read

Default value: NULL

Since: 1.16

### The `“name”` property

      “name”                     char *

The name of the P2P peer.

Owner: NMWifiP2PPeer

Flags: Read

Default value: NULL

Since: 1.16

### The `“serial”` property

      “serial”                   char *

The serial number of the P2P peer.

Owner: NMWifiP2PPeer

Flags: Read

Default value: NULL

Since: 1.16

### The `“strength”` property

      “strength”                 guchar

The current signal strength of the P2P peer.

Owner: NMWifiP2PPeer

Flags: Read

Default value: 0

Since: 1.16

### The `“wfd-ies”` property

      “wfd-ies”                  GBytes *

The WFD information elements of the P2P peer.

Owner: NMWifiP2PPeer

Flags: Read

Since: 1.16