Example #1
0
static int handle_eamt_count(struct eam_table *eamt, struct genl_info *info)
{
	__u64 count;
	int error;

	log_debug("Returning EAMT count.");

	error = eamt_count(eamt, &count);
	if (error)
		return nlcore_respond(info, error);

	return nlcore_respond_struct(info, &count, sizeof(count));
}
Example #2
0
static int handle_session_count(struct bib *db, struct genl_info *info,
		struct request_session *request)
{
	int error;
	__u64 count;

	log_debug("Returning session count.");

	error = bib_count_sessions(db, request->l4_proto, &count);
	if (error)
		return nlcore_respond(info, error);

	return nlcore_respond_struct(info, &count, sizeof(count));
}