From 4908ed7a46ed96d553672ab3f171baec2d4e570f Mon Sep 17 00:00:00 2001 From: harti Date: Fri, 7 Nov 2003 09:00:58 +0000 Subject: Virgin import of signaling layer of NgATM (user part) 0.91 --- contrib/ngatm/libngatm/net_in.fig | 74 ++++++++++++++++++++++ contrib/ngatm/libngatm/net_out.fig | 76 +++++++++++++++++++++++ contrib/ngatm/libngatm/unicust.h | 123 +++++++++++++++++++++++++++++++++++++ 3 files changed, 273 insertions(+) create mode 100644 contrib/ngatm/libngatm/net_in.fig create mode 100644 contrib/ngatm/libngatm/net_out.fig create mode 100644 contrib/ngatm/libngatm/unicust.h (limited to 'contrib/ngatm') diff --git a/contrib/ngatm/libngatm/net_in.fig b/contrib/ngatm/libngatm/net_in.fig new file mode 100644 index 0000000..3914c10 --- /dev/null +++ b/contrib/ngatm/libngatm/net_in.fig @@ -0,0 +1,74 @@ +#FIG 3.2 +Landscape +Center +Metric +Letter +100.00 +Single +-2 +1200 2 +1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 5400 675 225 225 5400 675 5400 900 +1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 5400 1800 225 225 5400 1800 5400 2025 +1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 5400 2925 225 225 5400 2925 5400 3150 +1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 5400 4050 225 225 5400 4050 5400 4275 +1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 5408 5169 225 225 5408 5169 5408 5394 +1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 4281 6292 225 225 4281 6292 4281 6517 +1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 5408 7419 225 225 5408 7419 5408 7644 +1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 6525 6292 225 225 6525 6292 6525 6517 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 5400 900 5400 1575 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 5400 2025 5400 2700 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 5400 3150 5400 3825 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 5400 4275 5400 4950 +2 1 0 1 -1 7 50 0 -1 0.000 0 0 -1 1 0 5 + 1 1 1.00 60.00 120.00 + 5625 2925 5850 2925 5850 4500 5625 4500 5400 4725 +2 1 0 1 -1 7 50 0 -1 0.000 0 0 -1 1 0 5 + 1 1 1.00 60.00 120.00 + 5175 1800 4725 1800 4725 3375 5175 3375 5400 3600 +2 1 0 1 -1 7 50 0 -1 0.000 0 0 -1 1 0 5 + 1 1 1.00 60.00 120.00 + 5175 1800 4275 1800 4275 4500 5175 4500 5400 4725 +2 1 0 1 -1 7 50 0 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 5400 5400 5400 7200 +2 1 0 1 -1 7 50 0 -1 0.000 0 0 -1 1 0 3 + 1 1 1.00 60.00 120.00 + 5175 5175 4275 5175 4275 6075 +2 1 0 1 -1 7 50 0 -1 0.000 0 0 -1 1 0 3 + 1 1 1.00 60.00 120.00 + 5625 5175 6525 5175 6525 6075 +2 1 0 1 -1 7 50 0 -1 0.000 0 0 -1 1 0 3 + 1 1 1.00 60.00 120.00 + 4275 6525 4275 7425 5175 7425 +2 1 0 1 -1 7 50 0 -1 0.000 0 0 -1 1 0 3 + 1 1 1.00 60.00 120.00 + 6525 6525 6525 7425 5625 7425 +2 1 0 1 -1 7 50 0 -1 0.000 0 0 -1 1 0 5 + 1 1 1.00 60.00 120.00 + 5625 1800 8100 1800 8100 7875 5400 7875 5400 7650 +4 1 0 50 0 14 12 0.0000 4 120 210 5400 720 N0\001 +4 0 9 50 0 14 12 0.0000 4 135 1680 5445 1080 SETUP.indication\001 +4 1 0 50 0 14 12 0.0000 4 120 210 5400 1845 N1\001 +4 0 20 50 0 14 12 0.0000 4 150 2520 5445 2205 PROCEEDING.request (opt)\001 +4 1 0 50 0 14 12 0.0000 4 120 210 5400 2970 N3\001 +4 1 0 50 0 14 12 0.0000 4 120 210 5400 4095 N4\001 +4 0 20 50 0 14 12 0.0000 4 135 1680 5760 1755 RELEASE.response\001 +4 0 20 50 0 14 12 0.0000 4 135 1470 5445 4860 SETUP.response\001 +4 0 20 50 0 14 12 0.0000 4 135 1680 5445 3690 ALERTING.request\001 +4 1 0 50 0 14 12 0.0000 4 120 315 5400 5220 N10\001 +4 1 0 50 0 14 12 0.0000 4 120 315 4275 6345 N11\001 +4 1 0 50 0 14 12 0.0000 4 120 315 6525 6345 N12\001 +4 2 9 50 0 14 12 0.0000 4 135 1890 5085 5130 RELEASE.indication\001 +4 0 20 50 0 14 12 0.0000 4 135 1575 5715 5130 RELEASE.request\001 +4 2 9 50 0 14 12 0.0000 4 135 1575 5355 5715 RELEASE.confirm\001 +4 0 9 50 0 14 12 0.0000 4 135 1575 5715 7605 RELEASE.confirm\001 +4 2 20 50 0 14 12 0.0000 4 135 1680 5085 7605 RELEASE.response\001 +4 1 0 50 0 14 12 0.0000 4 120 210 5400 7470 N0\001 diff --git a/contrib/ngatm/libngatm/net_out.fig b/contrib/ngatm/libngatm/net_out.fig new file mode 100644 index 0000000..c46356d --- /dev/null +++ b/contrib/ngatm/libngatm/net_out.fig @@ -0,0 +1,76 @@ +#FIG 3.2 +Landscape +Center +Metric +Letter +100.00 +Single +-2 +1200 2 +1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 5400 675 225 225 5400 675 5400 900 +1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 5400 1800 225 225 5400 1800 5400 2025 +1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 5400 2925 225 225 5400 2925 5400 3150 +1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 5400 4050 225 225 5400 4050 5400 4275 +1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 5416 5181 225 225 5416 5181 5416 5406 +1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 5408 6294 225 225 5408 6294 5408 6519 +1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 4281 7417 225 225 4281 7417 4281 7642 +1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 5408 8544 225 225 5408 8544 5408 8769 +1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 6525 7417 225 225 6525 7417 6525 7642 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 5400 900 5400 1575 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 5400 2025 5400 2700 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 5400 3150 5400 3825 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 5400 4275 5400 4950 +2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 5400 5400 5400 6075 +2 1 0 1 -1 7 50 0 -1 0.000 0 0 -1 1 0 5 + 1 1 1.00 60.00 120.00 + 5175 1800 4950 1800 4950 3375 5175 3375 5400 3600 +2 1 0 1 -1 7 50 0 -1 0.000 0 0 -1 1 0 5 + 1 1 1.00 60.00 120.00 + 5175 1800 4500 1800 4500 4500 5175 4500 5400 4725 +2 1 0 1 -1 7 50 0 -1 0.000 0 0 -1 1 0 5 + 1 1 1.00 60.00 120.00 + 5625 2925 5850 2925 5850 4500 5625 4500 5400 4725 +2 1 0 1 -1 7 50 0 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 5400 6525 5400 8325 +2 1 0 1 -1 7 50 0 -1 0.000 0 0 -1 1 0 3 + 1 1 1.00 60.00 120.00 + 5175 6300 4275 6300 4275 7200 +2 1 0 1 -1 7 50 0 -1 0.000 0 0 -1 1 0 3 + 1 1 1.00 60.00 120.00 + 5625 6300 6525 6300 6525 7200 +2 1 0 1 -1 7 50 0 -1 0.000 0 0 -1 1 0 3 + 1 1 1.00 60.00 120.00 + 4275 7650 4275 8550 5175 8550 +2 1 0 1 -1 7 50 0 -1 0.000 0 0 -1 1 0 3 + 1 1 1.00 60.00 120.00 + 6525 7650 6525 8550 5625 8550 +4 1 0 50 0 14 12 0.0000 4 120 210 5400 720 N0\001 +4 0 20 50 0 14 12 0.0000 4 135 1365 5535 1125 SETUP.request\001 +4 1 0 50 0 14 12 0.0000 4 120 210 5400 1845 N6\001 +4 1 0 50 0 14 12 0.0000 4 120 210 5400 2970 N9\001 +4 1 0 50 0 14 12 0.0000 4 120 210 5400 4095 N7\001 +4 1 0 50 0 14 12 0.0000 4 120 210 5400 5220 N8\001 +4 1 0 50 0 14 12 0.0000 4 120 315 5400 6345 N10\001 +4 0 20 50 0 14 12 0.0000 4 135 2310 5535 5625 SETUP_COMPLETE.request\001 +4 0 9 50 0 14 12 0.0000 4 135 1995 5535 3735 ALERTING.indication\001 +4 0 9 50 0 14 12 0.0000 4 135 1365 5535 4860 SETUP.confirm\001 +4 0 9 50 0 14 12 0.0000 4 135 2205 5535 2610 PROCEEDING.indication\001 +4 1 0 50 0 14 12 0.0000 4 120 315 4275 7470 N11\001 +4 1 0 50 0 14 12 0.0000 4 120 315 6525 7470 N12\001 +4 2 9 50 0 14 12 0.0000 4 135 1890 5085 6255 RELEASE.indication\001 +4 0 20 50 0 14 12 0.0000 4 135 1575 5715 6255 RELEASE.request\001 +4 2 9 50 0 14 12 0.0000 4 135 1575 5355 6840 RELEASE.confirm\001 +4 0 9 50 0 14 12 0.0000 4 135 1575 5715 8730 RELEASE.confirm\001 +4 2 20 50 0 14 12 0.0000 4 135 1680 5085 8730 RELEASE.response\001 +4 1 0 50 0 14 12 0.0000 4 120 210 5400 8595 N0\001 diff --git a/contrib/ngatm/libngatm/unicust.h b/contrib/ngatm/libngatm/unicust.h new file mode 100644 index 0000000..d018b06 --- /dev/null +++ b/contrib/ngatm/libngatm/unicust.h @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2001-2003 + * Fraunhofer Institute for Open Communication Systems (FhG Fokus). + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * Author: Hartmut Brandt + * + * $Begemot: libunimsg/libunimsg/unicust.h,v 1.4 2003/09/19 13:10:35 hbb Exp $ + * + * Customisation of signalling source to user space. + */ +#include +#include +#include +#include +#include +#include + +#define ASSERT(E, M) assert(E) + +static __inline__ void * +mzalloc(size_t s) +{ + void *ptr = malloc(s); + + if (ptr) + bzero(ptr, s); + return (ptr); +} + +#define INS_ALLOC() mzalloc(sizeof(struct uni)) +#define INS_FREE(P) free(P) + +#define UNI_ALLOC() mzalloc(sizeof(struct uni_all)) +#define UNI_FREE(P) free(P) + +#define SIG_ALLOC() mzalloc(sizeof(struct sig)) +#define SIG_FREE(P) free(P) + +#define CALL_ALLOC() mzalloc(sizeof(struct call)) +#define CALL_FREE(P) free(P) + +#define PARTY_ALLOC() mzalloc(sizeof(struct party)) +#define PARTY_FREE(P) free(P) + +/* + * Timers + */ +struct uni_timer { + void *c; +}; + +#define _TIMER_INIT(X,T) (X)->T.c = NULL +#define _TIMER_DESTROY(U,F) _TIMER_STOP(U,F) +#define _TIMER_STOP(U,F) \ + do { \ + if (F.c != NULL) { \ + (U)->funcs->stop_timer(U, U->arg, F.c); \ + F.c = NULL; \ + } \ + } while(0) +#define _TIMER_START(UNI,ARG,FIELD,DUE,FUNC) \ + (void)(FIELD.c = (UNI)->funcs->start_timer(UNI, \ + UNI->arg, DUE, FUNC, ARG)) + +#define TIMER_ISACT(X,T) (X->T.c != NULL) + +#define TIMER_FUNC_UNI(T,F) \ +static void F(struct uni *); \ +static void \ +_##T##_func(void *varg) \ +{ \ + struct uni *uni = (struct uni *)varg; \ + uni->T.c = NULL; \ + (F)(uni); \ +} + +/* + * Be careful: call may be invalid after the call to F + */ +#define TIMER_FUNC_CALL(T,F) \ +static void F(struct call *); \ +static void \ +_##T##_func(void *varg) \ +{ \ + struct call *call = (struct call *)varg; \ + call->T.c = NULL; \ + (F)(call); \ +} + +/* + * Be careful: call/party may be invalid after the call to F + */ +#define TIMER_FUNC_PARTY(T,F) \ +static void F(struct party *); \ +static void \ +_##T##_func(void *varg) \ +{ \ + struct party *party = (struct party *)varg; \ + party->T.c = NULL; \ + (F)(party); \ +} -- cgit v1.1