libosmocore 1.9.0.196-9975
Osmocom core library
mnl.h
Go to the documentation of this file.
1
4#pragma once
5
7#include <libmnl/libmnl.h>
8
10struct osmo_mnl {
12 struct osmo_fd ofd;
14 struct mnl_socket *mnls;
16 mnl_cb_t mnl_cb;
18 void *priv;
19};
20
21struct osmo_mnl *osmo_mnl_init(void *ctx, int bus, unsigned int groups, mnl_cb_t mnl_cb, void *priv);
22void osmo_mnl_destroy(struct osmo_mnl *omnl);
void osmo_mnl_destroy(struct osmo_mnl *omnl)
destroy an existing osmocom-wrapped mnl netlink socket: Unregister + close + free.
Definition: mnl.c:103
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:63
libmnl integration
Structure representing a file dsecriptor.
Definition: select.h:31
osmocom wrapper around libmnl abstraction of netlink socket
Definition: mnl.h:10
struct osmo_fd ofd
osmo-wrapped netlink file descriptor
Definition: mnl.h:12
mnl_cb_t mnl_cb
call-back called for received netlink messages
Definition: mnl.h:16
void * priv
opaque data provided by user
Definition: mnl.h:18
struct mnl_socket * mnls
libmnl socket abstraction
Definition: mnl.h:14