50 DBGC ( params,
"PARAMS \"%s\" destroyed\n", params->
name );
94 claim_parameters ( params );
95 params_put ( params );
100 params =
zalloc (
sizeof ( *params ) + name_len );
104 name_copy = ( (
void * ) ( params + 1 ) );
109 params->
name = name_copy;
116 DBGC ( params,
"PARAMS \"%s\" created\n", params->
name );
131 unsigned int flags ) {
144 key_copy = ( (
void * ) (
param + 1 ) );
145 value_copy = ( key_copy + key_len );
149 param->key = key_copy;
151 param->value = value_copy;
157 DBGC ( params,
"PARAMS \"%s\" added \"%s\"=\"%s\"%s%s\n",
static void free_parameters(struct refcnt *refcnt)
Free request parameter list.
#define ref_init(refcnt, free)
Initialise a reference counter.
A request parameter list.
struct parameters * find_parameters(const char *name)
Find request parameter list by name.
#define list_del(list)
Delete an entry from a list.
struct refcnt refcnt
Reference count.
#define container_of(ptr, type, field)
Get containing structure.
#define list_for_each_entry(pos, head, member)
Iterate over entries in a list.
pseudo_bit_t value[0x00020]
#define list_add_tail(new, head)
Add a new entry to the tail of a list.
char * strcpy(char *dest, const char *src)
Copy string.
struct parameters * create_parameters(const char *name)
Create request parameter list.
#define list_for_each_entry_safe(pos, tmp, head, member)
Iterate over entries in a list, safe against deletion of the current entry.
static void(* free)(struct refcnt *refcnt))
void * zalloc(size_t size)
Allocate cleared memory.
struct hv_monitor_parameter param[4][32]
Parameters.
size_t strlen(const char *src)
Get length of string.
struct list_head entries
Parameters.
struct list_head list
List of request parameters.
struct list_head list
List of all parameter lists.
#define PARAMETER_FORM
Request parameter is a form parameter.
static LIST_HEAD(parameters)
List of all parameter lists.
#define INIT_LIST_HEAD(list)
Initialise a list head.
int strcmp(const char *first, const char *second)
Compare strings.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
struct parameter * add_parameter(struct parameters *params, const char *key, const char *value, unsigned int flags)
Add request parameter.
#define NULL
NULL pointer (VOID *)
#define PARAMETER_HEADER
Request parameter is a header parameter.