mnl.h
Go to the documentation of this file.
#pragma once
#include <osmocom/core/select.h>
#include <libmnl/libmnl.h>
struct osmo_mnl {
struct osmo_fd ofd;
struct mnl_socket *mnls;
mnl_cb_t mnl_cb;
void *priv;
};
struct osmo_mnl *osmo_mnl_init(void *ctx, int bus, unsigned int groups, mnl_cb_t mnl_cb, void *priv);
void osmo_mnl_destroy(struct osmo_mnl *omnl);
osmo_mnl_init
struct osmo_mnl * osmo_mnl_init(void *ctx, int bus, unsigned int groups, mnl_cb_t mnl_cb, void *priv)
create an osmocom-wrapped limnl netlink socket.
Definition: mnl.c:68
osmo_mnl_destroy
void osmo_mnl_destroy(struct osmo_mnl *omnl)
destroy an existing osmocom-wrapped mnl netlink socket: Unregister + close + free.
Definition: mnl.c:108
select.h
libmnl integration
osmo_fd
Structure representing a file dsecriptor.
Definition: select.h:31
osmo_mnl
osmocom wrapper around libmnl abstraction of netlink socket
Definition: mnl.h:10
osmo_mnl::ofd
struct osmo_fd ofd
osmo-wrapped netlink file descriptor
Definition: mnl.h:12
osmo_mnl::mnl_cb
mnl_cb_t mnl_cb
call-back called for received netlink messages
Definition: mnl.h:16
osmo_mnl::priv
void * priv
opaque data provided by user
Definition: mnl.h:18
osmo_mnl::mnls
struct mnl_socket * mnls
libmnl socket abstraction
Definition: mnl.h:14