aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/ngatm/netnatm/sig
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/ngatm/netnatm/sig')
-rw-r--r--sys/contrib/ngatm/netnatm/sig/genmsgcpyc.awk2
-rw-r--r--sys/contrib/ngatm/netnatm/sig/genmsgcpyh.awk2
-rw-r--r--sys/contrib/ngatm/netnatm/sig/sig_call.c54
-rw-r--r--sys/contrib/ngatm/netnatm/sig/sig_coord.c6
-rw-r--r--sys/contrib/ngatm/netnatm/sig/sig_party.c20
-rw-r--r--sys/contrib/ngatm/netnatm/sig/sig_print.c2
-rw-r--r--sys/contrib/ngatm/netnatm/sig/sig_reset.c25
-rw-r--r--sys/contrib/ngatm/netnatm/sig/sig_uni.c18
-rw-r--r--sys/contrib/ngatm/netnatm/sig/sig_verify.c2
-rw-r--r--sys/contrib/ngatm/netnatm/sig/uni.h8
-rw-r--r--sys/contrib/ngatm/netnatm/sig/unidef.h54
-rw-r--r--sys/contrib/ngatm/netnatm/sig/unimkmsg.h2
-rw-r--r--sys/contrib/ngatm/netnatm/sig/unipriv.h61
-rw-r--r--sys/contrib/ngatm/netnatm/sig/unisig.h2
14 files changed, 148 insertions, 110 deletions
diff --git a/sys/contrib/ngatm/netnatm/sig/genmsgcpyc.awk b/sys/contrib/ngatm/netnatm/sig/genmsgcpyc.awk
index ca347acfb934..be61925c977a 100644
--- a/sys/contrib/ngatm/netnatm/sig/genmsgcpyc.awk
+++ b/sys/contrib/ngatm/netnatm/sig/genmsgcpyc.awk
@@ -26,7 +26,7 @@
#
# Author: Hartmut Brandt <harti@freebsd.org>
#
-# $Begemot: libunimsg/atm/sig/genmsgcpyc.awk,v 1.3 2003/09/19 12:03:33 hbb Exp $
+# $Begemot: libunimsg/netnatm/sig/genmsgcpyc.awk,v 1.4 2004/07/08 08:22:18 brandt Exp $
#
# Generate copy functions for messages
#
diff --git a/sys/contrib/ngatm/netnatm/sig/genmsgcpyh.awk b/sys/contrib/ngatm/netnatm/sig/genmsgcpyh.awk
index 0b50688c60cf..f9b44f2b168d 100644
--- a/sys/contrib/ngatm/netnatm/sig/genmsgcpyh.awk
+++ b/sys/contrib/ngatm/netnatm/sig/genmsgcpyh.awk
@@ -26,7 +26,7 @@
#
# Author: Hartmut Brandt <harti@freebsd.org>
#
-# $Begemot: libunimsg/atm/sig/genmsgcpyh.awk,v 1.3 2003/09/19 12:03:33 hbb Exp $
+# $Begemot: libunimsg/netnatm/sig/genmsgcpyh.awk,v 1.4 2004/07/08 08:22:19 brandt Exp $
#
# Generate copy functions for messages
#
diff --git a/sys/contrib/ngatm/netnatm/sig/sig_call.c b/sys/contrib/ngatm/netnatm/sig/sig_call.c
index e11c52f3113f..c6a754b4c2a4 100644
--- a/sys/contrib/ngatm/netnatm/sig/sig_call.c
+++ b/sys/contrib/ngatm/netnatm/sig/sig_call.c
@@ -26,7 +26,7 @@
*
* Author: Hartmut Brandt <harti@freebsd.org>
*
- * $Begemot: libunimsg/atm/sig/sig_call.c,v 1.61 2003/10/16 13:35:44 hbb Exp $
+ * $Begemot: libunimsg/netnatm/sig/sig_call.c,v 1.64 2004/07/08 08:22:19 brandt Exp $
*
* Call instance handling
*
@@ -144,7 +144,7 @@ uni_find_callx(struct uni *uni, u_int cref, u_int mine)
* Create a new call instance. The type must be set by the caller.
*/
struct call *
-uni_create_call(struct uni *uni, u_int cref, u_int mine, u_int32_t cookie)
+uni_create_call(struct uni *uni, u_int cref, u_int mine, uint32_t cookie)
{
struct call *c;
struct uniapi_call_created *ind;
@@ -185,10 +185,10 @@ uni_create_call(struct uni *uni, u_int cref, u_int mine, u_int32_t cookie)
}
struct call *
-uni_create_new_call(struct uni *uni, u_int32_t cookie)
+uni_create_new_call(struct uni *uni, uint32_t cookie)
{
struct call *c;
- u_int32_t old = uni->cref_alloc++;
+ uint32_t old = uni->cref_alloc++;
again:
if (uni->cref_alloc == (1 << 23))
@@ -254,7 +254,7 @@ static void
allocate_epref(struct call *c, struct uni_ie_epref *epref)
{
struct party *p;
- u_int32_t old = c->epref_alloc++;
+ uint32_t old = c->epref_alloc++;
again:
if (c->epref_alloc == (1 << 15))
@@ -466,7 +466,7 @@ un0_setup(struct call *c, struct uni_msg *m, struct uni_all *u,
* Q.2971:Call-Control-N 4/39 (N0)
*/
static void
-un0_setup_request(struct call *c, struct uni_msg *m, u_int32_t cookie,
+un0_setup_request(struct call *c, struct uni_msg *m, uint32_t cookie,
enum call_state new_state)
{
struct uniapi_setup_request *arg =
@@ -829,7 +829,7 @@ unx_alerting(struct call *c, struct uni_msg *m, struct uni_all *u,
* Q.2971:Call-Control-N 6/39 (N1)
*/
static void
-u6n1_proceeding_request(struct call *c, struct uni_msg *m, u_int32_t cookie,
+u6n1_proceeding_request(struct call *c, struct uni_msg *m, uint32_t cookie,
enum call_state new_state)
{
struct uni_all *msg;
@@ -866,7 +866,7 @@ u6n1_proceeding_request(struct call *c, struct uni_msg *m, u_int32_t cookie,
* Q.2971:Call-Control-N 7/39 (N3)
*/
static void
-unx_alerting_request(struct call *c, struct uni_msg *m, u_int32_t cookie,
+unx_alerting_request(struct call *c, struct uni_msg *m, uint32_t cookie,
enum call_state new_state)
{
struct uni_all *msg;
@@ -915,7 +915,7 @@ unx_alerting_request(struct call *c, struct uni_msg *m, u_int32_t cookie,
* Q.2971:Call-Control-N 8/39 (N4)
*/
static void
-unx_setup_response(struct call *c, struct uni_msg *m, u_int32_t cookie,
+unx_setup_response(struct call *c, struct uni_msg *m, uint32_t cookie,
enum call_state new_state)
{
struct uni_all *msg;
@@ -947,6 +947,7 @@ unx_setup_response(struct call *c, struct uni_msg *m, u_int32_t cookie,
p->flags |= PARTY_CONNECT;
} else if (c->type == CALL_LEAF) {
+ /* XXX don't mandate if only one party */
uniapi_call_error(c, UNIAPI_ERROR_BAD_PARTY, cookie);
UNI_FREE(msg);
uni_msg_destroy(m);
@@ -979,7 +980,7 @@ unx_setup_response(struct call *c, struct uni_msg *m, u_int32_t cookie,
* Q.2971:Call-Control-N 15/39 (N8)
*/
static void
-n8_setup_compl_request(struct call *c, struct uni_msg *m, u_int32_t cookie,
+n8_setup_compl_request(struct call *c, struct uni_msg *m, uint32_t cookie,
enum call_state new_state)
{
struct uni_all *msg;
@@ -1289,7 +1290,7 @@ n10_connect_ack(struct call *c, struct uni_msg *m, struct uni_all *u)
* Q.2971:Call-Control-N 29/39 (N11)
*/
static void
-unx_release_response(struct call *c, struct uni_msg *m, u_int32_t cookie)
+unx_release_response(struct call *c, struct uni_msg *m, uint32_t cookie)
{
struct party *p;
struct uni_all *msg;
@@ -1544,7 +1545,7 @@ unx_notify(struct call *c, struct uni_msg *m, struct uni_all *u)
* Q.2971:Call-Control-N 19/39
*/
static void
-unx_notify_request(struct call *c, struct uni_msg *m, u_int32_t cookie)
+unx_notify_request(struct call *c, struct uni_msg *m, uint32_t cookie)
{
struct uni_all *msg;
struct uniapi_notify_request *arg =
@@ -1575,7 +1576,7 @@ unx_notify_request(struct call *c, struct uni_msg *m, u_int32_t cookie)
* Q.2971:Call-Control-N 28/39
*/
static void
-unx_release_request(struct call *c, struct uni_msg *m, u_int32_t cookie,
+unx_release_request(struct call *c, struct uni_msg *m, uint32_t cookie,
enum call_state new_state)
{
struct uni_all *msg;
@@ -1942,7 +1943,7 @@ unx_status(struct call *c, struct uni_msg *m, struct uni_all *u)
* Q.2971:Call-Control-N 32/39
*/
static void
-unx_status_enquiry_request(struct call *c, struct uni_msg *msg, u_int32_t cookie)
+unx_status_enquiry_request(struct call *c, struct uni_msg *msg, uint32_t cookie)
{
struct uniapi_status_enquiry_request *arg =
uni_msg_rptr(msg, struct uniapi_status_enquiry_request *);
@@ -2457,7 +2458,7 @@ nx_add_party_rej_indication(struct call *c, struct uni_msg *api)
* Q.2971:Call-Control-N 22/39 (N10)
*/
static void
-unx_add_party_request(struct call *c, struct uni_msg *msg, u_int32_t cookie)
+unx_add_party_request(struct call *c, struct uni_msg *msg, uint32_t cookie)
{
struct uniapi_add_party_request *add =
uni_msg_rptr(msg, struct uniapi_add_party_request *);
@@ -2503,7 +2504,7 @@ unx_add_party_request(struct call *c, struct uni_msg *msg, u_int32_t cookie)
* Q.2971:Call-Control-N 22/39
*/
static void
-un10_add_party_ack_request(struct call *c, struct uni_msg *msg, u_int32_t cookie)
+un10_add_party_ack_request(struct call *c, struct uni_msg *msg, uint32_t cookie)
{
struct uniapi_add_party_ack_request *ack =
uni_msg_rptr(msg, struct uniapi_add_party_ack_request *);
@@ -2538,7 +2539,7 @@ un10_add_party_ack_request(struct call *c, struct uni_msg *msg, u_int32_t cookie
* Q.2971:Call-Control-N 22/39 N10
*/
static void
-unx_party_alerting_request(struct call *c, struct uni_msg *msg, u_int32_t cookie)
+unx_party_alerting_request(struct call *c, struct uni_msg *msg, uint32_t cookie)
{
struct uniapi_party_alerting_request *alert =
uni_msg_rptr(msg, struct uniapi_party_alerting_request *);
@@ -2573,7 +2574,7 @@ unx_party_alerting_request(struct call *c, struct uni_msg *msg, u_int32_t cookie
* Q.2971:Call-Control-N 22/39 N10
*/
static void
-unx_add_party_rej_request(struct call *c, struct uni_msg *msg, u_int32_t cookie)
+unx_add_party_rej_request(struct call *c, struct uni_msg *msg, uint32_t cookie)
{
struct uniapi_add_party_rej_request *rej =
uni_msg_rptr(msg, struct uniapi_add_party_rej_request *);
@@ -2607,7 +2608,7 @@ unx_add_party_rej_request(struct call *c, struct uni_msg *msg, u_int32_t cookie)
* Q.2971:Call-Control-N 27/39 N1-N9
*/
static void
-unx_drop_party_request(struct call *c, struct uni_msg *msg, u_int32_t cookie)
+unx_drop_party_request(struct call *c, struct uni_msg *msg, uint32_t cookie)
{
struct uniapi_drop_party_request *drop =
uni_msg_rptr(msg, struct uniapi_drop_party_request *);
@@ -2637,7 +2638,7 @@ unx_drop_party_request(struct call *c, struct uni_msg *msg, u_int32_t cookie)
*/
static void
unx_drop_party_ack_request(struct call *c, struct uni_msg *msg,
- u_int32_t cookie)
+ uint32_t cookie)
{
struct uniapi_drop_party_ack_request *ack =
uni_msg_rptr(msg, struct uniapi_drop_party_ack_request *);
@@ -2667,6 +2668,7 @@ unx_drop_party_ack_request(struct call *c, struct uni_msg *msg,
* Q.2971:Call-Control-N 21/39 N10
*
* Body already decoded
+ * XXX check EPREF flag
*/
static void
unx_add_party(struct call *c, struct uni_msg *m, struct uni_all *u,
@@ -2751,6 +2753,14 @@ unx_add_party(struct call *c, struct uni_msg *m, struct uni_all *u,
&u->u.add_party.epref, -1);
return;
}
+
+ if (IE_ISGOOD(u->u.add_party.epref) && p == NULL &&
+ u->u.add_party.epref.flag) {
+ IE_SETERROR(u->u.add_party.epref);
+ UNI_SAVE_IERR(&c->uni->cx, UNI_IE_EPREF,
+ u->u.add_party.epref.h.act, UNI_IERR_BAD);
+ }
+
if (!IE_ISGOOD(u->u.add_party.epref)) {
/* 9.5.3.2.2 */
if (vfy == VFY_OK) {
@@ -3321,7 +3331,7 @@ unx_unknown(struct call *c, struct uni_msg *m, struct uni_all *u)
/**********************************************************************/
void
-uni_sig_call(struct call *c, enum call_sig sig, u_int32_t cookie,
+uni_sig_call(struct call *c, enum call_sig sig, uint32_t cookie,
struct uni_msg *msg, struct uni_all *u)
{
if (sig >= SIGC_END) {
@@ -3859,7 +3869,7 @@ uni_sig_call(struct call *c, enum call_sig sig, u_int32_t cookie,
unx_alerting_request(c, msg, cookie, CALLST_U7);
break;
}
- if (c->cstate == CALLST_N1 || c->cstate == CALLST_N1) {
+ if (c->cstate == CALLST_N1 || c->cstate == CALLST_N3) {
/* Q.2971:Call-Control-N 38/39 (N1) */
/* Q.2971:Call-Control-N 7/39 (N3) */
unx_alerting_request(c, msg, cookie, CALLST_N4);
diff --git a/sys/contrib/ngatm/netnatm/sig/sig_coord.c b/sys/contrib/ngatm/netnatm/sig/sig_coord.c
index bbdd72341451..474974fb6547 100644
--- a/sys/contrib/ngatm/netnatm/sig/sig_coord.c
+++ b/sys/contrib/ngatm/netnatm/sig/sig_coord.c
@@ -26,7 +26,7 @@
*
* Author: Hartmut Brandt <harti@freebsd.org>
*
- * $Begemot: libunimsg/atm/sig/sig_coord.c,v 1.6 2003/09/24 10:27:50 hbb Exp $
+ * $Begemot: libunimsg/netnatm/sig/sig_coord.c,v 1.11 2004/07/08 08:22:20 brandt Exp $
*
* Coordinator
*/
@@ -200,7 +200,7 @@ coord_saal_release_indication(struct uni *uni)
* a call instance. In this case 'cookie' is zero.
*/
static void
-coord_link_establish_request(struct uni *uni, u_int32_t cookie)
+coord_link_establish_request(struct uni *uni, uint32_t cookie)
{
switch (uni->custat) {
@@ -650,7 +650,7 @@ input_call(struct call *c, struct uni_msg *m, struct uni_all *u)
* Signal handler of the coordinator
*/
void
-uni_sig_coord(struct uni *uni, enum coord_sig sig, u_int32_t cookie,
+uni_sig_coord(struct uni *uni, enum coord_sig sig, uint32_t cookie,
struct uni_msg *msg)
{
struct call *c;
diff --git a/sys/contrib/ngatm/netnatm/sig/sig_party.c b/sys/contrib/ngatm/netnatm/sig/sig_party.c
index c8c92b0907b9..e09482d20df2 100644
--- a/sys/contrib/ngatm/netnatm/sig/sig_party.c
+++ b/sys/contrib/ngatm/netnatm/sig/sig_party.c
@@ -26,7 +26,7 @@
*
* Author: Hartmut Brandt <harti@freebsd.org>
*
- * $Begemot: libunimsg/atm/sig/sig_party.c,v 1.12 2003/10/10 14:37:28 hbb Exp $
+ * $Begemot: libunimsg/netnatm/sig/sig_party.c,v 1.17 2004/07/08 08:22:21 brandt Exp $
*
* Party instance handling
*/
@@ -71,7 +71,7 @@ set_party_state(struct party *p, enum uni_epstate state)
* No check is done, that a party with this epref does not alreay exist.
*/
struct party *
-uni_create_partyx(struct call *c, u_int epref, u_int mine, u_int32_t cookie)
+uni_create_partyx(struct call *c, u_int epref, u_int mine, uint32_t cookie)
{
struct party *p;
struct uni_msg *api;
@@ -232,7 +232,7 @@ stop_all_party_timers(struct party *p)
* Q.2971:Party-control-N 3 (PN0)
*/
static void
-pun0_add_party_request(struct party *p, struct uni_msg *api, u_int32_t cookie)
+pun0_add_party_request(struct party *p, struct uni_msg *api, uint32_t cookie)
{
struct uni_all *add;
struct uniapi_add_party_request *req =
@@ -266,7 +266,7 @@ pun0_add_party_request(struct party *p, struct uni_msg *api, u_int32_t cookie)
* Q.2971:Party-Control-N 7 PN3
*/
static void
-punx_add_party_ack_request(struct party *p, struct uni_msg *m, u_int32_t cookie)
+punx_add_party_ack_request(struct party *p, struct uni_msg *m, uint32_t cookie)
{
struct uni_all *ack;
struct uniapi_add_party_ack_request *req =
@@ -295,7 +295,7 @@ punx_add_party_ack_request(struct party *p, struct uni_msg *m, u_int32_t cookie)
* Q.2971:Party-Control-N 6 PN2
*/
static void
-pun2_add_party_rej_request(struct party *p, struct uni_msg *m, u_int32_t cookie)
+pun2_add_party_rej_request(struct party *p, struct uni_msg *m, uint32_t cookie)
{
struct uni_all *rej;
struct uniapi_add_party_rej_request *req =
@@ -352,7 +352,7 @@ pun0_add_party(struct party *p, struct uni_msg *m, struct uni_all *u)
*/
static void
pun2_party_alerting_request(struct party *p, struct uni_msg *api,
- u_int32_t cookie)
+ uint32_t cookie)
{
struct uni_all *alert;
struct uniapi_party_alerting_request *req =
@@ -751,7 +751,7 @@ drop_partyE(struct party *p)
* Q.2971:Party-Control-N 8
*/
static void
-punx_drop_party_request(struct party *p, struct uni_msg *api, u_int32_t cookie)
+punx_drop_party_request(struct party *p, struct uni_msg *api, uint32_t cookie)
{
struct uniapi_drop_party_request *req =
uni_msg_rptr(api, struct uniapi_drop_party_request *);
@@ -784,7 +784,7 @@ punx_drop_party_request(struct party *p, struct uni_msg *api, u_int32_t cookie)
* Q.2971:Party-Control-N 9
*/
static void
-pun6_drop_party_ack_request(struct party *p, struct uni_msg *api, u_int32_t cookie)
+pun6_drop_party_ack_request(struct party *p, struct uni_msg *api, uint32_t cookie)
{
struct uniapi_drop_party_ack_request *req =
uni_msg_rptr(api, struct uniapi_drop_party_ack_request *);
@@ -814,7 +814,7 @@ pun6_drop_party_ack_request(struct party *p, struct uni_msg *api, u_int32_t cook
* Q.2971:Party-Control-N 12
*/
static void
-punx_status_enquiry_request(struct party *p, u_int32_t cookie)
+punx_status_enquiry_request(struct party *p, uint32_t cookie)
{
struct uni_all *enq;
@@ -911,7 +911,7 @@ pun5_status(struct party *p, struct uni_msg *m, struct uni_all *u)
/************************************************************/
void
-uni_sig_party(struct party *p, enum party_sig sig, u_int32_t cookie,
+uni_sig_party(struct party *p, enum party_sig sig, uint32_t cookie,
struct uni_msg *msg, struct uni_all *u)
{
if (sig >= SIGP_END) {
diff --git a/sys/contrib/ngatm/netnatm/sig/sig_print.c b/sys/contrib/ngatm/netnatm/sig/sig_print.c
index 56bb9cec2e95..252ba07d96eb 100644
--- a/sys/contrib/ngatm/netnatm/sig/sig_print.c
+++ b/sys/contrib/ngatm/netnatm/sig/sig_print.c
@@ -27,7 +27,7 @@
* Author: Hartmut Brandt <harti@freebsd.org>
* Kendy Kutzner <kutzner@fokus.fraunhofer.de>
*
- * $Begemot: libunimsg/atm/sig/sig_print.c,v 1.4 2003/09/19 12:03:34 hbb Exp $
+ * $Begemot: libunimsg/netnatm/sig/sig_print.c,v 1.5 2004/07/08 08:22:22 brandt Exp $
*/
#include <sys/types.h>
diff --git a/sys/contrib/ngatm/netnatm/sig/sig_reset.c b/sys/contrib/ngatm/netnatm/sig/sig_reset.c
index b5b4a5e38fcf..d57d9214d183 100644
--- a/sys/contrib/ngatm/netnatm/sig/sig_reset.c
+++ b/sys/contrib/ngatm/netnatm/sig/sig_reset.c
@@ -3,6 +3,8 @@
* Fraunhofer Institute for Open Communication Systems (FhG Fokus).
* All rights reserved.
*
+ * Author: Hartmut Brandt <harti@freebsd.org>
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -24,9 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * Author: Hartmut Brandt <harti@freebsd.org>
- *
- * $Begemot: libunimsg/atm/sig/sig_reset.c,v 1.5 2003/09/24 10:27:50 hbb Exp $
+ * $Begemot: libunimsg/netnatm/sig/sig_reset.c,v 1.10 2004/07/08 08:22:22 brandt Exp $
*
* Reset-start and reset-respond
*/
@@ -45,10 +45,13 @@ static void response_status(struct uni *, struct uni_msg *, struct uni_all *);
static void response_t317(struct uni *);
-static void response_error(struct uni *, struct uniapi_reset_error_response *, u_int32_t cookie);
-static void response_response(struct uni *, struct uniapi_reset_response *, u_int32_t);
+static void response_error(struct uni *, struct uniapi_reset_error_response *,
+ uint32_t cookie);
+static void response_response(struct uni *, struct uniapi_reset_response *,
+ uint32_t);
-static void start_request(struct uni *, struct uniapi_reset_request *, u_int32_t);
+static void start_request(struct uni *, struct uniapi_reset_request *,
+ uint32_t);
static void start_t316(struct uni *);
@@ -76,7 +79,7 @@ TIMER_FUNC_UNI(t316, t316_func)
* Reset-Start process.
*/
void
-uni_sig_start(struct uni *uni, u_int sig, u_int32_t cookie,
+uni_sig_start(struct uni *uni, u_int sig, uint32_t cookie,
struct uni_msg *m, struct uni_all *u)
{
if (sig >= SIGS_END) {
@@ -137,7 +140,7 @@ uni_sig_start(struct uni *uni, u_int sig, u_int32_t cookie,
* Q.2931:Reset-Start 1/2
*/
static void
-start_request(struct uni *uni, struct uniapi_reset_request *req, u_int32_t cookie)
+start_request(struct uni *uni, struct uniapi_reset_request *req, uint32_t cookie)
{
struct uni_all *resp;
int err;
@@ -432,7 +435,7 @@ start_status(struct uni *uni, struct uni_msg *m, struct uni_all *u)
* Reset-Respond process.
*/
void
-uni_sig_respond(struct uni *uni, u_int sig, u_int32_t cookie,
+uni_sig_respond(struct uni *uni, u_int sig, uint32_t cookie,
struct uni_msg *m, struct uni_all *u)
{
if (sig >= SIGR_END) {
@@ -639,7 +642,7 @@ response_t317(struct uni *uni)
*/
static void
response_error(struct uni *uni, struct uniapi_reset_error_response *c,
- u_int32_t cookie)
+ uint32_t cookie)
{
struct uni_all *resp;
@@ -681,7 +684,7 @@ response_error(struct uni *uni, struct uniapi_reset_error_response *c,
*/
static void
response_response(struct uni *uni, struct uniapi_reset_response *arg,
- u_int32_t cookie)
+ uint32_t cookie)
{
struct uni_all *resp;
diff --git a/sys/contrib/ngatm/netnatm/sig/sig_uni.c b/sys/contrib/ngatm/netnatm/sig/sig_uni.c
index 3755881a62e0..78db20ef08fe 100644
--- a/sys/contrib/ngatm/netnatm/sig/sig_uni.c
+++ b/sys/contrib/ngatm/netnatm/sig/sig_uni.c
@@ -26,7 +26,7 @@
*
* Author: Hartmut Brandt <harti@freebsd.org>
*
- * $Begemot: libunimsg/atm/sig/sig_uni.c,v 1.4 2003/09/24 10:27:50 hbb Exp $
+ * $Begemot: libunimsg/netnatm/sig/sig_uni.c,v 1.10 2004/07/08 08:22:23 brandt Exp $
*
* Instance handling
*/
@@ -363,7 +363,7 @@ static struct {
};
void
-uni_uni_input(struct uni *uni, enum uni_sig sig, u_int32_t cookie,
+uni_uni_input(struct uni *uni, enum uni_sig sig, uint32_t cookie,
struct uni_msg *m)
{
u_int i;
@@ -462,7 +462,7 @@ uni_work(struct uni *uni)
*/
void
uni_enq_sig(struct uni *uni, u_int type, struct call *call,
- struct party *party, u_int32_t sig, u_int32_t cookie,
+ struct party *party, uint32_t sig, uint32_t cookie,
struct uni_msg *msg, struct uni_all *u)
{
struct sig *s;
@@ -484,7 +484,7 @@ uni_enq_sig(struct uni *uni, u_int type, struct call *call,
*/
void
uni_delenq_sig(struct uni *uni, u_int type, struct call *call,
- struct party *party, u_int32_t sig, u_int32_t cookie,
+ struct party *party, uint32_t sig, uint32_t cookie,
struct uni_msg *msg, struct uni_all *u)
{
struct sig *s;
@@ -504,8 +504,8 @@ uni_delenq_sig(struct uni *uni, u_int type, struct call *call,
/**************************************************************/
void
-uniapi_uni_error(struct uni *uni, u_int32_t reason, u_int32_t cookie,
- u_int32_t state)
+uniapi_uni_error(struct uni *uni, uint32_t reason, uint32_t cookie,
+ uint32_t state)
{
struct uni_msg *resp;
struct uniapi_error *err;
@@ -524,12 +524,12 @@ uniapi_uni_error(struct uni *uni, u_int32_t reason, u_int32_t cookie,
}
void
-uniapi_call_error(struct call *c, u_int32_t reason, u_int32_t cookie)
+uniapi_call_error(struct call *c, uint32_t reason, uint32_t cookie)
{
uniapi_uni_error(c->uni, reason, cookie, callstates[c->cstate].ext);
}
void
-uniapi_party_error(struct party *p, u_int32_t reason, u_int32_t cookie)
+uniapi_party_error(struct party *p, uint32_t reason, uint32_t cookie)
{
uniapi_uni_error(p->call->uni, reason, cookie,
callstates[p->call->cstate].ext);
@@ -657,7 +657,7 @@ uni_get_config(const struct uni *uni, struct uni_config *config)
void
uni_set_config(struct uni *uni, const struct uni_config *config,
- u_int32_t *mask, u_int32_t *popt_mask, u_int32_t *opt_mask)
+ uint32_t *mask, uint32_t *popt_mask, uint32_t *opt_mask)
{
int idle;
diff --git a/sys/contrib/ngatm/netnatm/sig/sig_verify.c b/sys/contrib/ngatm/netnatm/sig/sig_verify.c
index fe9561b8a545..ae78ed8eb50f 100644
--- a/sys/contrib/ngatm/netnatm/sig/sig_verify.c
+++ b/sys/contrib/ngatm/netnatm/sig/sig_verify.c
@@ -26,7 +26,7 @@
*
* Author: Hartmut Brandt <harti@freebsd.org>
*
- * $Begemot: libunimsg/atm/sig/sig_verify.c,v 1.16 2003/10/10 14:37:28 hbb Exp $
+ * $Begemot: libunimsg/netnatm/sig/sig_verify.c,v 1.19 2004/07/08 08:22:23 brandt Exp $
*
* Message verification with explicit action indicators.
*/
diff --git a/sys/contrib/ngatm/netnatm/sig/uni.h b/sys/contrib/ngatm/netnatm/sig/uni.h
index 9fa194333c65..5af6c445d187 100644
--- a/sys/contrib/ngatm/netnatm/sig/uni.h
+++ b/sys/contrib/ngatm/netnatm/sig/uni.h
@@ -26,7 +26,7 @@
*
* Author: Hartmut Brandt <harti@freebsd.org>
*
- * $Begemot: libunimsg/atm/sig/uni.h,v 1.3 2003/09/19 12:03:34 hbb Exp $
+ * $Begemot: libunimsg/netnatm/sig/uni.h,v 1.5 2004/07/08 08:22:24 brandt Exp $
*
* Public UNI interface
*/
@@ -41,7 +41,7 @@ struct uni;
struct uni_funcs {
/* output to the upper layer */
void (*uni_output)(struct uni *, void *, enum uni_sig,
- u_int32_t, struct uni_msg *);
+ uint32_t, struct uni_msg *);
/* output to the SAAL */
void (*saal_output)(struct uni *, void *, enum saal_sig,
@@ -79,13 +79,13 @@ void uni_get_config(const struct uni *, struct uni_config *);
/* set new instance configuration */
void uni_set_config(struct uni *, const struct uni_config *,
- u_int32_t *, u_int32_t *, u_int32_t *);
+ uint32_t *, uint32_t *, uint32_t *);
/* input from the SAAL to the instance */
void uni_saal_input(struct uni *, enum saal_sig, struct uni_msg *);
/* input from the upper layer to the instance */
-void uni_uni_input(struct uni *, enum uni_sig, u_int32_t, struct uni_msg *);
+void uni_uni_input(struct uni *, enum uni_sig, uint32_t, struct uni_msg *);
/* do work on pending signals */
void uni_work(struct uni *);
diff --git a/sys/contrib/ngatm/netnatm/sig/unidef.h b/sys/contrib/ngatm/netnatm/sig/unidef.h
index a92bd18d69c3..7278db8b91cb 100644
--- a/sys/contrib/ngatm/netnatm/sig/unidef.h
+++ b/sys/contrib/ngatm/netnatm/sig/unidef.h
@@ -26,13 +26,19 @@
*
* Author: Hartmut Brandt <harti@freebsd.org>
*
- * $Begemot: libunimsg/atm/sig/unidef.h,v 1.6 2003/09/19 12:03:34 hbb Exp $
+ * $Begemot: libunimsg/netnatm/sig/unidef.h,v 1.9 2004/07/08 08:22:24 brandt Exp $
*
* UNI public definitions.
*/
#ifndef _ATM_SIG_UNIDEF_H_
#define _ATM_SIG_UNIDEF_H_
+#ifdef _KERNEL
+#include <sys/stdint.h>
+#else
+#include <stdint.h>
+#endif
+
/*
* Debug facilities
*/
@@ -109,25 +115,25 @@ enum uni_option {
* UNI configuration
*/
struct uni_config {
- u_int32_t proto; /* which protocol */
- u_int32_t popt; /* protocol option */
- u_int32_t option; /* other options */
- u_int32_t timer301; /* T301 */
- u_int32_t timer303; /* T303 */
- u_int32_t init303; /* T303 retransmission count */
- u_int32_t timer308; /* T308 */
- u_int32_t init308; /* T308 retransmission count */
- u_int32_t timer309; /* T309 */
- u_int32_t timer310; /* T310 */
- u_int32_t timer313; /* T313 */
- u_int32_t timer316; /* T316 */
- u_int32_t init316; /* T316 retransmission count */
- u_int32_t timer317; /* T317 */
- u_int32_t timer322; /* T322 */
- u_int32_t init322; /* T322 retransmission count */
- u_int32_t timer397; /* T397 */
- u_int32_t timer398; /* T398 */
- u_int32_t timer399; /* T399 */
+ uint32_t proto; /* which protocol */
+ uint32_t popt; /* protocol option */
+ uint32_t option; /* other options */
+ uint32_t timer301; /* T301 */
+ uint32_t timer303; /* T303 */
+ uint32_t init303; /* T303 retransmission count */
+ uint32_t timer308; /* T308 */
+ uint32_t init308; /* T308 retransmission count */
+ uint32_t timer309; /* T309 */
+ uint32_t timer310; /* T310 */
+ uint32_t timer313; /* T313 */
+ uint32_t timer316; /* T316 */
+ uint32_t init316; /* T316 retransmission count */
+ uint32_t timer317; /* T317 */
+ uint32_t timer322; /* T322 */
+ uint32_t init322; /* T322 retransmission count */
+ uint32_t timer397; /* T397 */
+ uint32_t timer398; /* T398 */
+ uint32_t timer399; /* T399 */
};
enum uni_config_mask {
UNICFG_PROTO = 0x00000001,
@@ -213,8 +219,8 @@ enum uni_sig {
};
struct uniapi_error {
- u_int32_t reason;
- u_int32_t state;
+ uint32_t reason;
+ uint32_t state;
};
/* keep this in sync with atmapi.h:enum atmerr */
@@ -275,8 +281,8 @@ struct uniapi_reset_indication {
};
struct uniapi_reset_error_indication {
- u_int32_t source; /* 0 - start, 1 - response */
- u_int32_t reason;
+ uint32_t source; /* 0 - start, 1 - response */
+ uint32_t reason;
};
#define UNIAPI_DEF_RESET_ERRORS(MACRO) \
diff --git a/sys/contrib/ngatm/netnatm/sig/unimkmsg.h b/sys/contrib/ngatm/netnatm/sig/unimkmsg.h
index 852382512107..80264e143b1c 100644
--- a/sys/contrib/ngatm/netnatm/sig/unimkmsg.h
+++ b/sys/contrib/ngatm/netnatm/sig/unimkmsg.h
@@ -26,7 +26,7 @@
*
* Author: Hartmut Brandt <harti@freebsd.org>
*
- * $Begemot: libunimsg/atm/sig/unimkmsg.h,v 1.4 2003/09/19 12:03:34 hbb Exp $
+ * $Begemot: libunimsg/netnatm/sig/unimkmsg.h,v 1.4 2003/09/19 12:03:34 hbb Exp $
*
* Macros to make messages.
*/
diff --git a/sys/contrib/ngatm/netnatm/sig/unipriv.h b/sys/contrib/ngatm/netnatm/sig/unipriv.h
index 7b4a0d77eab2..35dc408b9fde 100644
--- a/sys/contrib/ngatm/netnatm/sig/unipriv.h
+++ b/sys/contrib/ngatm/netnatm/sig/unipriv.h
@@ -26,7 +26,7 @@
*
* Author: Hartmut Brandt <harti@freebsd.org>
*
- * $Begemot: libunimsg/atm/sig/unipriv.h,v 1.5 2003/09/24 10:27:50 hbb Exp $
+ * $Begemot: libunimsg/netnatm/sig/unipriv.h,v 1.17 2004/07/08 08:22:25 brandt Exp $
*
* Private UNI stuff.
*/
@@ -229,8 +229,8 @@ struct sig {
u_int type; /* one of the above */
struct call *call; /* call to send to */
struct party *party; /* party to send to */
- u_int32_t sig; /* the signal */
- u_int32_t cookie; /* user cookie */
+ uint32_t sig; /* the signal */
+ uint32_t cookie; /* user cookie */
struct uni_msg *msg; /* attached message */
struct uni_all *u; /* dito */
};
@@ -248,15 +248,15 @@ TAILQ_HEAD(sigqueue, sig);
} \
} while(0)
-void uni_sig_party(struct party *, enum party_sig, u_int32_t cookie,
+void uni_sig_party(struct party *, enum party_sig, uint32_t cookie,
struct uni_msg *, struct uni_all *);
-void uni_sig_call(struct call *, enum call_sig, u_int32_t cookie,
+void uni_sig_call(struct call *, enum call_sig, uint32_t cookie,
struct uni_msg *, struct uni_all *);
-void uni_sig_coord(struct uni *, enum coord_sig, u_int32_t cookie,
+void uni_sig_coord(struct uni *, enum coord_sig, uint32_t cookie,
struct uni_msg *);
-void uni_sig_start(struct uni *, enum start_sig, u_int32_t cookie,
+void uni_sig_start(struct uni *, enum start_sig, uint32_t cookie,
struct uni_msg *, struct uni_all *);
-void uni_sig_respond(struct uni *, enum respond_sig, u_int32_t cookie,
+void uni_sig_respond(struct uni *, enum respond_sig, uint32_t cookie,
struct uni_msg *, struct uni_all *);
/*************************************************************
@@ -283,7 +283,8 @@ void uni_destroy_party(struct party *, int);
struct party *uni_find_party(struct call *, struct uni_ie_epref *);
struct party *uni_find_partyx(struct call *, u_int epref, u_int mine);
struct party *uni_create_party(struct call *, struct uni_ie_epref *);
-struct party *uni_create_partyx(struct call *, u_int epref, u_int mine, u_int32_t cookie);
+struct party *uni_create_partyx(struct call *, u_int epref, u_int mine,
+ uint32_t cookie);
u_int uni_party_act_count(struct call *, int);
enum call_type {
@@ -336,8 +337,8 @@ TAILQ_HEAD(callqueue, call);
struct call *uni_find_call(struct uni *, struct uni_cref *);
struct call *uni_find_callx(struct uni *, u_int cref, u_int mine);
struct call *uni_create_call(struct uni *, u_int cref, u_int mine,
- u_int32_t cookie);
-struct call *uni_create_new_call(struct uni *, u_int32_t cookie);
+ uint32_t cookie);
+struct call *uni_create_new_call(struct uni *, uint32_t cookie);
void uni_destroy_call(struct call *, int);
void uni_bad_message(struct call *, struct uni_all *, u_int,
@@ -364,7 +365,7 @@ struct uni {
struct sigqueue delq; /* delayed signal queue */
int working;
- u_int32_t cref_alloc;
+ uint32_t cref_alloc;
enum cu_stat custat; /* coordinator state */
struct uni_timer t309;
@@ -403,10 +404,10 @@ struct uni {
u_int debug[UNI_MAXFACILITY];
};
-void uniapi_uni_error(struct uni *uni, u_int32_t reason, u_int32_t cookie,
- u_int32_t state);
-void uniapi_call_error(struct call *c, u_int32_t reason, u_int32_t cookie);
-void uniapi_party_error(struct party *p, u_int32_t reason, u_int32_t cookie);
+void uniapi_uni_error(struct uni *uni, uint32_t reason, uint32_t cookie,
+ uint32_t state);
+void uniapi_call_error(struct call *c, uint32_t reason, uint32_t cookie);
+void uniapi_party_error(struct party *p, uint32_t reason, uint32_t cookie);
/*************************************************************
*
@@ -513,18 +514,36 @@ void uni_respond_status_mtype(struct uni *uni, struct uni_cref *cref,
_tmp; \
})
-#define VERBOSE(UNI, FAC, LEVEL, FMT, ARGS...) do { \
+#if defined(__GNUC__) && __GNUC__ < 3
+
+#define VERBOSE(UNI, FAC, LEVEL, ARGS...) do { \
if ((UNI)->debug[(FAC)] >= (LEVEL)) { \
- (UNI)->funcs->verbose((UNI), (UNI)->arg, (FAC), \
- FMT , ## ARGS); \
+ (UNI)->funcs->verbose((UNI), (UNI)->arg, (FAC) ,\
+ ## ARGS); \
} \
} while(0)
-#define VERBOSE0(UNI, FAC, FMT, ARGS...) do { \
- (UNI)->funcs->verbose((UNI), (UNI)->arg, (FAC), FMT , \
+#define VERBOSE0(UNI, FAC, ARGS...) do { \
+ (UNI)->funcs->verbose((UNI), (UNI)->arg, (FAC) , \
## ARGS); \
} while(0)
+#else
+
+#define VERBOSE(UNI, FAC, LEVEL, ...) do { \
+ if ((UNI)->debug[(FAC)] >= (LEVEL)) { \
+ (UNI)->funcs->verbose((UNI), (UNI)->arg, (FAC), \
+ __VA_ARGS__); \
+ } \
+ } while(0)
+
+#define VERBOSE0(UNI, FAC, ...) do { \
+ (UNI)->funcs->verbose((UNI), (UNI)->arg, (FAC), \
+ __VA_ARGS__); \
+ } while(0)
+
+#endif
+
#define TIMER_INIT_UNI(U,T) _TIMER_INIT(U,T)
#define TIMER_INIT_CALL(C,T) _TIMER_INIT(C,T)
#define TIMER_INIT_PARTY(P,T) _TIMER_INIT(P,T)
diff --git a/sys/contrib/ngatm/netnatm/sig/unisig.h b/sys/contrib/ngatm/netnatm/sig/unisig.h
index 2f845f998a1d..22ff671d2922 100644
--- a/sys/contrib/ngatm/netnatm/sig/unisig.h
+++ b/sys/contrib/ngatm/netnatm/sig/unisig.h
@@ -26,7 +26,7 @@
*
* Author: Hartmut Brandt <harti@freebsd.org>
*
- * $Begemot: libunimsg/atm/sig/unisig.h,v 1.3 2003/09/19 12:03:34 hbb Exp $
+ * $Begemot: libunimsg/netnatm/sig/unisig.h,v 1.4 2004/07/08 08:22:26 brandt Exp $
*
* Utility functions for signalling stuff
*/