forked from itds-consulting/yatebts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ybts.h
105 lines (96 loc) · 4.26 KB
/
ybts.h
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/**
* ybts.h
* This file is part of the Yate-BTS Project http://www.yatebts.com
*
* Yet Another BTS Channel
*
* Yet Another Telephony Engine - Base Transceiver Station
* Copyright (C) 2013-2014 Null Team Impex SRL
*
* This software is distributed under multiple licenses;
* see the COPYING file in the main directory for licensing
* information for this specific distribution.
*
* This use of this software may be subject to additional restrictions.
* See the LEGAL file in the main directory for details.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
#ifndef __YBTS_H
#define __YBTS_H
// File descriptors for sockets
// The enum is used as index starting from STDERR_FILENO + 1
enum BtsFileDesc
{
FDLogTransceiver = 0,
FDLogBts,
FDCommand,
FDSignalling,
FDMedia,
FDCount // Number of file descriptors
};
// Signalling interface protocol
enum BtsPrimitive {
// CS primitives with connection ID
SigL3Message = 0, // Connection related L3 message
SigConnLost = 1, // Connection to UE lost
SigConnRelease = 2, // Request to release a connection
SigStartMedia = 3, // Start or assign traffic channel
SigStopMedia = 4, // Stop sending media
SigAllocMedia = 5, // Reserve a traffic channel
SigMediaError = 6, // Report an allocation of mode change failure
SigMediaStarted = 7, // Notify that the traffic channel has started
SigEstablishSAPI = 8, // Request / notification about SAPI establishment
SigPhysicalInfo = 9, // Physical channel information
SigHandoverRequired = 10, // Outbound handover required
SigHandoverAck = 11, // Inbound handover acknowledge
// PS primitives with connection ID
SigGprsAttachReq = 64, // Attach Request
SigGprsAttachLBO = 65, // Attach Local Breakout
SigGprsAttachOk = 66, // Attach Accept
SigGprsAttachRej = 67, // Attach Reject
SigGprsIdentityReq = 68, // Identification Request
SigGprsAuthRequest = 69, // Authentication Request
SigGprsDetach = 70, // Detach Request
SigPdpActivate = 71, // Activate PDP context
SigPdpModify = 72, // Modify PDP context
SigPdpDeactivate = 73, // Deactivate PDP context
// Primitives without connection ID
SigHandshake = 128, // Handshake
SigRadioReady = 129, // Radio side is functioning
SigStartPaging = 130, // Start paging an UE
SigStopPaging = 131, // Stop paging an UE
SigNeighborsList = 132, // Update the list of neighbor cells
SigHandoverRequest = 133, // Requests resources for inbound handover
SigHandoverReject = 134, // Handover resources allocation failed
SigStop = 135, // Stop notification
SigBroadcastWrite = 136, // Write-replace Cell Broadcast
SigBroadcastKill = 137, // Cancel a Cell Broadcast
SigHeartbeat = 255 // Heartbeat
};
// Paging channel types
enum BtsPagingChanType {
ChanTypeVoice = 0,
ChanTypeSMS = 1,
ChanTypeSS = 2,
};
// Traffic channel errors (subset of CC)
enum BtsErrors {
ErrCongestion = 0x22, // No circuit/channel available
ErrInterworking = 0x7f // Interworking, unspecified
};
// Bts/radio stop reason
enum BtsRadioStop {
BtsNormal = 0,
BtsRadioLost, // Lost communication with radio interface
BtsInternalError, // Some internal error
BtsRadioExiting, // Radio exiting notification
BtsRadioError, // Radio fatal error encountered (signalled by radio interface)
};
#define YBTS_MCC_DEFAULT "001"
#define YBTS_MNC_DEFAULT "01"
#define YBTS_LAC_DEFAULT "1000"
#endif // __YBTS_H
/* vi: set ts=8 sw=4 sts=4 noet: */