• Home
  • Raw
  • Download

Lines Matching refs:stun_msg

452   std::unique_ptr<IceMessage> stun_msg(new IceMessage());  in GetStunMessage()  local
454 if (!stun_msg->Read(&buf) || (buf.Length() > 0)) { in GetStunMessage()
462 stun_msg->GetNonComprehendedAttributes(); in GetStunMessage()
464 if (stun_msg->type() == STUN_BINDING_REQUEST) { in GetStunMessage()
467 if (!stun_msg->GetByteString(STUN_ATTR_USERNAME) || in GetStunMessage()
468 !stun_msg->GetByteString(STUN_ATTR_MESSAGE_INTEGRITY)) { in GetStunMessage()
470 << StunMethodToString(stun_msg->type()) in GetStunMessage()
473 SendBindingErrorResponse(stun_msg.get(), addr, STUN_ERROR_BAD_REQUEST, in GetStunMessage()
481 if (!ParseStunUsername(stun_msg.get(), &local_ufrag, &remote_ufrag) || in GetStunMessage()
484 << StunMethodToString(stun_msg->type()) in GetStunMessage()
487 SendBindingErrorResponse(stun_msg.get(), addr, STUN_ERROR_UNAUTHORIZED, in GetStunMessage()
493 if (!stun_msg->ValidateMessageIntegrity(data, size, password_)) { in GetStunMessage()
495 << StunMethodToString(stun_msg->type()) in GetStunMessage()
498 SendBindingErrorResponse(stun_msg.get(), addr, STUN_ERROR_UNAUTHORIZED, in GetStunMessage()
506 SendUnknownAttributesErrorResponse(stun_msg.get(), addr, in GetStunMessage()
512 } else if ((stun_msg->type() == STUN_BINDING_RESPONSE) || in GetStunMessage()
513 (stun_msg->type() == STUN_BINDING_ERROR_RESPONSE)) { in GetStunMessage()
514 if (stun_msg->type() == STUN_BINDING_ERROR_RESPONSE) { in GetStunMessage()
515 if (const StunErrorCodeAttribute* error_code = stun_msg->GetErrorCode()) { in GetStunMessage()
517 << StunMethodToString(stun_msg->type()) in GetStunMessage()
525 << StunMethodToString(stun_msg->type()) in GetStunMessage()
542 } else if (stun_msg->type() == STUN_BINDING_INDICATION) { in GetStunMessage()
544 << StunMethodToString(stun_msg->type()) << ": from " in GetStunMessage()
558 } else if (stun_msg->type() == GOOG_PING_REQUEST) { in GetStunMessage()
559 if (!stun_msg->ValidateMessageIntegrity32(data, size, password_)) { in GetStunMessage()
561 << StunMethodToString(stun_msg->type()) in GetStunMessage()
564 SendBindingErrorResponse(stun_msg.get(), addr, STUN_ERROR_UNAUTHORIZED, in GetStunMessage()
569 << StunMethodToString(stun_msg->type()) << " from " in GetStunMessage()
572 } else if (stun_msg->type() == GOOG_PING_RESPONSE || in GetStunMessage()
573 stun_msg->type() == GOOG_PING_ERROR_RESPONSE) { in GetStunMessage()
576 << StunMethodToString(stun_msg->type()) << " from " in GetStunMessage()
582 << stun_msg->type() << ") from " in GetStunMessage()
588 *out_msg = std::move(stun_msg); in GetStunMessage()
612 bool Port::ParseStunUsername(const StunMessage* stun_msg, in ParseStunUsername() argument
621 stun_msg->GetByteString(STUN_ATTR_USERNAME); in ParseStunUsername()
638 IceMessage* stun_msg, in MaybeIceRoleConflict() argument
645 stun_msg->GetUInt64(STUN_ATTR_ICE_CONTROLLING); in MaybeIceRoleConflict()
661 stun_attr = stun_msg->GetUInt64(STUN_ATTR_ICE_CONTROLLED); in MaybeIceRoleConflict()
674 SendBindingErrorResponse(stun_msg, addr, STUN_ERROR_ROLE_CONFLICT, in MaybeIceRoleConflict()
686 SendBindingErrorResponse(stun_msg, addr, STUN_ERROR_ROLE_CONFLICT, in MaybeIceRoleConflict()