sig_call.c (131826) | sig_call.c (133492) |
---|---|
1/* 2 * Copyright (c) 1996-2003 3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * 27 * Author: Hartmut Brandt <harti@freebsd.org> 28 * | 1/* 2 * Copyright (c) 1996-2003 3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * 27 * Author: Hartmut Brandt <harti@freebsd.org> 28 * |
29 * $Begemot: libunimsg/netnatm/sig/sig_call.c,v 1.64 2004/07/08 08:22:19 brandt Exp $ | 29 * $Begemot: libunimsg/netnatm/sig/sig_call.c,v 1.65 2004/08/05 07:11:00 brandt Exp $ |
30 * 31 * Call instance handling 32 * 33 * Note: 34 * In all functions that handle messages from the user or from 35 * the SAAL, commit memory allocation always at the begin of the 36 * function. If allocation fails, ignore saal messages and 37 * respond with an error to user messages. --- 8 unchanged lines hidden (view full) --- 46#include <netnatm/sig/unipriv.h> 47#include <netnatm/sig/unimkmsg.h> 48#include <netnatm/sig/unimsgcpy.h> 49 50static enum call_state state_compat(struct call *, enum uni_callstate); 51static void respond_drop_party_ack(struct call *, struct uni_ie_epref *, u_int); 52 53 | 30 * 31 * Call instance handling 32 * 33 * Note: 34 * In all functions that handle messages from the user or from 35 * the SAAL, commit memory allocation always at the begin of the 36 * function. If allocation fails, ignore saal messages and 37 * respond with an error to user messages. --- 8 unchanged lines hidden (view full) --- 46#include <netnatm/sig/unipriv.h> 47#include <netnatm/sig/unimkmsg.h> 48#include <netnatm/sig/unimsgcpy.h> 49 50static enum call_state state_compat(struct call *, enum uni_callstate); 51static void respond_drop_party_ack(struct call *, struct uni_ie_epref *, u_int); 52 53 |
54#define DEF_PRIV_SIG(NAME, FROM) [SIG##NAME] "SIG"#NAME, | 54#define DEF_PRIV_SIG(NAME, FROM) [SIG##NAME] = "SIG"#NAME, |
55static const char *const call_sigs[] = { 56 DEF_CALL_SIGS 57}; 58#undef DEF_PRIV_SIG 59 60TIMER_FUNC_CALL(t308, t308_func) 61TIMER_FUNC_CALL(t303, t303_func) 62TIMER_FUNC_CALL(t301, t301_func) 63TIMER_FUNC_CALL(t310, t310_func) 64TIMER_FUNC_CALL(t313, t313_func) 65TIMER_FUNC_CALL(t322, t322_func) 66 67const struct callstates callstates[] = { | 55static const char *const call_sigs[] = { 56 DEF_CALL_SIGS 57}; 58#undef DEF_PRIV_SIG 59 60TIMER_FUNC_CALL(t308, t308_func) 61TIMER_FUNC_CALL(t303, t303_func) 62TIMER_FUNC_CALL(t301, t301_func) 63TIMER_FUNC_CALL(t310, t310_func) 64TIMER_FUNC_CALL(t313, t313_func) 65TIMER_FUNC_CALL(t322, t322_func) 66 67const struct callstates callstates[] = { |
68 [CALLST_NULL] { "NU0", UNI_CALLSTATE_U0 }, 69 [CALLST_U1] { "U1", UNI_CALLSTATE_U1 }, 70 [CALLST_U3] { "U3", UNI_CALLSTATE_U3 }, 71 [CALLST_U4] { "U4", UNI_CALLSTATE_U4 }, 72 [CALLST_U6] { "U6", UNI_CALLSTATE_U6 }, 73 [CALLST_U7] { "U7", UNI_CALLSTATE_U7 }, 74 [CALLST_U8] { "U8", UNI_CALLSTATE_U8 }, 75 [CALLST_U9] { "U9", UNI_CALLSTATE_U9 }, 76 [CALLST_U10] { "U10", UNI_CALLSTATE_U10 }, 77 [CALLST_U11] { "U11", UNI_CALLSTATE_U11 }, 78 [CALLST_U12] { "U12", UNI_CALLSTATE_U12 }, 79 [CALLST_N1] { "N1", UNI_CALLSTATE_N1 }, 80 [CALLST_N3] { "N3", UNI_CALLSTATE_N3 }, 81 [CALLST_N4] { "N4", UNI_CALLSTATE_N4 }, 82 [CALLST_N6] { "N6", UNI_CALLSTATE_N6 }, 83 [CALLST_N7] { "N7", UNI_CALLSTATE_N7 }, 84 [CALLST_N8] { "N8", UNI_CALLSTATE_N8 }, 85 [CALLST_N9] { "N9", UNI_CALLSTATE_N9 }, 86 [CALLST_N10] { "N10", UNI_CALLSTATE_N10 }, 87 [CALLST_N11] { "N11", UNI_CALLSTATE_N11 }, 88 [CALLST_N12] { "N12", UNI_CALLSTATE_N12 }, | 68 [CALLST_NULL] = { "NU0", UNI_CALLSTATE_U0 }, 69 [CALLST_U1] = { "U1", UNI_CALLSTATE_U1 }, 70 [CALLST_U3] = { "U3", UNI_CALLSTATE_U3 }, 71 [CALLST_U4] = { "U4", UNI_CALLSTATE_U4 }, 72 [CALLST_U6] = { "U6", UNI_CALLSTATE_U6 }, 73 [CALLST_U7] = { "U7", UNI_CALLSTATE_U7 }, 74 [CALLST_U8] = { "U8", UNI_CALLSTATE_U8 }, 75 [CALLST_U9] = { "U9", UNI_CALLSTATE_U9 }, 76 [CALLST_U10] = { "U10", UNI_CALLSTATE_U10 }, 77 [CALLST_U11] = { "U11", UNI_CALLSTATE_U11 }, 78 [CALLST_U12] = { "U12", UNI_CALLSTATE_U12 }, 79 [CALLST_N1] = { "N1", UNI_CALLSTATE_N1 }, 80 [CALLST_N3] = { "N3", UNI_CALLSTATE_N3 }, 81 [CALLST_N4] = { "N4", UNI_CALLSTATE_N4 }, 82 [CALLST_N6] = { "N6", UNI_CALLSTATE_N6 }, 83 [CALLST_N7] = { "N7", UNI_CALLSTATE_N7 }, 84 [CALLST_N8] = { "N8", UNI_CALLSTATE_N8 }, 85 [CALLST_N9] = { "N9", UNI_CALLSTATE_N9 }, 86 [CALLST_N10] = { "N10", UNI_CALLSTATE_N10 }, 87 [CALLST_N11] = { "N11", UNI_CALLSTATE_N11 }, 88 [CALLST_N12] = { "N12", UNI_CALLSTATE_N12 }, |
89}; 90 91static void unx_send_add_party_rej(struct call *c, struct uni_all *u); 92 93static __inline void 94set_call_state(struct call *c, enum call_state state) 95{ 96 ASSERT(state == CALLST_NULL || --- 4214 unchanged lines hidden --- | 89}; 90 91static void unx_send_add_party_rej(struct call *c, struct uni_all *u); 92 93static __inline void 94set_call_state(struct call *c, enum call_state state) 95{ 96 ASSERT(state == CALLST_NULL || --- 4214 unchanged lines hidden --- |