t_lookup.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef _T_LOOKUP_H
00037 #define _T_LOOKUP_H
00038
00039 #include "config.h"
00040 #include "t_funcs.h"
00041
00042 #define T_UNDEFINED ( (struct cell*) -1 )
00043 #define T_NULL_CELL ( (struct cell*) 0 )
00044
00045 extern unsigned int global_msg_id;
00046 extern int ruri_matching;
00047 extern int via1_matching;
00048
00049 void init_t(void);
00050 int init_rb( struct retr_buf *rb, struct sip_msg *msg );
00051 struct cell* t_lookupOriginalT( struct sip_msg* p_msg );
00052 int t_reply_matching( struct sip_msg* , int* );
00053 int t_lookup_request( struct sip_msg* p_msg , int leave_new_locked );
00054 int t_newtran( struct sip_msg* p_msg );
00055
00056 int _add_branch_label( struct cell *trans,
00057 char *str, int *len, int branch );
00058 int add_branch_label( struct cell *trans,
00059 struct sip_msg *p_msg, int branch );
00060
00061
00062 int t_unref( struct sip_msg *p_msg);
00063 void t_unref_cell( struct cell *);
00064 typedef void (*tunrefcell_f)(struct cell *);
00065
00066
00067
00068
00069
00070
00071 int t_check( struct sip_msg* , int *branch );
00072
00073 typedef struct cell * (*tlookuporiginalt_f)(struct sip_msg*);
00074
00075 typedef struct cell * (*tgett_f)(void);
00076 struct cell *get_t(void);
00077
00078
00079
00080 void set_t(struct cell *t);
00081
00082
00083 struct cell *get_cancelled_t(void);
00084 void reset_cancelled_t(void);
00085
00086 struct cell *get_e2eack_t(void);
00087 void reset_e2eack_t(void);
00088
00089
00090 #define T_GET_TI "t_get_trans_ident"
00091 #define T_LOOKUP_IDENT "t_lookup_ident"
00092 #define T_IS_LOCAL "t_is_local"
00093
00094 typedef int (*tislocal_f)(struct sip_msg*);
00095 typedef int (*tnewtran_f)(struct sip_msg*);
00096 typedef int (*tget_ti_f)(struct sip_msg*, unsigned int*, unsigned int*);
00097 typedef int (*tlookup_ident_f)(struct cell**, unsigned int, unsigned int);
00098
00099 int t_is_local(struct sip_msg*);
00100 int t_get_trans_ident(struct sip_msg* p_msg,
00101 unsigned int* hash_index, unsigned int* label);
00102 int t_lookup_ident(struct cell** trans,
00103 unsigned int hash_index, unsigned int label);
00104
00105
00106 int t_lookup_callid(struct cell** trans, str callid, str cseq);
00107
00108 #endif
00109