81 lines
2.7 KiB
Smalltalk
81 lines
2.7 KiB
Smalltalk
"
|
|
(C) 2010 by Holger Hans Peter Freyther
|
|
All Rights Reserved
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU Affero General Public License as
|
|
published by the Free Software Foundation, either version 3 of the
|
|
License, or (at your option) any later version.
|
|
|
|
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. See the
|
|
GNU Affero General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
"
|
|
|
|
Object subclass: IPAConstants [
|
|
IPAConstants class >> protocolRSL [ ^ 16r00 ]
|
|
IPAConstants class >> protocolMGCP [ ^ 16rFC ]
|
|
IPAConstants class >> protocolSCCP [ ^ 16rFD ]
|
|
IPAConstants class >> protocolIPA [ ^ 16rFE ]
|
|
IPAConstants class >> protocolOML [ ^ 16rFF ]
|
|
IPAConstants class >> protocolOSMO [ ^ 16rEE ]
|
|
|
|
IPAConstants class >> msgPing [ ^ 16r00 ]
|
|
IPAConstants class >> msgPong [ ^ 16r01 ]
|
|
IPAConstants class >> msgIdGet [ ^ 16r04 ]
|
|
IPAConstants class >> msgIdResp [ ^ 16r05 ]
|
|
IPAConstants class >> msgIdAck [ ^ 16r06 ]
|
|
IPAConstants class >> msgSCCP [ ^ 16rFF ]
|
|
|
|
IPAConstants class >> idtagSernr [ ^ 16r00 ]
|
|
IPAConstants class >> idtagUnitName [ ^ 16r01 ]
|
|
IPAConstants class >> idtagLocation1 [ ^ 16r02 ]
|
|
IPAConstants class >> idtagLocation2 [ ^ 16r03 ]
|
|
IPAConstants class >> idtagEquipVer [ ^ 16r04 ]
|
|
IPAConstants class >> idtagSwVersion [ ^ 16r05 ]
|
|
IPAConstants class >> idtagIpaddr [ ^ 16r06 ]
|
|
IPAConstants class >> idtagMacaddr [ ^ 16r07 ]
|
|
IPAConstants class >> idtagUnit [ ^ 16r08 ]
|
|
|
|
"Extensions in Osmocom coming with the OsmoExtension header"
|
|
IPAConstants class >> osmoCtrl [ ^ 16r00 ]
|
|
IPAConstants class >> osmoMgcp [ ^ 16r01 ]
|
|
IPAConstants class >> osmoLac [ ^ 16r02 ]
|
|
]
|
|
|
|
CPackedStruct subclass: IPASCCPState [
|
|
<declaration: #(
|
|
#(#src (#array #byte 3))
|
|
#(#dst (#array #byte 3))
|
|
#(#transId #byte)
|
|
#(#invokeId #byte)
|
|
#(#imsi (#array #char 17))) >
|
|
|
|
srcAddr [
|
|
^ SCCPAddrReference fromCData: self src.
|
|
]
|
|
|
|
dstAddr [
|
|
^ SCCPAddrReference fromCData: self dst.
|
|
]
|
|
|
|
imsiString [
|
|
"We will need to count how many chars of the array are used"
|
|
<category: 'access'>
|
|
|
|
0 to: 16 do: [:index | | c |
|
|
c := self imsi at: index.
|
|
c = (Character value: 0)
|
|
ifTrue: [
|
|
^ String fromCData: self imsi size: index.
|
|
].
|
|
].
|
|
|
|
^ String fromCData: self imsi.
|
|
]
|
|
]
|