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

Function sendAuthenticationRequest

SGSNGGSN/Sgsn.cpp:538–556  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

536
537#if RN_UMTS
538static void sendAuthenticationRequest(SgsnInfo *si, string IMSI)
539{
540 SIPEngine engine(gConfig.getStr("SIP.Proxy.Registration").c_str(),IMSI.c_str());
541 string RAND;
542 //bool success =
543 engine.Register(SIPEngine::SIPRegister, &RAND);
544 // Stick new UE into TMSI table if its not already there
545 if (!gTMSITable.TMSI(IMSI.c_str())) gTMSITable.assign(IMSI.c_str());
546
547 ByteVector rand(RAND.size()/2); // Leave it random.
548 for (unsigned i = 0; i < RAND.size(); i++) {
549 char ch = (RAND.c_str())[i];
550 ch = (ch > '9') ? ((ch & 0x0f) + 9) : (ch & 0x0f);
551 rand.setField(i*4,ch,4);
552 }
553 L3GmmMsgAuthentication amsg(rand);
554 si->sgsnWriteHighSideMsg(amsg);
555 si->mRAND = rand;
556}
557#endif
558
559static void handleAuthenticationResponse(SgsnInfo *si, L3GmmMsgAuthenticationResponse &armsg)

Callers 1

handleAttachStepFunction · 0.85

Calls 5

TMSIMethod · 0.80
assignMethod · 0.80
setFieldMethod · 0.80
sgsnWriteHighSideMsgMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected