⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 headerhash.cxx

📁 一个著名的SIP协议栈
💻 CXX
📖 第 1 页 / 共 2 页
字号:
      {"priority", Headers::Priority},
#line 83 "HeaderHash.gperf"
      {"identity", Headers::Identity},
#line 39 "HeaderHash.gperf"
      {"accept-contact", Headers::AcceptContact},
#line 81 "HeaderHash.gperf"
      {"event", Headers::Event},
#line 50 "HeaderHash.gperf"
      {"content-type", Headers::ContentType},
#line 63 "HeaderHash.gperf"
      {"reply-to", Headers::ReplyTo},
#line 69 "HeaderHash.gperf"
      {"supported", Headers::Supported},
#line 80 "HeaderHash.gperf"
      {"encryption", Headers::UNKNOWN},
#line 106 "HeaderHash.gperf"
      {"rseq", Headers::RSeq},
#line 94 "HeaderHash.gperf"
      {"privacy", Headers::Privacy},
#line 67 "HeaderHash.gperf"
      {"sip-etag", Headers::SIPETag},
#line 27 "HeaderHash.gperf"
      {"cseq", Headers::CSeq},
#line 73 "HeaderHash.gperf"
      {"unsupported", Headers::Unsupported},
#line 28 "HeaderHash.gperf"
      {"call-id", Headers::CallID},
#line 97 "HeaderHash.gperf"
      {"refer-to",Headers::ReferTo},
#line 32 "HeaderHash.gperf"
      {"from", Headers::From},
#line 76 "HeaderHash.gperf"
      {"www-authenticate",Headers::WWWAuthenticate},
#line 62 "HeaderHash.gperf"
      {"record-route", Headers::RecordRoute},
#line 100 "HeaderHash.gperf"
      {"reject-contact", Headers::RejectContact},
#line 53 "HeaderHash.gperf"
      {"error-info", Headers::ErrorInfo},
#line 54 "HeaderHash.gperf"
      {"in-reply-to", Headers::InReplyTo},
#line 57 "HeaderHash.gperf"
      {"organization", Headers::Organization},
#line 93 "HeaderHash.gperf"
      {"target-dialog", Headers::TargetDialog},
#line 64 "HeaderHash.gperf"
      {"require", Headers::Require},
#line 78 "HeaderHash.gperf"
      {"authorization", Headers::Authorization},
#line 30 "HeaderHash.gperf"
      {"content-length", Headers::ContentLength},
#line 74 "HeaderHash.gperf"
      {"user-agent", Headers::UserAgent},
#line 48 "HeaderHash.gperf"
      {"content-encoding", Headers::ContentEncoding},
#line 42 "HeaderHash.gperf"
      {"alert-info",Headers::AlertInfo},
#line 65 "HeaderHash.gperf"
      {"retry-after", Headers::RetryAfter},
#line 40 "HeaderHash.gperf"
      {"accept-encoding", Headers::AcceptEncoding},
#line 49 "HeaderHash.gperf"
      {"content-language", Headers::ContentLanguage},
#line 45 "HeaderHash.gperf"
      {"call-info", Headers::CallInfo},
#line 35 "HeaderHash.gperf"
      {"subject", Headers::Subject},
#line 41 "HeaderHash.gperf"
      {"accept-language", Headers::AcceptLanguage},
#line 84 "HeaderHash.gperf"
      {"identity-info", Headers::IdentityInfo},
#line 66 "HeaderHash.gperf"
      {"server", Headers::Server},
#line 99 "HeaderHash.gperf"
      {"replaces",Headers::Replaces},
#line 112 "HeaderHash.gperf"
      {"min-se", Headers::MinSE},
#line 88 "HeaderHash.gperf"
      {"p-called-party-id", Headers::PCalledPartyId},
#line 101 "HeaderHash.gperf"
      {"p-called-party-id", Headers::PCalledPartyId},
#line 44 "HeaderHash.gperf"
      {"authentication-info", Headers::AuthenticationInfo},
#line 71 "HeaderHash.gperf"
      {"answer-mode", Headers::AnswerMode},
#line 31 "HeaderHash.gperf"
      {"expires", Headers::Expires},
#line 59 "HeaderHash.gperf"
      {"proxy-authenticate", Headers::ProxyAuthenticate},
#line 87 "HeaderHash.gperf"
      {"p-associated-uri", Headers::PAssociatedUri},
#line 102 "HeaderHash.gperf"
      {"p-associated-uri", Headers::PAssociatedUri},
#line 113 "HeaderHash.gperf"
      {"refer-sub", Headers::ReferSub},
#line 98 "HeaderHash.gperf"
      {"referred-by",Headers::ReferredBy},
#line 68 "HeaderHash.gperf"
      {"sip-if-match", Headers::SIPIfMatch},
#line 61 "HeaderHash.gperf"
      {"proxy-require", Headers::ProxyRequire},
#line 60 "HeaderHash.gperf"
      {"proxy-authorization", Headers::ProxyAuthorization},
#line 79 "HeaderHash.gperf"
      {"allow-events", Headers::AllowEvents},
#line 46 "HeaderHash.gperf"
      {"content-disposition", Headers::ContentDisposition},
#line 33 "HeaderHash.gperf"
      {"max-forwards", Headers::MaxForwards},
#line 70 "HeaderHash.gperf"
      {"timestamp", Headers::Timestamp},
#line 103 "HeaderHash.gperf"
      {"service-route", Headers::ServiceRoute},
#line 110 "HeaderHash.gperf"
      {"service-route", Headers::ServiceRoute},
#line 90 "HeaderHash.gperf"
      {"p-preferred-identity", Headers::PPreferredIdentity},
#line 107 "HeaderHash.gperf"
      {"security-client", Headers::SecurityClient},
#line 89 "HeaderHash.gperf"
      {"p-media-authorization", Headers::PMediaAuthorization},
#line 86 "HeaderHash.gperf"
      {"p-asserted-identity", Headers::PAssertedIdentity},
#line 51 "HeaderHash.gperf"
      {"content-transfer-encoding", Headers::ContentTransferEncoding},
#line 72 "HeaderHash.gperf"
      {"priv-answer-mode", Headers::PrivAnswerMode},
#line 105 "HeaderHash.gperf"
      {"response-key", Headers::UNKNOWN},
#line 55 "HeaderHash.gperf"
      {"min-expires", Headers::MinExpires},
#line 109 "HeaderHash.gperf"
      {"security-verify", Headers::SecurityVerify},
#line 77 "HeaderHash.gperf"
      {"subscription-state",Headers::SubscriptionState},
#line 108 "HeaderHash.gperf"
      {"security-server", Headers::SecurityServer},
#line 104 "HeaderHash.gperf"
      {"request-disposition", Headers::RequestDisposition},
#line 56 "HeaderHash.gperf"
      {"mime-version", Headers::MIMEVersion},
#line 111 "HeaderHash.gperf"
      {"session-expires", Headers::SessionExpires}
    };

  static short lookup[] =
    {
        -1,    0,   -1,   -1,   -1,   -1,    1,    2,
        -1,    3,   -1,    4,   -1,   -1,   -1,   -1,
         5,   -1,   -1,   -1,   -1,    6,   -1,   -1,
        -1,   -1,    7,   -1,   -1,   -1,   -1,    8,
        -1,   -1,    9,   -1,   10,   -1,   -1, -146,
        -1,   13,   14,  -91,   -2,   -1,   15,   -1,
        -1,   -1,   -1,   16,   17,   -1,   -1,   -1,
        18,   -1,   -1,   -1,   19,   20,   -1,   -1,
        21,   -1,   22,   -1,   -1,   -1,   -1,   23,
        -1,   24,   -1,   -1,   25,   -1,   -1,   -1,
        -1,   -1,   -1,   -1,   -1,   26,   -1,   -1,
        -1,   -1,   27,   -1,   -1,   -1,   -1,   -1,
        -1,   -1,   -1,   28,   -1,   29,   -1,   30,
        -1,   -1,   -1,   -1,   31,   32,   33,   -1,
        34,   35,   36,   37,   -1,   -1,   -1,   38,
        -1,   -1,   39,   40,   41,   -1,   42,   43,
        44,   45,   -1,   46,   -1,   -1,   -1,   -1,
        -1,   47,   -1,   48,   49,   50,   51,   52,
        -1,   -1,   -1,   53,   54,   55,   56,   57,
        -1,   -1,   -1,   58,   59,   -1,   -1,   -1,
        60,   -1,   -1,   -1,   -1,   -1,   61,   -1,
        -1,   62,   -1,   -1,   63,   -1,   -1,   64,
        -1,   -1,   65,   -1,   -1,   66,   -1,   67,
        -1,   -1,   68,   -1,   -1,   -1,   -1,   -1,
        -1,   -1,   -1,   -1,   -1, -303,   -1,   71,
       -33,   -2,   -1,   -1,   -1,   -1,   -1,   -1,
        -1,   -1,   -1,   72,   73,   -1,   -1,   -1,
        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
        -1,   -1,   -1,   -1,   74,   -1,   -1,   -1,
        -1,   -1,   -1,   -1, -340,  -27,   -2,   77,
        -1,   78,   79,   -1,   -1,   -1,   -1,   -1,
        80,   81,   -1,   -1,   82,   -1,   83,   -1,
        -1,   84,   -1,   -1,   -1,   -1,   -1,   -1,
        85,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
        -1, -379,   -1,   88,  -16,   -2,   -1,   -1,
        -1,   -1,   -1,   -1,   -1,   89,   90,   -1,
        -1,   91,   -1,   -1,   -1,   -1,   -1,   92,
        93,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
        -1,   -1,   -1,   94,   -1,   -1,   -1,   -1,
        -1,   -1,   -1,   -1,   95,   -1,   -1,   -1,
        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
        -1,   -1,   -1,   -1,   96,   -1,   -1,   97,
        -1,   -1,   -1,   -1,   -1,   -1,   98,   -1,
        -1,   -1,   -1,   -1,   -1,   -1,   -1,   99,
        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
        -1,   -1,   -1,   -1,   -1,   -1,  100,   -1,
        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
        -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
        -1,   -1,   -1,   -1,   -1,   -1,  101
    };

  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
    {
      register int key = hash (str, len);

      if (key <= MAX_HASH_VALUE && key >= 0)
        {
          register int index = lookup[key];

          if (index >= 0)
            {
              register const char *s = wordlist[index].name;

              if (tolower(*str) == *s && !strncasecmp (str + 1, s + 1, len - 1) && s[len] == '\0')
                return &wordlist[index];
            }
          else if (index < -TOTAL_KEYWORDS)
            {
              register int offset = - 1 - TOTAL_KEYWORDS - index;
              register struct headers *wordptr = &wordlist[TOTAL_KEYWORDS + lookup[offset]];
              register struct headers *wordendptr = wordptr + -lookup[offset + 1];

              while (wordptr < wordendptr)
                {
                  register const char *s = wordptr->name;

                  if (tolower(*str) == *s && !strncasecmp (str + 1, s + 1, len - 1) && s[len] == '\0')
                    return wordptr;
                  wordptr++;
                }
            }
        }
    }
  return 0;
}
#line 114 "HeaderHash.gperf"

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -