blob: e80a65b7a70d6ab4100145c9ed1ece02dd768a4e (
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
|
OpenBSC ip.access Abis/IP proxy design
======================================================================
== the big picture ==
* behave as BSC
* listen for BTS OML connections (TCP port 3002, primary OML)
* listen for BTS RSL connections (TCP port 3003)
* actively connect to BTS (TCP port 3006, 2ndary OML)
* behave as BTS
* actively connect OML to BSC (TCP port 3002)
* actively connect RSL to BSC (TCP port 3003)
* provide UDP interface for packet injection
* packet format inside UDP is exactly the same as ip.access
* provide one port for each direction:
* UDP port 5001: message to BTS
* IDP port 5002: message to BSC
== use cases ==
* transparent proxy
* simply pass all messages from BTS to BSC and vice-versa
* injection proxy
* provide UDP (packet-based) interface for tools like scapy
== misc ==
* keep-alive is handled independently, i.e. connections to BTS / BSC are always
kept open
== code architecture ==
=== incoming TCP connection ===
* connect TCP to BSC
* create 2 UDP sockets for packet injection
=== incoming TCP data from BTS ===
* determine if OML or RSL fd
* copy data to tx_queue of corresponding BSC fd
=== incoming TCP data from BSC ===
* determine if OML or RSL fd
* copy data to tx_queue of corresponding BTS fd
=== incoming UDP data ===
* determine OML or RSL and direction based on port number
* copy data to apropriate tx_queue
=== termination of TCP connection ===
* no matter if BSC or BTS disconnect, keep other TCP session open
* make sure upon re-connection, the correct pairs of connections
are matched up
|