summaryrefslogtreecommitdiffstats
path: root/include/libdect.h
blob: 7c3ff836d343dd571f0402f373e267ffd6f20a9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef _LIBDECT_H
#define _LIBDECT_H

#include <linux/dect_netlink.h>
#include <dect/libdect.h>
#include <debug.h>
#include <list.h>
#include <lce.h>

enum dect_pp_identities {
	DECT_PP_IPUI		= 0x1,
	DECT_PP_TPUI		= 0x2,
};

/**
 * struct dect_handle - libdect handle
 *
 * @ops:	user ops
 * @nlsock:	netlink socket
 * @nlfd:	netlink file descriptor
 * @index:	cluster index
 * @mode:	cluster mode
 * @pari:	FP's PARI
 * @fpc:	FP capabilities
 * @ipui:	PP's IPUI
 * @tpui:	PP's TPUI
 * @pmid:	PP's PMID
 * @flags:	PP identity validity flags
 * @b_sap:	B-SAP socket
 * @s_sap:	S-SAP listener socket
 * @links:	list of data links
 * @mme_list:	MM endpoint list
 */
struct dect_handle {
	const struct dect_ops		*ops;

	struct nl_sock			*nlsock;
	struct dect_fd			*nlfd;

	int				index;
	enum dect_cluster_modes		mode;
	struct dect_ari			pari;
	struct dect_fp_capabilities	fpc;

	struct dect_transaction		page_transaction;
	struct dect_ipui		ipui;
	struct dect_tpui		tpui;
	uint32_t			pmid;
	uint32_t			flags;

	struct dect_fd			*b_sap;
	struct dect_fd			*s_sap;
	struct list_head		links;

	struct list_head		mme_list;

	uint8_t				priv[] __aligned(__alignof__(uint64_t));
};

#endif /* _LIBDECT_H */