wimax-tools 1.4.4
Functions

/home/users/builder/rpm/BUILD/wimax-tools-1.4.4/lib/op-msg.c File Reference

#include <sys/types.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <errno.h>
#include <assert.h>
#include <linux/types.h>
#include <netlink/msg.h>
#include <netlink/genl/genl.h>
#include <wimaxll.h>
#include "internal.h"
#include "debug.h"

Functions

int wimaxll_gnl_handle_msg_to_user (struct wimaxll_handle *wmx, struct nl_msg *msg)
 Callback to process an WIMAX_GNL_OP_MSG_TO_USER from the kernel.
ssize_t wimaxll_msg_read (struct wimaxll_handle *wmx, const char *pipe_name, void **buf)
 Read a message from any WiMAX kernel-user pipe.
void wimaxll_msg_free (void *msg)
 Free a message received with wimaxll_msg_read()
ssize_t wimaxll_msg_write (struct wimaxll_handle *wmx, const char *pipe_name, const void *buf, size_t size)
 Send a driver-specific message to a WiMAX device.
void wimaxll_get_cb_msg_to_user (struct wimaxll_handle *wmx, wimaxll_msg_to_user_cb_f *cb, void **priv)
 Get the callback and priv pointer for a MSG_TO_USER message.
void wimaxll_set_cb_msg_to_user (struct wimaxll_handle *wmx, wimaxll_msg_to_user_cb_f cb, void *priv)
 Set the callback and priv pointer for a MSG_TO_USER message.

Function Documentation

void wimaxll_get_cb_msg_to_user ( struct wimaxll_handle wmx,
wimaxll_msg_to_user_cb_f cb,
void **  priv 
)

Get the callback and priv pointer for a MSG_TO_USER message.

Get the callback and private pointer that will be called by wimaxll_recv() when a MSG_TO_USER is received over generic netlink.

Parameters:
wmxWiMAX handle.
cbWhere to store the current callback function.
privWhere to store the private data pointer passed to the callback.

Referenced by wimaxll_msg_read().

int wimaxll_gnl_handle_msg_to_user ( struct wimaxll_handle wmx,
struct nl_msg *  msg 
)

Callback to process an WIMAX_GNL_OP_MSG_TO_USER from the kernel.

void wimaxll_set_cb_msg_to_user ( struct wimaxll_handle wmx,
wimaxll_msg_to_user_cb_f  cb,
void *  priv 
)

Set the callback and priv pointer for a MSG_TO_USER message.

Set the callback and private pointer that will be called by wimaxll_recv() when a MSG_TO_USER is received over generic netlink.

Parameters:
wmxWiMAX handle.
cbCallback function to set
privPrivate data pointer to pass to the callback function (wrap a struct wimaxll_cb_ctx in your context struct and pass a pointer to it; then use wimaxll_container_of() to extract it back).

Referenced by wimaxll_msg_read().