• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Data Structures
  • Files
  • Directories
  • File List
  • Globals

action.h

Go to the documentation of this file.
00001 /*
00002  * $Id$
00003  *
00004  *
00005  * Copyright (C) 2001-2003 FhG Fokus
00006  *
00007  * This file is part of ser, a free SIP server.
00008  *
00009  * ser is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version
00013  *
00014  * For a license to use the ser software under conditions
00015  * other than those described here, or to purchase support for this
00016  * software, please contact iptel.org by e-mail at the following addresses:
00017  *    info@iptel.org
00018  *
00019  * ser is distributed in the hope that it will be useful,
00020  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00022  * GNU General Public License for more details.
00023  *
00024  * You should have received a copy of the GNU General Public License
00025  * along with this program; if not, write to the Free Software
00026  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00027  */
00028 
00037 #ifndef action_h
00038 #define action_h
00039 
00040 #define USE_LONGJMP
00041 
00042 #include "route_struct.h"
00043 
00044 #include "parser/msg_parser.h"
00045 
00046 #ifdef USE_LONGJMP
00047 #include <setjmp.h>
00048 #endif
00049 
00050 
00051 struct run_act_ctx{
00052         int rec_lev;
00053         int run_flags;
00054         int last_retcode; /* return from last route */
00055 #ifdef USE_LONGJMP
00056         jmp_buf jmp_env;
00057 #endif
00058 };
00059 
00060 
00061 #define init_run_actions_ctx(ph) \
00062         do{\
00063                 (ph)->rec_lev=(ph)->run_flags=(ph)->last_retcode=0; \
00064         }while(0)
00065 
00066 int do_action(struct run_act_ctx* c, struct action* a, struct sip_msg* msg);
00067 int run_actions(struct run_act_ctx* c, struct action* a, struct sip_msg* msg);
00068 
00069 int run_top_route(struct action* a, sip_msg_t* msg, struct run_act_ctx* c);
00070 
00071 
00072 #ifdef USE_LONGJMP
00073 int run_actions_safe(struct run_act_ctx* c, struct action* a,
00074                                                 struct sip_msg* msg);
00075 #else 
00076 #define run_actions_safe(c, a, m) run_actions(c, a, m)
00077 #endif /* USE_LONGJMP */
00078 
00079 #endif

Generated on Tue May 22 2012 13:10:01 for SIP Router by  doxygen 1.7.1