MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / ExtractAddressCaps

Method ExtractAddressCaps

libi2pd/RouterInfo.cpp:561–584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

559 }
560
561 uint8_t RouterInfo::ExtractAddressCaps (std::string_view value) const
562 {
563 uint8_t caps = 0;
564 for (auto cap: value)
565 {
566 switch (cap)
567 {
568 case CAPS_FLAG_V4:
569 caps |= AddressCaps::eV4;
570 break;
571 case CAPS_FLAG_V6:
572 caps |= AddressCaps::eV6;
573 break;
574 case CAPS_FLAG_SSU2_TESTING:
575 caps |= AddressCaps::eSSUTesting;
576 break;
577 case CAPS_FLAG_SSU2_INTRODUCER:
578 caps |= AddressCaps::eSSUIntroducer;
579 break;
580 default: ;
581 }
582 }
583 return caps;
584 }
585
586 void RouterInfo::UpdateIntroducers (std::shared_ptr<Address> address, uint64_t ts)
587 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected