GVirSandboxConfigNetwork

GVirSandboxConfigNetwork — Kernel ramdisk configuration details

Synopsis

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

#define             GVIR_SANDBOX_TYPE_CONFIG_NETWORK_HANDLE
struct              GVirSandboxConfigNetwork;
struct              GVirSandboxConfigNetworkClass;
GVirSandboxConfigNetwork * gvir_sandbox_config_network_new
                                                        (void);
void                gvir_sandbox_config_network_set_source
                                                        (GVirSandboxConfigNetwork *config,
                                                         const gchar *network);
const gchar *       gvir_sandbox_config_network_get_source
                                                        (GVirSandboxConfigNetwork *config);
void                gvir_sandbox_config_network_set_mac (GVirSandboxConfigNetwork *config,
                                                         const gchar *mac);
const gchar *       gvir_sandbox_config_network_get_mac (GVirSandboxConfigNetwork *config);
void                gvir_sandbox_config_network_set_dhcp
                                                        (GVirSandboxConfigNetwork *config,
                                                         gboolean dhcp);
gboolean            gvir_sandbox_config_network_get_dhcp
                                                        (GVirSandboxConfigNetwork *config);
void                gvir_sandbox_config_network_add_address
                                                        (GVirSandboxConfigNetwork *config,
                                                         GVirSandboxConfigNetworkAddress *addr);
GList *             gvir_sandbox_config_network_get_addresses
                                                        (GVirSandboxConfigNetwork *config);
void                gvir_sandbox_config_network_add_route
                                                        (GVirSandboxConfigNetwork *config,
                                                         GVirSandboxConfigNetworkRoute *addr);
GList *             gvir_sandbox_config_network_get_routes
                                                        (GVirSandboxConfigNetwork *config);

Object Hierarchy

  GObject
   +----GVirSandboxConfigNetwork

Properties

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

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.

Details

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];
};

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

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

config :

the sandbox network configuration. [transfer none]

Returns :

the address list. [transfer full][element-type GVirSandboxConfigNetworkAddress]

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

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

config :

the sandbox network configuration. [transfer none]

Returns :

the route list. [transfer full][element-type GVirSandboxConfigNetworkRoute]

Property Details

The "dhcp" property

  "dhcp"                     gboolean              : Read / Write

Enable DHCP.

Default value: TRUE


The "mac" property

  "mac"                      gchar*                : Read / Write

MAC address.

Default value: NULL


The "source" property

  "source"                   gchar*                : Read / Write

Source network.

Default value: NULL