annotate exported symbols and hide everything else
Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
parent
09f26e091b
commit
37d31a6e42
|
@ -28,6 +28,7 @@ CPPFLAGS += @CPPFLAGS@
|
|||
|
||||
CFLAGS += @CFLAGS@ @DEFS@
|
||||
CFLAGS += -include config.h -I include
|
||||
CFLAGS += -fvisibility=hidden
|
||||
CFLAGS += -fstack-protector-all
|
||||
|
||||
CFLAGS += -Wall
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
#define _UTILS_H
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifndef AF_DECT
|
||||
#define AF_DECT 37
|
||||
|
@ -17,6 +20,7 @@
|
|||
#define __fmtstring(x, y) __attribute__((format(printf, x, y)))
|
||||
#define __aligned(x) __attribute__((aligned(x)))
|
||||
#define __packed __attribute__((packed))
|
||||
#define __visible __attribute__((visibility("default")))
|
||||
|
||||
extern void __dect_debug(const char *fmt, ...) __fmtstring(1, 2);
|
||||
extern void __dect_hexdump(const char *prefix, const uint8_t *buf, size_t size);
|
||||
|
@ -48,6 +52,7 @@ extern const char *__dect_val2str(const struct dect_trans_tbl *tbl, unsigned int
|
|||
#define dect_flags2str(trans, buf, val) \
|
||||
__dect_flags2str(trans, array_size(trans), buf, sizeof(buf), val)
|
||||
|
||||
struct dect_handle;
|
||||
extern void *dect_malloc(const struct dect_handle *dh, size_t size);
|
||||
extern void *dect_zalloc(const struct dect_handle *dh, size_t size);
|
||||
extern void dect_free(const struct dect_handle *dh, void *ptr);
|
||||
|
@ -83,6 +88,7 @@ extern int dect_register_fd(const struct dect_handle *dh, struct dect_fd *dfd,
|
|||
uint32_t events);
|
||||
extern void dect_unregister_fd(const struct dect_handle *dh, struct dect_fd *dfd);
|
||||
|
||||
#define EXPORT_SYMBOL(x) typeof(x) (x) __visible
|
||||
#define BUG() assert(0)
|
||||
|
||||
/* Force a compilation error if condition is true */
|
||||
|
|
|
@ -41,6 +41,7 @@ void dect_pin_to_ac(const char *pin, uint8_t *ac, unsigned int ac_len)
|
|||
ac[ac_len - i / 2 - 1] |= (pin[len - i - 1] - '0') << shift;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(dect_pin_to_ac);
|
||||
|
||||
/**
|
||||
* dect_auth_b1 - derive authentication key K from UAK/AC
|
||||
|
@ -59,6 +60,7 @@ void dect_auth_b1(const uint8_t *val, unsigned int len, uint8_t *k)
|
|||
for (i = 0; i < DECT_AUTH_KEY_LEN; i++)
|
||||
k[i] = val[i % len];
|
||||
}
|
||||
EXPORT_SYMBOL(dect_auth_b1);
|
||||
|
||||
/**
|
||||
* dect_auth_b2 - derive authentication key K from UAK and UPI
|
||||
|
@ -80,6 +82,7 @@ void dect_auth_b2(const uint8_t *uak, unsigned int uak_len,
|
|||
for (i = 0; i < DECT_AUTH_KEY_LEN; i++)
|
||||
k[i] = uak[i % uak_len] ^ upi[i % upi_len];
|
||||
}
|
||||
EXPORT_SYMBOL(dect_auth_b2);
|
||||
|
||||
static void dect_auth_calc(const uint8_t *key, uint64_t val, uint8_t *e)
|
||||
{
|
||||
|
@ -110,6 +113,7 @@ void dect_auth_a11(const uint8_t *k, uint64_t rs, uint8_t *ks)
|
|||
{
|
||||
dect_auth_calc(k, rs, ks);
|
||||
}
|
||||
EXPORT_SYMBOL(dect_auth_a11);
|
||||
|
||||
/**
|
||||
* dect_auth_a12 - derive cipher key and authentication response
|
||||
|
@ -130,6 +134,7 @@ void dect_auth_a12(const uint8_t *ks, uint64_t rand_f, uint8_t *dck, uint32_t *r
|
|||
memcpy(dck, e + 4, DECT_CIPHER_KEY_LEN);
|
||||
memcpy(res1, e + 12, DECT_AUTH_RES_LEN);
|
||||
}
|
||||
EXPORT_SYMBOL(dect_auth_a12);
|
||||
|
||||
/**
|
||||
* dect_auth_a21 - derive authentication session key
|
||||
|
@ -149,6 +154,7 @@ void dect_auth_a21(const uint8_t *k, uint64_t rs, uint8_t *ks)
|
|||
for (i = 0; i < DECT_AUTH_KEY_LEN; i++)
|
||||
ks[i] ^= 0xaa;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_auth_a21);
|
||||
|
||||
/**
|
||||
* dect_auth_a22 - derive authentication response
|
||||
|
@ -167,6 +173,7 @@ void dect_auth_a22(const uint8_t *ks, uint64_t rand_p, uint32_t *res2)
|
|||
dect_auth_calc(ks, rand_p, e);
|
||||
memcpy(res2, e + 12, DECT_AUTH_RES_LEN);
|
||||
}
|
||||
EXPORT_SYMBOL(dect_auth_a22);
|
||||
|
||||
/*
|
||||
* DSAA/DSC key allocation test from ETS EN 300 175-7 Annex K
|
||||
|
|
22
src/cc.c
22
src/cc.c
|
@ -314,11 +314,13 @@ void *dect_call_priv(struct dect_call *call)
|
|||
{
|
||||
return call->priv;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_call_priv);
|
||||
|
||||
const struct dect_ipui *dect_call_portable_identity(const struct dect_call *call)
|
||||
{
|
||||
return &call->pt_id->ipui;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_call_portable_identity);
|
||||
|
||||
int dect_dl_u_data_req(const struct dect_handle *dh, struct dect_call *call,
|
||||
struct dect_msg_buf *mb)
|
||||
|
@ -337,6 +339,7 @@ int dect_dl_u_data_req(const struct dect_handle *dh, struct dect_call *call,
|
|||
mb->len, strerror(errno));
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_dl_u_data_req);
|
||||
|
||||
static void dect_cc_lu_event(struct dect_handle *dh, struct dect_fd *fd,
|
||||
uint32_t event)
|
||||
|
@ -418,6 +421,7 @@ err2:
|
|||
err1:
|
||||
return NULL;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_call_alloc);
|
||||
|
||||
static void dect_call_destroy(const struct dect_handle *dh,
|
||||
struct dect_call *call)
|
||||
|
@ -514,6 +518,7 @@ err2:
|
|||
err1:
|
||||
return -1;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mncc_setup_req);
|
||||
|
||||
int dect_mncc_setup_ack_req(struct dect_handle *dh, struct dect_call *call,
|
||||
const struct dect_mncc_setup_ack_param *param)
|
||||
|
@ -539,6 +544,7 @@ int dect_mncc_setup_ack_req(struct dect_handle *dh, struct dect_call *call,
|
|||
return dect_cc_send_msg(dh, call, &cc_setup_ack_msg_desc,
|
||||
&msg.common, CC_SETUP_ACK);
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mncc_setup_ack_req);
|
||||
|
||||
int dect_mncc_reject_req(struct dect_handle *dh, struct dect_call *call,
|
||||
const struct dect_mncc_release_param *param)
|
||||
|
@ -565,6 +571,7 @@ int dect_mncc_reject_req(struct dect_handle *dh, struct dect_call *call,
|
|||
dect_call_destroy(dh, call);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mncc_reject_req);
|
||||
|
||||
int dect_mncc_call_proc_req(struct dect_handle *dh, struct dect_call *call,
|
||||
const struct dect_mncc_call_proc_param *param)
|
||||
|
@ -587,6 +594,7 @@ int dect_mncc_call_proc_req(struct dect_handle *dh, struct dect_call *call,
|
|||
return dect_cc_send_msg(dh, call, &cc_call_proc_msg_desc,
|
||||
&msg.common, CC_CALL_PROC);
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mncc_call_proc_req);
|
||||
|
||||
int dect_mncc_alert_req(struct dect_handle *dh, struct dect_call *call,
|
||||
const struct dect_mncc_alert_param *param)
|
||||
|
@ -610,6 +618,7 @@ int dect_mncc_alert_req(struct dect_handle *dh, struct dect_call *call,
|
|||
return dect_cc_send_msg(dh, call, &cc_alerting_msg_desc,
|
||||
&msg.common, CC_ALERTING);
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mncc_alert_req);
|
||||
|
||||
int dect_mncc_connect_req(struct dect_handle *dh, struct dect_call *call,
|
||||
const struct dect_mncc_connect_param *param)
|
||||
|
@ -635,6 +644,7 @@ int dect_mncc_connect_req(struct dect_handle *dh, struct dect_call *call,
|
|||
dect_call_connect_uplane(dh, call);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mncc_connect_req);
|
||||
|
||||
int dect_mncc_connect_res(struct dect_handle *dh, struct dect_call *call,
|
||||
const struct dect_mncc_connect_param *param)
|
||||
|
@ -660,6 +670,7 @@ err1:
|
|||
dect_call_disconnect_uplane(dh, call);
|
||||
return -1;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mncc_connect_res);
|
||||
|
||||
int dect_mncc_release_req(struct dect_handle *dh, struct dect_call *call,
|
||||
const struct dect_mncc_release_param *param)
|
||||
|
@ -680,6 +691,7 @@ int dect_mncc_release_req(struct dect_handle *dh, struct dect_call *call,
|
|||
call->state = DECT_CC_RELEASE_PENDING;
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mncc_release_req);
|
||||
|
||||
int dect_mncc_release_res(struct dect_handle *dh, struct dect_call *call,
|
||||
const struct dect_mncc_release_param *param)
|
||||
|
@ -707,6 +719,7 @@ int dect_mncc_release_res(struct dect_handle *dh, struct dect_call *call,
|
|||
dect_call_destroy(dh, call);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mncc_release_res);
|
||||
|
||||
int dect_mncc_facility_req(struct dect_handle *dh, struct dect_call *call,
|
||||
const struct dect_mncc_facility_param *param)
|
||||
|
@ -714,6 +727,7 @@ int dect_mncc_facility_req(struct dect_handle *dh, struct dect_call *call,
|
|||
cc_debug_entry(call, "MNCC_FACILITY-req");
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mncc_facility_req);
|
||||
|
||||
int dect_mncc_info_req(struct dect_handle *dh, struct dect_call *call,
|
||||
const struct dect_mncc_info_param *param)
|
||||
|
@ -744,6 +758,7 @@ int dect_mncc_info_req(struct dect_handle *dh, struct dect_call *call,
|
|||
dect_cc_send_msg(dh, call, &cc_info_msg_desc, &msg.common, CC_INFO);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mncc_info_req);
|
||||
|
||||
int dect_mncc_modify_req(struct dect_handle *dh, struct dect_call *call,
|
||||
const struct dect_mncc_modify_param *param)
|
||||
|
@ -751,6 +766,7 @@ int dect_mncc_modify_req(struct dect_handle *dh, struct dect_call *call,
|
|||
cc_debug_entry(call, "MNCC_MODIFY-req");
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mncc_modify_req);
|
||||
|
||||
int dect_mncc_modify_res(struct dect_handle *dh, struct dect_call *call,
|
||||
const struct dect_mncc_modify_param *param)
|
||||
|
@ -758,6 +774,7 @@ int dect_mncc_modify_res(struct dect_handle *dh, struct dect_call *call,
|
|||
cc_debug_entry(call, "MNCC_MODIFY-res");
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mncc_modify_res);
|
||||
|
||||
int dect_mncc_hold_req(struct dect_handle *dh, struct dect_call *call,
|
||||
const struct dect_mncc_hold_param *param)
|
||||
|
@ -765,6 +782,7 @@ int dect_mncc_hold_req(struct dect_handle *dh, struct dect_call *call,
|
|||
cc_debug_entry(call, "MNCC_HOLD-req");
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mncc_hold_req);
|
||||
|
||||
int dect_mncc_hold_res(struct dect_handle *dh, struct dect_call *call,
|
||||
const struct dect_mncc_hold_param *param)
|
||||
|
@ -772,6 +790,7 @@ int dect_mncc_hold_res(struct dect_handle *dh, struct dect_call *call,
|
|||
cc_debug_entry(call, "MNCC_HOLD-res");
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mncc_hold_res);
|
||||
|
||||
int dect_mncc_retrieve_req(struct dect_handle *dh, struct dect_call *call,
|
||||
const struct dect_mncc_hold_param *param)
|
||||
|
@ -779,6 +798,7 @@ int dect_mncc_retrieve_req(struct dect_handle *dh, struct dect_call *call,
|
|||
cc_debug_entry(call, "MNCC_RETRIEVE-req");
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mncc_retrieve_req);
|
||||
|
||||
int dect_mncc_retrieve_res(struct dect_handle *dh, struct dect_call *call,
|
||||
const struct dect_mncc_hold_param *param)
|
||||
|
@ -786,6 +806,7 @@ int dect_mncc_retrieve_res(struct dect_handle *dh, struct dect_call *call,
|
|||
cc_debug_entry(call, "MNCC_RETRIEVE-res");
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mncc_retrieve_res);
|
||||
|
||||
int dect_mncc_iwu_info_req(struct dect_handle *dh, struct dect_call *call,
|
||||
const struct dect_mncc_iwu_info_param *param)
|
||||
|
@ -793,6 +814,7 @@ int dect_mncc_iwu_info_req(struct dect_handle *dh, struct dect_call *call,
|
|||
cc_debug_entry(call, "MNCC_IWU_INFO-req");
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mncc_iwu_info_req);
|
||||
|
||||
static void dect_mncc_alert_ind(struct dect_handle *dh, struct dect_call *call,
|
||||
struct dect_cc_alerting_msg *msg)
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
* the name of the module which it is implementing.
|
||||
*
|
||||
*/
|
||||
#include <utils.h>
|
||||
#include "g72x.h"
|
||||
|
||||
static short qtab_721[7] = {-124, 80, 178, 246, 300, 349, 400};
|
||||
|
@ -122,6 +123,7 @@ g721_encoder(
|
|||
|
||||
return (i);
|
||||
}
|
||||
EXPORT_SYMBOL(g721_encoder);
|
||||
|
||||
/*
|
||||
* g721_decoder()
|
||||
|
@ -171,3 +173,4 @@ g721_decoder(
|
|||
return (-1);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(g721_decoder);
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <utils.h>
|
||||
#include "g72x.h"
|
||||
|
||||
static short power2[15] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80,
|
||||
|
@ -115,6 +116,7 @@ g72x_init_state(
|
|||
}
|
||||
state_ptr->td = 0;
|
||||
}
|
||||
EXPORT_SYMBOL(g72x_init_state);
|
||||
|
||||
/*
|
||||
* predictor_zero()
|
||||
|
|
13
src/ie.c
13
src/ie.c
|
@ -41,11 +41,13 @@ struct dect_ie_common *dect_ie_alloc(const struct dect_handle *dh,
|
|||
ie->refcnt = 1;
|
||||
return ie;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_ie_alloc);
|
||||
|
||||
void dect_ie_destroy(const struct dect_handle *dh, struct dect_ie_common *ie)
|
||||
{
|
||||
dect_free(dh, ie);
|
||||
}
|
||||
EXPORT_SYMBOL(dect_ie_destroy);
|
||||
|
||||
struct dect_ie_common *__dect_ie_clone(const struct dect_handle *dh,
|
||||
const struct dect_ie_common *ie,
|
||||
|
@ -59,6 +61,7 @@ struct dect_ie_common *__dect_ie_clone(const struct dect_handle *dh,
|
|||
memcpy(clone + 1, ie + 1, size - sizeof(*ie));
|
||||
return clone;
|
||||
}
|
||||
EXPORT_SYMBOL(__dect_ie_clone);
|
||||
|
||||
struct dect_ie_common *__dect_ie_hold(struct dect_ie_common *ie)
|
||||
{
|
||||
|
@ -69,6 +72,7 @@ struct dect_ie_common *__dect_ie_hold(struct dect_ie_common *ie)
|
|||
ie->refcnt++;
|
||||
return ie;
|
||||
}
|
||||
EXPORT_SYMBOL(__dect_ie_hold);
|
||||
|
||||
void __dect_ie_put(const struct dect_handle *dh, struct dect_ie_common *ie)
|
||||
{
|
||||
|
@ -79,6 +83,7 @@ void __dect_ie_put(const struct dect_handle *dh, struct dect_ie_common *ie)
|
|||
if (--ie->refcnt == 0)
|
||||
dect_ie_destroy(dh, ie);
|
||||
}
|
||||
EXPORT_SYMBOL(__dect_ie_put);
|
||||
|
||||
/*
|
||||
* Information Element lists
|
||||
|
@ -91,6 +96,7 @@ void dect_ie_list_init(struct dect_ie_list *ie)
|
|||
ie->common.next = &ie_list_marker;
|
||||
ie->list = NULL;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_ie_list_init);
|
||||
|
||||
void __dect_ie_list_add(struct dect_ie_common *ie, struct dect_ie_list *iel)
|
||||
{
|
||||
|
@ -103,6 +109,7 @@ void __dect_ie_list_add(struct dect_ie_common *ie, struct dect_ie_list *iel)
|
|||
ie->next = NULL;
|
||||
*pprev = ie;
|
||||
}
|
||||
EXPORT_SYMBOL(__dect_ie_list_add);
|
||||
|
||||
struct dect_ie_list *dect_ie_list_hold(struct dect_ie_list *iel)
|
||||
{
|
||||
|
@ -113,6 +120,7 @@ struct dect_ie_list *dect_ie_list_hold(struct dect_ie_list *iel)
|
|||
__dect_ie_hold(ie);
|
||||
return iel;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_ie_list_hold);
|
||||
|
||||
void dect_ie_list_put(const struct dect_handle *dh, struct dect_ie_list *iel)
|
||||
{
|
||||
|
@ -122,6 +130,7 @@ void dect_ie_list_put(const struct dect_handle *dh, struct dect_ie_list *iel)
|
|||
dect_foreach_ie(ie, iel)
|
||||
__dect_ie_put(dh, ie);
|
||||
}
|
||||
EXPORT_SYMBOL(dect_ie_list_put);
|
||||
|
||||
/*
|
||||
* Information Element collections
|
||||
|
@ -138,6 +147,7 @@ void *dect_ie_collection_alloc(const struct dect_handle *dh, unsigned int size)
|
|||
iec->size = size;
|
||||
return iec;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_ie_collection_alloc);
|
||||
|
||||
static void dect_ie_collection_free(const struct dect_handle *dh,
|
||||
struct dect_ie_collection *iec)
|
||||
|
@ -165,6 +175,7 @@ static void dect_ie_collection_free(const struct dect_handle *dh,
|
|||
|
||||
dect_free(dh, iec);
|
||||
}
|
||||
EXPORT_SYMBOL(dect_ie_collection_free);
|
||||
|
||||
void __dect_ie_collection_put(const struct dect_handle *dh, struct dect_ie_collection *iec)
|
||||
{
|
||||
|
@ -173,6 +184,7 @@ void __dect_ie_collection_put(const struct dect_handle *dh, struct dect_ie_colle
|
|||
return;
|
||||
dect_ie_collection_free(dh, iec);
|
||||
}
|
||||
EXPORT_SYMBOL(__dect_ie_collection_put);
|
||||
|
||||
struct dect_ie_collection *__dect_ie_collection_hold(struct dect_ie_collection *iec)
|
||||
{
|
||||
|
@ -180,3 +192,4 @@ struct dect_ie_collection *__dect_ie_collection_hold(struct dect_ie_collection *
|
|||
iec->refcnt++;
|
||||
return iec;
|
||||
}
|
||||
EXPORT_SYMBOL(__dect_ie_collection_hold);
|
||||
|
|
|
@ -49,6 +49,7 @@ void dect_keypad_append(struct dect_handle *dh, struct dect_keypad_buffer *kb,
|
|||
else if (keypad->len > 0)
|
||||
dect_start_timer(dh, kb->timer, kb->timeout);
|
||||
}
|
||||
EXPORT_SYMBOL(dect_keypad_append);
|
||||
|
||||
struct dect_keypad_buffer *
|
||||
dect_keypad_buffer_init(const struct dect_handle *dh, uint8_t timeout,
|
||||
|
@ -77,3 +78,4 @@ err1:
|
|||
err2:
|
||||
return NULL;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_keypad_buffer_init);
|
||||
|
|
|
@ -160,6 +160,7 @@ int dect_lce_group_ring(struct dect_handle *dh, enum dect_ring_patterns pattern)
|
|||
|
||||
return dect_lce_broadcast(dh, &msg.hdr, sizeof(msg));
|
||||
}
|
||||
EXPORT_SYMBOL(dect_lce_group_ring);
|
||||
|
||||
static int dect_lce_page(const struct dect_handle *dh,
|
||||
const struct dect_ipui *ipui)
|
||||
|
|
|
@ -24,6 +24,7 @@ void dect_set_debug_hook(int (*fn)(const char *fmt, va_list ap))
|
|||
{
|
||||
debug_hook = fn;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_set_debug_hook);
|
||||
|
||||
#ifdef DEBUG
|
||||
void __fmtstring(1, 2) __dect_debug(const char *fmt, ...)
|
||||
|
@ -56,6 +57,7 @@ struct dect_handle *dect_alloc_handle(struct dect_ops *ops)
|
|||
init_list_head(&dh->mme_list);
|
||||
return dh;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_alloc_handle);
|
||||
|
||||
int dect_init(struct dect_handle *dh)
|
||||
{
|
||||
|
@ -75,6 +77,7 @@ err2:
|
|||
err1:
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_init);
|
||||
|
||||
void dect_close_handle(struct dect_handle *dh)
|
||||
{
|
||||
|
@ -82,3 +85,4 @@ void dect_close_handle(struct dect_handle *dh)
|
|||
dect_netlink_exit(dh);
|
||||
dect_free(dh, dh);
|
||||
}
|
||||
EXPORT_SYMBOL(dect_close_handle);
|
||||
|
|
17
src/mm.c
17
src/mm.c
|
@ -338,6 +338,7 @@ void *dect_mm_priv(struct dect_mm_endpoint *mme)
|
|||
{
|
||||
return mme->priv;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mm_priv);
|
||||
|
||||
static struct dect_mm_endpoint *
|
||||
dect_mm_endpoint_get_by_link(const struct dect_handle *dh,
|
||||
|
@ -382,6 +383,7 @@ err2:
|
|||
err1:
|
||||
return NULL;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mm_endpoint_alloc);
|
||||
|
||||
static void dect_mm_endpoint_destroy(struct dect_handle *dh,
|
||||
struct dect_mm_endpoint *mme)
|
||||
|
@ -460,6 +462,7 @@ err2:
|
|||
err1:
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mm_key_allocate_req);
|
||||
|
||||
static void dect_mm_rcv_key_allocate(struct dect_handle *dh,
|
||||
struct dect_mm_endpoint *mme,
|
||||
|
@ -541,6 +544,7 @@ err2:
|
|||
err1:
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mm_authenticate_req);
|
||||
|
||||
static int dect_mm_send_authenticate_reply(const struct dect_handle *dh,
|
||||
struct dect_mm_procedure *mp,
|
||||
|
@ -609,6 +613,7 @@ int dect_mm_authenticate_res(struct dect_handle *dh,
|
|||
mp->type = DECT_MMP_NONE;
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mm_authenticate_res);
|
||||
|
||||
static void dect_mm_rcv_authentication_request(struct dect_handle *dh,
|
||||
struct dect_mm_endpoint *mme,
|
||||
|
@ -778,6 +783,7 @@ err2:
|
|||
err1:
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mm_cipher_req);
|
||||
|
||||
static int dect_mm_send_cipher_reject(const struct dect_handle *dh,
|
||||
struct dect_mm_procedure *mp,
|
||||
|
@ -829,6 +835,7 @@ int dect_mm_cipher_res(struct dect_handle *dh, struct dect_mm_endpoint *mme,
|
|||
err1:
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mm_cipher_res);
|
||||
|
||||
static void dect_mm_rcv_cipher_request(struct dect_handle *dh,
|
||||
struct dect_mm_endpoint *mme,
|
||||
|
@ -1000,6 +1007,7 @@ err2:
|
|||
err1:
|
||||
return -1;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mm_access_rights_req);
|
||||
|
||||
static int dect_mm_send_access_rights_accept(const struct dect_handle *dh,
|
||||
struct dect_mm_procedure *mp,
|
||||
|
@ -1076,6 +1084,7 @@ int dect_mm_access_rights_res(struct dect_handle *dh,
|
|||
dect_close_transaction(dh, &mp->transaction, DECT_DDL_RELEASE_PARTIAL);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mm_access_rights_res);
|
||||
|
||||
static void dect_mm_rcv_access_rights_request(struct dect_handle *dh,
|
||||
struct dect_mm_endpoint *mme,
|
||||
|
@ -1243,6 +1252,7 @@ err2:
|
|||
err1:
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mm_access_rights_terminate_req);
|
||||
|
||||
static int dect_mm_send_access_rights_terminate_accept(const struct dect_handle *dh,
|
||||
struct dect_mm_procedure *mp,
|
||||
|
@ -1301,6 +1311,7 @@ int dect_mm_access_rights_terminate_res(struct dect_handle *dh,
|
|||
mp->type = DECT_MMP_NONE;
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mm_access_rights_terminate_res);
|
||||
|
||||
static void dect_mm_rcv_access_rights_terminate_request(struct dect_handle *dh,
|
||||
struct dect_mm_endpoint *mme,
|
||||
|
@ -1455,6 +1466,7 @@ err2:
|
|||
err1:
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mm_locate_req);
|
||||
|
||||
static int dect_mm_send_locate_accept(const struct dect_handle *dh,
|
||||
struct dect_mm_procedure *mp,
|
||||
|
@ -1537,6 +1549,7 @@ int dect_mm_locate_res(struct dect_handle *dh, struct dect_mm_endpoint *mme,
|
|||
mp->type = DECT_MMP_NONE;
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mm_locate_res);
|
||||
|
||||
static void dect_mm_rcv_locate_request(struct dect_handle *dh,
|
||||
struct dect_mm_endpoint *mme,
|
||||
|
@ -1695,6 +1708,7 @@ int dect_mm_detach_req(struct dect_handle *dh, struct dect_mm_endpoint *mme,
|
|||
err1:
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mm_detach_req);
|
||||
|
||||
static void dect_mm_rcv_detach(struct dect_handle *dh,
|
||||
struct dect_mm_endpoint *mme,
|
||||
|
@ -1897,6 +1911,7 @@ err2:
|
|||
err1:
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mm_info_req);
|
||||
|
||||
static int dect_mm_send_info_accept(const struct dect_handle *dh,
|
||||
struct dect_mm_procedure *mp,
|
||||
|
@ -1962,6 +1977,7 @@ int dect_mm_info_res(struct dect_handle *dh, struct dect_mm_endpoint *mme,
|
|||
mp->type = DECT_MMP_NONE;
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mm_info_res);
|
||||
|
||||
static void dect_mm_rcv_info_request(struct dect_handle *dh,
|
||||
struct dect_mm_endpoint *mme,
|
||||
|
@ -2153,6 +2169,7 @@ int dect_mm_iwu_req(struct dect_handle *dh, struct dect_mm_endpoint *mme,
|
|||
err1:
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mm_iwu_req);
|
||||
|
||||
static void dect_mm_rcv_iwu(struct dect_handle *dh,
|
||||
struct dect_mm_endpoint *mme,
|
||||
|
|
|
@ -55,6 +55,7 @@ ssize_t dect_raw_transmit(const struct dect_fd *dfd, uint8_t slot,
|
|||
|
||||
return sendmsg(dfd->fd, &msg, 0);
|
||||
}
|
||||
EXPORT_SYMBOL(dect_raw_transmit);
|
||||
|
||||
struct dect_fd *dect_raw_socket(struct dect_handle *dh)
|
||||
{
|
||||
|
@ -79,3 +80,4 @@ err2:
|
|||
err1:
|
||||
return NULL;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_raw_socket);
|
||||
|
|
5
src/ss.c
5
src/ss.c
|
@ -89,6 +89,7 @@ void *dect_ss_priv(struct dect_ss_endpoint *sse)
|
|||
{
|
||||
return sse->priv;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_ss_priv);
|
||||
|
||||
struct dect_ss_endpoint *dect_ss_endpoint_alloc(struct dect_handle *dh)
|
||||
{
|
||||
|
@ -103,6 +104,7 @@ struct dect_ss_endpoint *dect_ss_endpoint_alloc(struct dect_handle *dh)
|
|||
err1:
|
||||
return NULL;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_ss_endpoint_alloc);
|
||||
|
||||
static struct dect_ss_endpoint *dect_ss_endpoint(struct dect_transaction *ta)
|
||||
{
|
||||
|
@ -150,6 +152,7 @@ err2:
|
|||
err1:
|
||||
return -1;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mnss_setup_req);
|
||||
|
||||
/**
|
||||
* dect_mnss_facility_req - MNSS_FACILITY-req primitive
|
||||
|
@ -173,6 +176,7 @@ int dect_mnss_facility_req(struct dect_handle *dh, struct dect_ss_endpoint *sse,
|
|||
return dect_lce_send(dh, &sse->transaction, &ciss_facility_msg_desc,
|
||||
&msg.common, CISS_FACILITY);
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mnss_facility_req);
|
||||
|
||||
static void dect_ciss_rcv_facility(struct dect_handle *dh,
|
||||
struct dect_ss_endpoint *sse,
|
||||
|
@ -225,6 +229,7 @@ int dect_mnss_release_req(struct dect_handle *dh, struct dect_ss_endpoint *sse,
|
|||
return dect_lce_send(dh, &sse->transaction, &ciss_release_com_msg_desc,
|
||||
&msg.common, CISS_RELEASE_COM);
|
||||
}
|
||||
EXPORT_SYMBOL(dect_mnss_release_req);
|
||||
|
||||
static void dect_ciss_rcv_release_com(struct dect_handle *dh,
|
||||
struct dect_ss_endpoint *sse,
|
||||
|
|
10
src/utils.c
10
src/utils.c
|
@ -121,6 +121,7 @@ struct dect_timer *dect_alloc_timer(const struct dect_handle *dh)
|
|||
return dect_zalloc(dh, sizeof(struct dect_timer) +
|
||||
dh->ops->event_ops->timer_priv_size);
|
||||
}
|
||||
EXPORT_SYMBOL(dect_alloc_timer);
|
||||
|
||||
void dect_setup_timer(struct dect_timer *timer,
|
||||
void (*cb)(struct dect_handle *, struct dect_timer *),
|
||||
|
@ -130,6 +131,7 @@ void dect_setup_timer(struct dect_timer *timer,
|
|||
timer->data = data;
|
||||
timer->state = DECT_TIMER_STOPPED;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_setup_timer);
|
||||
|
||||
void dect_start_timer(const struct dect_handle *dh,
|
||||
struct dect_timer *timer, unsigned int timeout)
|
||||
|
@ -145,17 +147,20 @@ void dect_start_timer(const struct dect_handle *dh,
|
|||
timer->state = DECT_TIMER_RUNNING;
|
||||
dh->ops->event_ops->start_timer(dh, timer, &tv);
|
||||
}
|
||||
EXPORT_SYMBOL(dect_start_timer);
|
||||
|
||||
void dect_stop_timer(const struct dect_handle *dh, struct dect_timer *timer)
|
||||
{
|
||||
dh->ops->event_ops->stop_timer(dh, timer);
|
||||
timer->state = DECT_TIMER_STOPPED;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_stop_timer);
|
||||
|
||||
bool dect_timer_running(const struct dect_timer *timer)
|
||||
{
|
||||
return timer->state == DECT_TIMER_RUNNING;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_timer_running);
|
||||
|
||||
struct dect_fd *dect_alloc_fd(const struct dect_handle *dh)
|
||||
{
|
||||
|
@ -168,6 +173,7 @@ struct dect_fd *dect_alloc_fd(const struct dect_handle *dh)
|
|||
dfd->fd = -1;
|
||||
return dfd;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_alloc_fd);
|
||||
|
||||
void dect_setup_fd(struct dect_fd *fd,
|
||||
void (*cb)(struct dect_handle *, struct dect_fd *, uint32_t),
|
||||
|
@ -176,17 +182,20 @@ void dect_setup_fd(struct dect_fd *fd,
|
|||
fd->callback = cb;
|
||||
fd->data = data;
|
||||
}
|
||||
EXPORT_SYMBOL(dect_setup_fd);
|
||||
|
||||
int dect_register_fd(const struct dect_handle *dh, struct dect_fd *dfd,
|
||||
uint32_t events)
|
||||
{
|
||||
return dh->ops->event_ops->register_fd(dh, dfd, events);
|
||||
}
|
||||
EXPORT_SYMBOL(dect_register_fd);
|
||||
|
||||
void dect_unregister_fd(const struct dect_handle *dh, struct dect_fd *dfd)
|
||||
{
|
||||
dh->ops->event_ops->unregister_fd(dh, dfd);
|
||||
}
|
||||
EXPORT_SYMBOL(dect_unregister_fd);
|
||||
|
||||
void dect_close(const struct dect_handle *dh, struct dect_fd *dfd)
|
||||
{
|
||||
|
@ -194,6 +203,7 @@ void dect_close(const struct dect_handle *dh, struct dect_fd *dfd)
|
|||
close(dfd->fd);
|
||||
dect_free(dh, dfd);
|
||||
}
|
||||
EXPORT_SYMBOL(dect_close);
|
||||
|
||||
struct dect_fd *dect_socket(const struct dect_handle *dh, int type, int protocol)
|
||||
{
|
||||
|
|
Reference in New Issue