/** * struct ynl_error - error encountered by YNL * @code: errno (low values) or YNL error code (enum ynl_error_code) * @attr_offs: offset of bad attribute (for very advanced users) * @msg: error message * * Error information for when YNL operations fail. * Users should interact with the err member of struct ynl_sock directly. * The main exception to that rule is ynl_sock_create().
*/ struct ynl_error { enum ynl_error_code code; unsignedint attr_offs; char msg[512];
};
/** * struct ynl_family - YNL family info * Family description generated by codegen. Pass to ynl_sock_create().
*/ struct ynl_family { /* private: */ constchar *name;
size_t hdr_len; bool is_classic;
__u16 classic_id; conststruct ynl_ntf_info *ntf_info; unsignedint ntf_info_size;
};
/** * struct ynl_string - parsed individual string * @len: length of the string (excluding terminating character) * @str: value of the string * * Parsed and nul-terminated string. This struct is only used for arrays of * strings. Non-array string members are placed directly in respective types.
*/ struct ynl_string { unsignedint len; char str[];
};
#define ynl_dump_foreach(dump, iter) \ for (typeof(dump->obj) *iter = &dump->obj; \
!ynl_dump_obj_is_last(iter); \
iter = ynl_dump_obj_next(iter))
/** * ynl_dump_empty() - does the dump have no entries * @dump: pointer to the dump list, as returned by a dump call * * Check if the dump is empty, i.e. contains no objects. * Dump calls return NULL on error, and terminator element if empty.
*/ staticinlinebool ynl_dump_empty(void *dump)
{ return dump == (void *)YNL_LIST_END;
}
int ynl_subscribe(struct ynl_sock *ys, constchar *grp_name); int ynl_socket_get_fd(struct ynl_sock *ys); int ynl_ntf_check(struct ynl_sock *ys);
/** * ynl_has_ntf() - check if socket has *parsed* notifications * @ys: active YNL socket * * Note that this does not take into account notifications sitting * in netlink socket, just the notifications which have already been * read and parsed (e.g. during a ynl_ntf_check() call).
*/ staticinlinebool ynl_has_ntf(struct ynl_sock *ys)
{ return ys->ntf_last_next != &ys->ntf_first;
} struct ynl_ntf_base_type *ynl_ntf_dequeue(struct ynl_sock *ys);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.