| 536 | |
| 537 | #if RN_UMTS |
| 538 | static 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 | |
| 559 | static void handleAuthenticationResponse(SgsnInfo *si, L3GmmMsgAuthenticationResponse &armsg) |
no test coverage detected