Lines Matching refs:key
41 * Given an options string of the form 'a=b c=d ... y=z' and a key,
42 * looks for the given key's value in the string and returns it in buf
43 * with a maximum of bufsize bytes. If the key is found, returns true;
49 optstr_get_pointer(const char *optstr, const char *key, const char **result)
57 /* Search for the given key within the option string. */
61 /* Check if the next word matches the key. */
62 keyp = key;
71 /* Key not found; skip until next space. */
90 optstr_get(const char *optstr, const char *key, char *buf, size_t bufsize)
93 bool found = optstr_get_pointer(optstr, key, &data);
95 /* If the key was found; copy its value to the target buffer. */
108 optstr_get_string(const char *optstr, const char *key, const char **result)
111 const bool found = optstr_get_pointer(optstr, key, &data);
113 /* If the key was found; copy its value to the target buffer. */
121 optstr_get_number(const char *optstr, const char *key, unsigned long *result)
124 const bool found = optstr_get_pointer(optstr, key, &data);
126 /* If the key was found; copy its value to the target buffer. */
139 optstr_get_number_hex(const char *optstr, const char *key,
143 const bool found = optstr_get_pointer(optstr, key, &data);
145 /* If the key was found; copy its value to the target buffer. */
158 optstr_get_number_binary(const char *optstr, const char *key,
162 const bool found = optstr_get_pointer(optstr, key, &data);
164 /* If the key was found; copy its value to the target buffer. */
179 optstr_get_macaddr(const char *optstr, const char *key,
183 const bool found = optstr_get_pointer(optstr, key, &data);
185 /* If the key was found; copy its value to the target buffer. */