GVirNetwork: Libvirt-gobject Reference Manual

## GVirNetwork GVirNetwork |

## Functions

const gchar * | gvir_network_get_name ()
const gchar * | gvir_network_get_uuid ()
GVirConfigNetwork * | gvir_network_get_config ()
GList * | gvir_network_get_dhcp_leases ()

## Properties

GVirNetworkHandle * | handle | Read / Write / Construct Only

## Object Hierarchy

        GObject
        ╰── GVirNetwork

## Description

## Functions

### gvir_network_get_name ()

    const gchar *
    gvir_network_get_name (GVirNetwork *network);

### gvir_network_get_uuid ()

    const gchar *
    gvir_network_get_uuid (GVirNetwork *network);

### gvir_network_get_config ()

    GVirConfigNetwork *
    gvir_network_get_config (GVirNetwork *network,
                             guint flags,
                             GError **err);

#### Parameters

network | the network |
flags | the flags |
err | Place-holder for possible errors |

#### Returns

the config. The returned object should be unreffed with `g_object_unref()` when no longer needed.

[transfer full]

### gvir_network_get_dhcp_leases ()

    GList *
    gvir_network_get_dhcp_leases (GVirNetwork *network,
                                  const char *mac,
                                  guint flags,
                                  GError **err);

This function fetches leases info of guests in the specified network. If the optional parameter `mac` is specified, the returned list will contain only lease info about a specific guest interface with `mac` . There can be multiple leases for a single `mac` because this API supports DHCPv6 too.

#### Parameters

network | the network |
mac | The optional ASCII formatted MAC address of an interface. | [allow-none]
flags | placeholder for flags, must be 0 |
err | Place-holder for possible errors |

#### Returns

the list of network leases. Each object in the returned list should be unreffed with `g_object_unref()` and the list itself using g_list_free, when no longer needed.

[element-type LibvirtGObject.NetworkDHCPLease][transfer full]

## Property Details

### The `“handle”` property

      “handle”                   GVirNetworkHandle *

The network handle.

Owner: GVirNetwork

Flags: Read / Write / Construct Only