55 void *
data,
size_t len,
int *found ) {
58 strlen ( parent_name ) + 1 +
69 "info-get guestinfo.ipxe.%s%s%s%s%s",
70 parent_name, ( parent_name[0] ?
"." :
"" ),
setting->
name,
77 goto err_get_info_len;
86 type = ( predefined ? predefined->
type : &setting_type_string );
93 DBGC (
settings,
"GuestInfo %p could not allocate %d bytes\n",
103 if ( check_len < 0 ) {
108 DBGC (
settings,
"GuestInfo %p length mismatch (expected %d, "
119 DBGC (
settings,
"GuestInfo %p could not parse \"%s\" as %s: "
187 DBG (
"GuestInfo could not open channel: %s\n",
194 "vmware" ) ) != 0 ) {
195 DBG (
"GuestInfo could not register settings: %s\n",
226 "vmware" ) ) != 0 ) {
227 DBGC (
settings,
"GuestInfo %p could not register for %s: %s\n",
240 .priv_len =
sizeof (
struct settings ),
#define NULL
NULL pointer (VOID *)
struct arbelprm_rc_send_wqe rc
#define assert(condition)
Assert a condition at run-time.
uint32_t type
Operating system type.
uint8_t data[48]
Additional event data.
static struct net_device * netdev
#define DBG(...)
Print a debugging message.
#define INIT_NORMAL
Normal initialisation.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define ENOENT
No such file or directory.
#define ENOMEM
Not enough space.
#define EIO
Input/output error.
static int guestinfo_net_probe(struct net_device *netdev, void *priv)
Create per-netdevice GuestInfo settings.
static struct settings_operations guestinfo_settings_operations
GuestInfo settings operations.
static int guestinfo_channel
GuestInfo GuestRPC channel.
static int guestinfo_fetch_type(struct settings *settings, struct setting *setting, const struct setting_type *type, void *data, size_t len, int *found)
Fetch value of typed GuestInfo setting.
static int guestinfo_fetch(struct settings *settings, struct setting *setting, void *data, size_t len)
Fetch value of GuestInfo setting.
static struct settings guestinfo_settings
GuestInfo settings.
static void guestinfo_init(void)
Initialise GuestInfo settings.
int guestrpc_open(void)
Open GuestRPC channel.
int guestrpc_command(int channel, const char *command, char *reply, size_t reply_len)
Issue GuestRPC command.
VMware GuestRPC mechanism.
uint8_t info_len
Reject information length.
static void settings_init(struct settings *settings, struct settings_operations *op, struct refcnt *refcnt, const struct settings_scope *default_scope)
Initialise a settings block.
#define SETTING_TYPES
Configuration setting type table.
#define __init_fn(init_order)
Declare an initialisation functon.
#define LIST_HEAD_INIT(list)
Initialise a static list head.
void * zalloc(size_t size)
Allocate cleared memory.
Network device management.
#define __net_driver
Declare a network driver.
static struct settings * netdev_settings(struct net_device *netdev)
Get per-netdevice configuration settings block.
static void(* free)(struct refcnt *refcnt))
int register_settings(struct settings *settings, struct settings *parent, const char *name)
Register settings block.
int setting_parse(const struct setting_type *type, const char *value, void *buf, size_t len)
Parse formatted string to setting value.
struct setting * find_setting(const char *name)
Find predefined setting.
char * strerror(int errno)
Retrieve string representation of error number.
size_t strlen(const char *src)
Get length of string.
An initialisation function.
A network upper-layer driver.
const struct setting_type * type
Setting type.
Settings block operations.
struct settings * parent
Parent settings block.
#define for_each_table_entry(pointer, table)
Iterate through all entries within a linker table.
static struct tlan_private * priv
int snprintf(char *buf, size_t size, const char *fmt,...)
Write a formatted string to a buffer.