libosmocore 1.13.1.1-afb4 Osmocom core library

mnl.h
Go to the documentation of this file.
1
4#pragma once
5
6#include <osmocom/core/select.h>
7#include <libmnl/libmnl.h>
8
10 struct osmo_mnl {
12 struct osmo_fd ofd;
14 struct mnl_socket *mnls;
16 mnl_cb_t mnl_cb;
18 void *priv;
19};
20
21 struct osmo_mnl *osmo_mnl_init(void *ctx, int bus, unsigned int groups, mnl_cb_t mnl_cb, void *priv);
22 void osmo_mnl_destroy(struct osmo_mnl *omnl);
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:104
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:64
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