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

Function handleL3Msg

SGSNGGSN/Sgsn.cpp:1168–1196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1166#endif
1167
1168void handleL3Msg(SgsnInfo *si, ByteVector &bv)
1169{
1170 unsigned pd = 0;
1171 try {
1172 L3GprsFrame frame(bv);
1173 if (frame.size() == 0) { // David saw this happen.
1174 //SGSNWARN("completely empty L3 uplink message "<<si);
1175 return;
1176 }
1177 pd = frame.getNibble(0,0); // protocol descriminator
1178 switch ((GSM::L3PD) pd) {
1179 case GSM::L3GPRSMobilityManagementPD: { // Couldnt we shorten this?
1180 handleL3GmmMsg(si,frame);
1181 break;
1182 }
1183 case GSM::L3GPRSSessionManagementPD: { // Couldnt we shorten this?
1184 Ggsn::handleL3SmMsg(si,frame);
1185 break;
1186 }
1187 // TODO: Send GSM messages somewhere
1188 default:
1189 SGSNERROR("unsupported L3 Message PD:"<<pd);
1190 }
1191 } catch(SgsnError) {
1192 return; // Handled already
1193 } catch(ByteVectorError) { // oops!
1194 SGSNERROR("internal error assembling SGSN message, pd="<<pd); // not much to go on.
1195 }
1196}
1197
1198// Forces the SgsnInfo to exist.
1199// For GPRS the handle is a TLLI.

Callers 2

lleUplinkDataMethod · 0.85
sgsnHandleL3MsgMethod · 0.85

Calls 3

handleL3GmmMsgFunction · 0.85
getNibbleMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected