MCPcopy Create free account
hub / github.com/RangeNetworks/openbts / parseL3

Method parseL3

GSM/GSML3Message.cpp:167–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165
166
167GSM::L3Message* GSM::parseL3(const GSM::L3Frame& source)
168{
169 if (source.size()==0) return NULL;
170
171 LOG(DEBUG) << "GSM::parseL3 "<< source;
172 L3PD PD = source.PD();
173
174 L3Message *retVal = NULL;
175 try {
176 switch (PD) {
177 case L3RadioResourcePD: retVal=parseL3RR(source); break;
178 case L3MobilityManagementPD: retVal=parseL3MM(source); break;
179 case L3CallControlPD: retVal=parseL3CC(source); break;
180 case L3SMSPD: retVal=SMS::parseSMS(source); break;
181 case L3NonCallSSPD: retVal = parseL3SupServ(source); break;
182 default:
183 LOG(NOTICE) << "L3 parsing failed for unsupported protocol " << PD;
184 return NULL;
185 }
186 }
187 catch (...) { // (pat) Used to just catch L3ReadError, but lets be safer.
188 LOG(NOTICE) << "L3 parsing failed for " << source;
189 return NULL;
190 }
191
192 if (retVal) LOG(INFO) << "L3 recv " << *retVal;
193 return retVal;
194}
195
196
197

Callers

nothing calls this directly

Calls 4

parseSMSFunction · 0.85
parseL3SupServFunction · 0.85
sizeMethod · 0.45
PDMethod · 0.45

Tested by

no test coverage detected