Go to the documentation of this file.
25#ifndef MSG_MCLASS_HASH_H
27#define MSG_MCLASS_HASH_H
43#include <sofia-sip/bnf.h>
49#define MC_HASH(s, n) (msg_header_name_hash(s, NULL) % (unsigned)(n))
55 unsigned short hash = 0;
58 for (i = 0; s[i]; i++) {
59 unsigned char c = s[i];
60 if (!(_bnf_table[c] & bnf_token))
62 if (c >=
'A' && c <=
'Z')
63 hash += (c +
'a' -
'A');
unsigned short msg_header_name_hash(char const *s, isize_t *llen)
Hash header name.
Definition msg_mclass_hash.h:53
Sofia-SIP 1.12.11devel -
Copyright (C) 2006 Nokia Corporation. All rights reserved.
Licensed under the terms of the GNU Lesser General Public License.