37 #ifndef __lib_internal_h__
38 #define __lib_internal_h__
47 #define __WIMAXLL_IFNAME_LEN 32
131 #define WIMAXLL_CB_CTX_INIT(_wmx) { \
133 .result = -EINPROGRESS, \
161 ctx->
result = -EINPROGRESS;
177 if (ctx != NULL && ctx->
result == -EINPROGRESS)
256 __attribute__ ((format(printf, 2, 3)));
261 void (*cb)(
void *, const
char *,
int),
int genl_ctrl_get_version(struct nl_handle *nlh, const char *name)
Definition: genl.c:171
A WiMax control pipe handle.
Definition: internal.h:219
void * msg_to_user_priv
Definition: internal.h:229
wimaxll_msg_to_user_cb_f msg_to_user_cb
Definition: internal.h:228
int gnl_family_id
Definition: internal.h:221
int nl_get_multicast_groups(struct nl_handle *handle, const char *family, void(*cbf)(void *, const char *, int), void *priv)
Enumerates the list of available multicast groups for a family.
Definition: genl.c:118
void wimaxll_cb_ctx_init(struct wimaxll_cb_ctx *ctx, struct wimaxll_handle *wmx)
Initialize a struct wimaxll_cb_ctx.
Definition: internal.h:158
void wimaxll_msg(struct wimaxll_handle *, const char *fmt,...) __attribute__((format(printf
int wimaxll_gnl_error_cb(struct sockaddr_nl *, struct nlmsgerr *, void *)
Netlink callback to process netlink callback errors.
Definition: wimax.c:72
int wimaxll_gnl_handle_msg_to_user(struct wimaxll_handle *, struct nl_msg *)
Callback to process an WIMAX_GNL_OP_MSG_TO_USER from the kernel.
Definition: op-msg.c:156
General structure for storing callback context.
Definition: internal.h:108
void * state_change_priv
Definition: internal.h:232
struct nl_handle * nlh_tx
Definition: internal.h:225
int wimaxll_wait_for_ack(struct wimaxll_handle *)
Wait for a netlink ACK and pass on the result code it passed.
Definition: wimax.c:165
int wimaxll_gnl_ack_cb(struct nl_msg *msg, void *_mch)
Netlink callback to process an ack message and pass the 'error' code.
Definition: wimax.c:105
#define __WIMAXLL_IFNAME_LEN
Definition: internal.h:47
int(* wimaxll_state_change_cb_f)(struct wimaxll_handle *, void *priv, enum wimax_st old_state, enum wimax_st new_state)
Callback for a state change notification from the WiMAX kernel stack.
Definition: wimaxll.h:305
struct nl_handle * nlh_rx
Definition: internal.h:226
char name[__WIMAXLL_IFNAME_LEN]
Definition: internal.h:222
unsigned ifidx
Definition: internal.h:220
struct wimaxll_handle * wmx
Definition: internal.h:109
wimaxll_state_change_cb_f state_change_cb
Definition: internal.h:231
WIMAXLL_IFNAME_LEN - Maximum size of a wimax interface name.
Definition: internal.h:52
int wimaxll_gnl_handle_state_change(struct wimaxll_handle *, struct nl_msg *)
Callback to process an WIMAX_GNL_RE_STATE_CHANGE from the kernel.
Definition: re-state-change.c:120
int(* wimaxll_msg_to_user_cb_f)(struct wimaxll_handle *wmx, void *priv, const char *pipe_name, const void *data, size_t size)
Callback for a message to user generic netlink message.
Definition: wimaxll.h:278
void wimaxll_cb_maybe_set_result(struct wimaxll_cb_ctx *ctx, int val)
Set the result value in a callback context.
Definition: internal.h:175
int mcg_id
Definition: internal.h:221
ssize_t result
Definition: internal.h:110
unsigned msg_done
Definition: internal.h:111
void * priv
Definition: internal.h:223