GVirSandboxConfigNetwork

GVirSandboxConfigNetwork — Kernel ramdisk configuration details

Functions

Properties

gboolean dhcp Read / Write
gchar * mac Read / Write
gchar * source Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GVirSandboxConfigNetwork

Includes

#include <libvirt-sandbox/libvirt-sandbox.h>

Description

Provides an object to store information about a kernel ramdisk

The GVirSandboxConfigNetwork object stores the information required to build a kernel ramdisk to use when booting a virtual machine as a sandbox.

Functions

gvir_sandbox_config_network_new ()

GVirSandboxConfigNetwork *
gvir_sandbox_config_network_new (void);

Create a new network config with DHCP enabled

Returns

a new sandbox network object.

[transfer full]


gvir_sandbox_config_network_set_source ()

void
gvir_sandbox_config_network_set_source
                               (GVirSandboxConfigNetwork *config,
                                const gchar *network);

gvir_sandbox_config_network_get_source ()

const gchar *
gvir_sandbox_config_network_get_source
                               (GVirSandboxConfigNetwork *config);

gvir_sandbox_config_network_set_mac ()

void
gvir_sandbox_config_network_set_mac (GVirSandboxConfigNetwork *config,
                                     const gchar *mac);

gvir_sandbox_config_network_get_mac ()

const gchar *
gvir_sandbox_config_network_get_mac (GVirSandboxConfigNetwork *config);

gvir_sandbox_config_network_set_dhcp ()

void
gvir_sandbox_config_network_set_dhcp (GVirSandboxConfigNetwork *config,
                                      gboolean dhcp);

gvir_sandbox_config_network_get_dhcp ()

gboolean
gvir_sandbox_config_network_get_dhcp (GVirSandboxConfigNetwork *config);

gvir_sandbox_config_network_add_address ()

void
gvir_sandbox_config_network_add_address
                               (GVirSandboxConfigNetwork *config,
                                GVirSandboxConfigNetworkAddress *addr);

Add a network interface address. This will be ignored unless DHCP has been disabled

Parameters

config

the sandbox network configuration.

[transfer none]

addr

the network address.

[transfer none]

gvir_sandbox_config_network_get_addresses ()

GList *
gvir_sandbox_config_network_get_addresses
                               (GVirSandboxConfigNetwork *config);

Retrieve the list of network interface addresses

Parameters

config

the sandbox network configuration.

[transfer none]

Returns

the address list.

[transfer full][element-type GVirSandboxConfigNetworkAddress]


gvir_sandbox_config_network_set_filterref ()

void
gvir_sandbox_config_network_set_filterref
                               (GVirSandboxConfigNetwork *config,
                                GVirSandboxConfigNetworkFilterref *ref);

Set a network filterref for the given network.

Parameters

config

the sandbox network configuration.

[transfer none]

ref

the network filterref.

[transfer none]

gvir_sandbox_config_network_get_filterref ()

GVirSandboxConfigNetworkFilterref *
gvir_sandbox_config_network_get_filterref
                               (GVirSandboxConfigNetwork *config);

Retrieve the associated filter reference.

Parameters

config

the sandbox network configuration.

[transfer none]

Returns

The associated filter reference.

[transfer none]


gvir_sandbox_config_network_add_route ()

void
gvir_sandbox_config_network_add_route (GVirSandboxConfigNetwork *config,
                                       GVirSandboxConfigNetworkRoute *addr);

Add a network interface route. This will be ignored unless DHCP has been disabled

Parameters

config

the sandbox network configuration.

[transfer none]

addr

the network route.

[transfer none]

gvir_sandbox_config_network_get_routes ()

GList *
gvir_sandbox_config_network_get_routes
                               (GVirSandboxConfigNetwork *config);

Retrieve the list of network interface routes

Parameters

config

the sandbox network configuration.

[transfer none]

Returns

the route list.

[transfer full][element-type GVirSandboxConfigNetworkRoute]

Types and Values

GVIR_SANDBOX_TYPE_CONFIG_NETWORK_HANDLE

#define GVIR_SANDBOX_TYPE_CONFIG_NETWORK_HANDLE      (gvir_sandbox_config_network_handle_get_type ())

struct GVirSandboxConfigNetwork

struct GVirSandboxConfigNetwork;

struct GVirSandboxConfigNetworkClass

struct GVirSandboxConfigNetworkClass {
    GObjectClass parent_class;

    gpointer padding[LIBVIRT_SANDBOX_CLASS_PADDING];
};

GVirSandboxConfigNetworkPrivate

typedef struct _GVirSandboxConfigNetworkPrivate GVirSandboxConfigNetworkPrivate;

Property Details

The “dhcp” property

  “dhcp”                     gboolean

Enable DHCP.

Flags: Read / Write

Default value: TRUE


The “mac” property

  “mac”                      gchar *

MAC address.

Flags: Read / Write

Default value: NULL


The “source” property

  “source”                   gchar *

Source network.

Flags: Read / Write

Default value: NULL