#include "../../parser/msg_parser.h"


Go to the source code of this file.
Defines | |
| #define | PRIME_HASH_H 1 |
Typedefs | |
| typedef int(* | hash_func_t )(struct sip_msg *msg, enum hash_source source, int denominator) |
Enumerations | |
| enum | hash_source { shs_call_id = 1, shs_from_uri, shs_from_user, shs_to_uri, shs_to_user, shs_error } |
| Determines from which part of a message the hash shall be calculated. Possible values are:. More... | |
Functions | |
| int | hash_func (struct sip_msg *msg, enum hash_source source, int denominator) |
| CRC32 hash function Returns an integer number between 0 and denominator - 1 based on the hash source from the msg. The hash algorith is CRC32. | |
| int | prime_hash_func (struct sip_msg *msg, enum hash_source source, int denominator) |
| prime hash function Returns an integer number between 0 and denominator - 1 based on the hash source from the msg. Use the prime number algorithm. | |
Definition in file prime_hash.h.
| #define PRIME_HASH_H 1 |
Definition at line 33 of file prime_hash.h.
| typedef int(* hash_func_t)(struct sip_msg *msg, enum hash_source source, int denominator) |
generic interface for hash functions
Definition at line 60 of file prime_hash.h.
| enum hash_source |
Determines from which part of a message the hash shall be calculated. Possible values are:.
Definition at line 50 of file prime_hash.h.
| int hash_func | ( | struct sip_msg * | msg, | |
| enum hash_source | source, | |||
| int | denominator | |||
| ) |
CRC32 hash function Returns an integer number between 0 and denominator - 1 based on the hash source from the msg. The hash algorith is CRC32.
Definition at line 50 of file prime_hash.c.
References crc32_uint(), determine_source(), hash, and LM_DBG.
Referenced by rewrite_on_rule().
| int prime_hash_func | ( | struct sip_msg * | msg, | |
| enum hash_source | source, | |||
| int | denominator | |||
| ) |
prime hash function Returns an integer number between 0 and denominator - 1 based on the hash source from the msg. Use the prime number algorithm.
Definition at line 66 of file prime_hash.c.
References determine_source(), _str::len, LM_DBG, LM_ERR, _str::s, shs_from_user, and shs_to_user.
Referenced by rewrite_on_rule().
1.5.6