example: centralize ipui definition
Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
parent
dc4ad23707
commit
09d758f452
|
@ -5,6 +5,14 @@
|
|||
#include <dect/libdect.h>
|
||||
#include "common.h"
|
||||
|
||||
const struct dect_ipui ipui = {
|
||||
.put = DECT_IPUI_N,
|
||||
.pun.n.ipei = {
|
||||
.emc = 0x0ba8,
|
||||
.psn = 0xa782a,
|
||||
},
|
||||
};
|
||||
|
||||
void pexit(const char *str)
|
||||
{
|
||||
perror(str);
|
||||
|
|
|
@ -22,6 +22,8 @@ extern int dect_write_uak(const struct dect_ipui *ipui,
|
|||
extern int dect_read_uak(const struct dect_ipui *ipui,
|
||||
uint8_t uak[DECT_AUTH_KEY_LEN]);
|
||||
|
||||
extern const struct dect_ipui ipui;
|
||||
|
||||
extern void dect_pp_auth_init(struct dect_ops *ops,
|
||||
const struct dect_ipui *ipui);
|
||||
extern void dect_pp_common_init(struct dect_ops *ops, const char *cluster,
|
||||
|
|
|
@ -12,14 +12,6 @@
|
|||
#include <dect/auth.h>
|
||||
#include "common.h"
|
||||
|
||||
static const struct dect_ipui ipui = {
|
||||
.put = DECT_IPUI_N,
|
||||
.pun.n.ipei = {
|
||||
.emc = 0x0ba8,
|
||||
.psn = 0xa782a,
|
||||
}
|
||||
};
|
||||
|
||||
static void mm_access_rights_terminate_cfm(struct dect_handle *dh,
|
||||
struct dect_mm_endpoint *mme, bool accept,
|
||||
struct dect_mm_access_rights_terminate_param *param)
|
||||
|
|
|
@ -24,14 +24,6 @@
|
|||
static const char *pin = "0000";
|
||||
static int rand_fd;
|
||||
|
||||
static const struct dect_ipui ipui = {
|
||||
.put = DECT_IPUI_N,
|
||||
.pun.n.ipei = {
|
||||
.emc = 0x0ba8,
|
||||
.psn = 0xa782a,
|
||||
}
|
||||
};
|
||||
|
||||
struct mm_priv {
|
||||
uint64_t rand;
|
||||
uint64_t rs;
|
||||
|
|
|
@ -12,14 +12,6 @@
|
|||
#include <dect/auth.h>
|
||||
#include "common.h"
|
||||
|
||||
static const struct dect_ipui ipui = {
|
||||
.put = DECT_IPUI_N,
|
||||
.pun.n.ipei = {
|
||||
.emc = 0x0ba8,
|
||||
.psn = 0xa782a,
|
||||
}
|
||||
};
|
||||
|
||||
static int mm_detach_req(struct dect_handle *dh, struct dect_mm_endpoint *mme)
|
||||
{
|
||||
struct dect_ie_portable_identity portable_identity;
|
||||
|
|
|
@ -12,14 +12,6 @@
|
|||
#include <dect/auth.h>
|
||||
#include "common.h"
|
||||
|
||||
static const struct dect_ipui ipui = {
|
||||
.put = DECT_IPUI_N,
|
||||
.pun.n.ipei = {
|
||||
.emc = 0x0ba8,
|
||||
.psn = 0xa782a,
|
||||
}
|
||||
};
|
||||
|
||||
static void mm_info_cfm(struct dect_handle *dh,
|
||||
struct dect_mm_endpoint *mme, bool accept,
|
||||
struct dect_mm_info_param *param)
|
||||
|
|
|
@ -15,14 +15,6 @@
|
|||
#include <dect/lia.h>
|
||||
#include "common.h"
|
||||
|
||||
static const struct dect_ipui ipui = {
|
||||
.put = DECT_IPUI_N,
|
||||
.pun.n.ipei = {
|
||||
.emc = 0x0ba8,
|
||||
.psn = 0xa782a,
|
||||
},
|
||||
};
|
||||
|
||||
static void dect_iwu_info_req(struct dect_handle *dh, struct dect_call *call)
|
||||
{
|
||||
struct dect_ie_iwu_to_iwu iwu_to_iwu;
|
||||
|
|
|
@ -14,14 +14,6 @@
|
|||
#include <dect/auth.h>
|
||||
#include "common.h"
|
||||
|
||||
static const struct dect_ipui ipui = {
|
||||
.put = DECT_IPUI_N,
|
||||
.pun.n.ipei = {
|
||||
.emc = 0x0ba8,
|
||||
.psn = 0xa782a,
|
||||
}
|
||||
};
|
||||
|
||||
static void mm_locate_cfm(struct dect_handle *dh, struct dect_mm_endpoint *mme,
|
||||
bool accept, struct dect_mm_locate_param *param)
|
||||
{
|
||||
|
|
|
@ -12,14 +12,6 @@
|
|||
#include "common.h"
|
||||
#include <lce.h>
|
||||
|
||||
static const struct dect_ipui ipui = {
|
||||
.put = DECT_IPUI_N,
|
||||
.pun.n.ipei = {
|
||||
.emc = 0x0ba8,
|
||||
.psn = 0xa782a,
|
||||
}
|
||||
};
|
||||
|
||||
static struct dect_ops ops;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
|
|
@ -7,14 +7,6 @@
|
|||
#include <dect/libdect.h>
|
||||
#include "common.h"
|
||||
|
||||
static struct dect_ipui ipui = {
|
||||
.put = DECT_IPUI_N,
|
||||
.pun.n.ipei = {
|
||||
.emc = 0x0ba8,
|
||||
.psn = 0xa782a,
|
||||
},
|
||||
};
|
||||
|
||||
static void mnss_setup_ind(struct dect_handle *dh, struct dect_ss_endpoint *sse,
|
||||
struct dect_mnss_param *param)
|
||||
{
|
||||
|
|
Reference in New Issue