sig_print.c revision 302408
1963Sjoehw/* 2963Sjoehw * Copyright (c) 2002-2003 3963Sjoehw * Fraunhofer Institute for Open Communication Systems (FhG Fokus). 4963Sjoehw * All rights reserved. 5963Sjoehw * 6963Sjoehw * Redistribution and use in source and binary forms, with or without 7963Sjoehw * modification, are permitted provided that the following conditions 8963Sjoehw * are met: 9963Sjoehw * 1. Redistributions of source code must retain the above copyright 10963Sjoehw * notice, this list of conditions and the following disclaimer. 11963Sjoehw * 2. Redistributions in binary form must reproduce the above copyright 12963Sjoehw * notice, this list of conditions and the following disclaimer in the 13963Sjoehw * documentation and/or other materials provided with the distribution. 14963Sjoehw * 15963Sjoehw * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16963Sjoehw * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17963Sjoehw * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18963Sjoehw * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19963Sjoehw * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20963Sjoehw * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21963Sjoehw * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22963Sjoehw * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23963Sjoehw * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24963Sjoehw * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25963Sjoehw * SUCH DAMAGE. 26968Sfyuan * 27968Sfyuan * Author: Hartmut Brandt <harti@freebsd.org> 28968Sfyuan * Kendy Kutzner <kutzner@fokus.fraunhofer.de> 29963Sjoehw * 30963Sjoehw * $Begemot: libunimsg/netnatm/sig/sig_print.c,v 1.6 2004/08/05 07:11:02 brandt Exp $ 31968Sfyuan */ 32963Sjoehw 331002Sjoehw#include <sys/types.h> 34963Sjoehw#ifdef _KERNEL 35963Sjoehw#include <sys/param.h> 36963Sjoehw#include <sys/systm.h> 37963Sjoehw#include <sys/libkern.h> 38963Sjoehw#include <machine/stdarg.h> 39963Sjoehw#else 40968Sfyuan#include <stdio.h> 41963Sjoehw#include <stdlib.h> 42963Sjoehw#include <string.h> 43963Sjoehw#include <stdarg.h> 44968Sfyuan#endif 45963Sjoehw 46963Sjoehw#include <netnatm/saal/sscfu.h> 47963Sjoehw#include <netnatm/msg/uni_hdr.h> 48963Sjoehw#include <netnatm/msg/unistruct.h> 49963Sjoehw#include <netnatm/msg/unimsglib.h> 50968Sfyuan#include <netnatm/msg/uniprint.h> 511002Sjoehw#include <netnatm/sig/uni.h> 52968Sfyuan#include <netnatm/sig/unisig.h> 53968Sfyuan#include <netnatm/sig/unidef.h> 54968Sfyuan 55963Sjoehwconst char * 56963Sjoehwuni_strerr(u_int err) 57963Sjoehw{ 58963Sjoehw static const char *const errstr[] = { 59963Sjoehw#define DEF(NAME, VAL, STR) [UNIAPI_##NAME] = STR, 60963SjoehwUNIAPI_DEF_ERRORS(DEF) 61963Sjoehw#undef DEF 62963Sjoehw }; 63963Sjoehw static char buf[100]; 64963Sjoehw 65968Sfyuan if (err >= sizeof(errstr)/sizeof(errstr[0]) || errstr[err] == NULL) { 66963Sjoehw sprintf(buf, "Unknown error %u", err); 67963Sjoehw return (buf); 68963Sjoehw } 69963Sjoehw return (errstr[err]); 70963Sjoehw} 71963Sjoehw 72963Sjoehw#define D(M) [M] = #M 73968Sfyuanstatic const char *const msgs[] = { 74963Sjoehw D(UNIAPI_ERROR), 75963Sjoehw D(UNIAPI_CALL_CREATED), 76963Sjoehw D(UNIAPI_CALL_DESTROYED), 77963Sjoehw D(UNIAPI_PARTY_CREATED), 78968Sfyuan D(UNIAPI_PARTY_DESTROYED), 79963Sjoehw D(UNIAPI_LINK_ESTABLISH_request), 80963Sjoehw D(UNIAPI_LINK_ESTABLISH_confirm), 81963Sjoehw D(UNIAPI_LINK_RELEASE_request), 82963Sjoehw D(UNIAPI_LINK_RELEASE_confirm), 83963Sjoehw D(UNIAPI_RESET_request), 84963Sjoehw D(UNIAPI_RESET_confirm), 85963Sjoehw D(UNIAPI_RESET_indication), 86963Sjoehw D(UNIAPI_RESET_ERROR_indication), 87963Sjoehw D(UNIAPI_RESET_response), 88963Sjoehw D(UNIAPI_RESET_ERROR_response), 89963Sjoehw D(UNIAPI_RESET_STATUS_indication), 90963Sjoehw D(UNIAPI_SETUP_request), 91963Sjoehw D(UNIAPI_SETUP_indication), 92963Sjoehw D(UNIAPI_SETUP_response), 93963Sjoehw D(UNIAPI_SETUP_confirm), 94963Sjoehw D(UNIAPI_SETUP_COMPLETE_indication), 95963Sjoehw D(UNIAPI_SETUP_COMPLETE_request), 96963Sjoehw D(UNIAPI_ALERTING_request), 97963Sjoehw D(UNIAPI_ALERTING_indication), 98963Sjoehw D(UNIAPI_PROCEEDING_request), 99963Sjoehw D(UNIAPI_PROCEEDING_indication), 100963Sjoehw D(UNIAPI_RELEASE_request), 101963Sjoehw D(UNIAPI_RELEASE_indication), 102963Sjoehw D(UNIAPI_RELEASE_response), 103963Sjoehw D(UNIAPI_RELEASE_confirm), 104963Sjoehw D(UNIAPI_NOTIFY_request), 105963Sjoehw D(UNIAPI_NOTIFY_indication), 106963Sjoehw D(UNIAPI_STATUS_indication), 107963Sjoehw D(UNIAPI_STATUS_ENQUIRY_request), 108963Sjoehw D(UNIAPI_ADD_PARTY_request), 109963Sjoehw D(UNIAPI_ADD_PARTY_indication), 110963Sjoehw D(UNIAPI_PARTY_ALERTING_request), 111963Sjoehw D(UNIAPI_PARTY_ALERTING_indication), 112963Sjoehw D(UNIAPI_ADD_PARTY_ACK_request), 113963Sjoehw D(UNIAPI_ADD_PARTY_ACK_indication), 1141002Sjoehw D(UNIAPI_ADD_PARTY_REJ_request), 1151002Sjoehw D(UNIAPI_ADD_PARTY_REJ_indication), 1161002Sjoehw D(UNIAPI_DROP_PARTY_request), 1171002Sjoehw D(UNIAPI_DROP_PARTY_indication), 1181002Sjoehw D(UNIAPI_DROP_PARTY_ACK_request), 1191002Sjoehw D(UNIAPI_DROP_PARTY_ACK_indication), 1201002Sjoehw D(UNIAPI_ABORT_CALL_request), 1211002Sjoehw}; 1221002Sjoehw#undef D 123963Sjoehw 124963Sjoehwvoid 125963Sjoehwuni_print_api(char *buf, size_t bufsiz, u_int type, u_int cookie, 126963Sjoehw const void *msg, struct unicx *cx) 127963Sjoehw{ 128963Sjoehw int old_dont_init = cx->dont_init; 129963Sjoehw 130963Sjoehw uni_print_init(buf, bufsiz, cx); 131963Sjoehw cx->dont_init = 1; 132963Sjoehw 133963Sjoehw if (type >= sizeof(msgs) / sizeof(msgs[0]) || msgs[type] == NULL) { 134963Sjoehw uni_print_flag("UNIAPI_UNKNOWN", cx); 135963Sjoehw uni_print_entry(cx, "sig", "%u", type); 136963Sjoehw uni_print_entry(cx, "cookie", "%u", cookie); 137963Sjoehw goto out; 138963Sjoehw } 139963Sjoehw 140963Sjoehw uni_print_flag(msgs[type], cx); 141963Sjoehw uni_print_entry(cx, "cookie", "%u", cookie); 142963Sjoehw cx->indent++; 143963Sjoehw 144963Sjoehw switch (type) { 145963Sjoehw 146963Sjoehw case UNIAPI_ERROR: 147963Sjoehw { 148963Sjoehw const struct uniapi_error *api = msg; 149963Sjoehw 150963Sjoehw uni_print_eol(cx); 151963Sjoehw uni_print_entry(cx, "reason", "%s", uni_strerr(api->reason)); 152963Sjoehw uni_print_entry(cx, "state", "U%u", api->state); 153963Sjoehw break; 154963Sjoehw } 155963Sjoehw 156963Sjoehw case UNIAPI_CALL_CREATED: 157963Sjoehw { 158963Sjoehw const struct uniapi_call_created *api = msg; 159963Sjoehw 160963Sjoehw uni_print_cref(NULL, 0, &api->cref, cx); 161963Sjoehw break; 162963Sjoehw } 163963Sjoehw 164963Sjoehw case UNIAPI_CALL_DESTROYED: 165963Sjoehw { 166963Sjoehw const struct uniapi_call_destroyed *api = msg; 167963Sjoehw 168963Sjoehw uni_print_cref(NULL, 0, &api->cref, cx); 169963Sjoehw break; 170963Sjoehw } 171963Sjoehw 172963Sjoehw case UNIAPI_PARTY_CREATED: 173968Sfyuan { 174963Sjoehw const struct uniapi_party_created *api = msg; 175963Sjoehw 176963Sjoehw uni_print_cref(NULL, 0, &api->cref, cx); 177963Sjoehw uni_print_eol(cx); 178963Sjoehw uni_print_ie(NULL, 0, UNI_IE_EPREF, 179963Sjoehw (const union uni_ieall *)&api->epref, cx); 180963Sjoehw break; 181963Sjoehw } 182963Sjoehw 183963Sjoehw case UNIAPI_PARTY_DESTROYED: 184963Sjoehw { 185968Sfyuan const struct uniapi_party_destroyed *api = msg; 186963Sjoehw 187963Sjoehw uni_print_cref(NULL, 0, &api->cref, cx); 188963Sjoehw uni_print_eol(cx); 189963Sjoehw uni_print_ie(NULL, 0, UNI_IE_EPREF, 190963Sjoehw (const union uni_ieall *)&api->epref, cx); 191963Sjoehw break; 192963Sjoehw } 193963Sjoehw 194963Sjoehw case UNIAPI_LINK_ESTABLISH_request: 195963Sjoehw case UNIAPI_LINK_ESTABLISH_confirm: 196968Sfyuan case UNIAPI_LINK_RELEASE_request: 197963Sjoehw case UNIAPI_LINK_RELEASE_confirm: 198963Sjoehw break; 199963Sjoehw 200963Sjoehw case UNIAPI_RESET_request: 201963Sjoehw { 202963Sjoehw const struct uniapi_reset_request *api = msg; 2031002Sjoehw 2041002Sjoehw uni_print_eol(cx); 2051002Sjoehw uni_print_ie(NULL, 0, UNI_IE_RESTART, 2061002Sjoehw (const union uni_ieall *)&api->restart, cx); 2071002Sjoehw uni_print_eol(cx); 2081002Sjoehw uni_print_ie(NULL, 0, UNI_IE_CONNID, 2091002Sjoehw (const union uni_ieall *)&api->restart, cx); 2101002Sjoehw break; 2111002Sjoehw } 2121002Sjoehw 2131002Sjoehw case UNIAPI_RESET_confirm: 2141002Sjoehw { 215963Sjoehw const struct uniapi_reset_confirm *api = msg; 216963Sjoehw 217963Sjoehw uni_print_eol(cx); 218963Sjoehw uni_print_ie(NULL, 0, UNI_IE_RESTART, 219968Sfyuan (const union uni_ieall *)&api->restart, cx); 220963Sjoehw uni_print_eol(cx); 221963Sjoehw uni_print_ie(NULL, 0, UNI_IE_CONNID, 222963Sjoehw (const union uni_ieall *)&api->restart, cx); 223963Sjoehw break; 224963Sjoehw } 225963Sjoehw 226963Sjoehw case UNIAPI_RESET_indication: 227963Sjoehw { 228963Sjoehw const struct uniapi_reset_indication *api = msg; 229963Sjoehw 230963Sjoehw uni_print_eol(cx); 231963Sjoehw uni_print_ie(NULL, 0, UNI_IE_RESTART, 232963Sjoehw (const union uni_ieall *)&api->restart, cx); 233963Sjoehw uni_print_eol(cx); 234963Sjoehw uni_print_ie(NULL, 0, UNI_IE_CONNID, 235963Sjoehw (const union uni_ieall *)&api->restart, cx); 236963Sjoehw break; 237968Sfyuan } 238963Sjoehw 239963Sjoehw case UNIAPI_RESET_ERROR_indication: 240963Sjoehw { 241963Sjoehw const struct uniapi_reset_error_indication *api = msg; 242963Sjoehw static const struct uni_print_tbl reason[] = { 2431002Sjoehw#define DEF(NAME, VALUE, STR) { STR, VALUE }, 2441002Sjoehw UNIAPI_DEF_RESET_ERRORS(DEF) 245963Sjoehw#undef DEF 246963Sjoehw { NULL, 0 } 247963Sjoehw }; 248963Sjoehw static const struct uni_print_tbl source[] = { 249963Sjoehw { "start", 0 }, 250963Sjoehw { "respond", 1 }, 251963Sjoehw { NULL, 0 } 2521002Sjoehw }; 253963Sjoehw 254963Sjoehw uni_print_eol(cx); 255963Sjoehw uni_print_tbl("source", api->source, source, cx); 256963Sjoehw uni_print_tbl("reason", api->reason, reason, cx); 257963Sjoehw break; 258963Sjoehw } 259963Sjoehw 260963Sjoehw case UNIAPI_RESET_response: 261963Sjoehw { 262963Sjoehw const struct uniapi_reset_response *api = msg; 263963Sjoehw 264963Sjoehw uni_print_eol(cx); 265963Sjoehw uni_print_ie(NULL, 0, UNI_IE_RESTART, 266963Sjoehw (const union uni_ieall *)&api->restart, cx); 267963Sjoehw uni_print_eol(cx); 268963Sjoehw uni_print_ie(NULL, 0, UNI_IE_CONNID, 269963Sjoehw (const union uni_ieall *)&api->restart, cx); 270963Sjoehw break; 271963Sjoehw } 272963Sjoehw 273963Sjoehw case UNIAPI_RESET_ERROR_response: 274963Sjoehw { 275963Sjoehw const struct uniapi_reset_error_response *api = msg; 276963Sjoehw 277968Sfyuan uni_print_eol(cx); 278963Sjoehw uni_print_ie(NULL, 0, UNI_IE_CAUSE, 279963Sjoehw (const union uni_ieall *)&api->cause, cx); 280963Sjoehw break; 281963Sjoehw } 282963Sjoehw 283963Sjoehw case UNIAPI_RESET_STATUS_indication: 284963Sjoehw { 285963Sjoehw const struct uniapi_reset_status_indication *api = msg; 286963Sjoehw 287963Sjoehw uni_print_cref(NULL, 0, &api->cref, cx); 288963Sjoehw uni_print_eol(cx); 289963Sjoehw uni_print_ie(NULL, 0, UNI_IE_CALLSTATE, 290963Sjoehw (const union uni_ieall *)&api->callstate, cx); 291963Sjoehw uni_print_eol(cx); 292 uni_print_ie(NULL, 0, UNI_IE_CAUSE, 293 (const union uni_ieall *)&api->cause, cx); 294 break; 295 } 296 297 case UNIAPI_SETUP_request: 298 { 299 const struct uniapi_setup_request *api = msg; 300 301 uni_print_eol(cx); 302 uni_print_msg(NULL, 0, UNI_SETUP, 303 (const union uni_msgall *)&api->setup, cx); 304 break; 305 } 306 307 case UNIAPI_SETUP_indication: 308 { 309 const struct uniapi_setup_indication *api = msg; 310 311 uni_print_eol(cx); 312 uni_print_msg(NULL, 0, UNI_SETUP, 313 (const union uni_msgall *)&api->setup, cx); 314 break; 315 } 316 317 case UNIAPI_SETUP_response: 318 { 319 const struct uniapi_setup_response *api = msg; 320 321 uni_print_eol(cx); 322 uni_print_msg(NULL, 0, UNI_CONNECT, 323 (const union uni_msgall *)&api->connect, cx); 324 break; 325 } 326 327 case UNIAPI_SETUP_confirm: 328 { 329 const struct uniapi_setup_confirm *api = msg; 330 331 uni_print_eol(cx); 332 uni_print_msg(NULL, 0, UNI_CONNECT, 333 (const union uni_msgall *)&api->connect, cx); 334 break; 335 } 336 337 case UNIAPI_SETUP_COMPLETE_indication: 338 { 339 const struct uniapi_setup_complete_indication *api = msg; 340 341 uni_print_eol(cx); 342 uni_print_msg(NULL, 0, UNI_CONNECT_ACK, 343 (const union uni_msgall *)&api->connect_ack, cx); 344 break; 345 } 346 347 case UNIAPI_SETUP_COMPLETE_request: 348 { 349 const struct uniapi_setup_complete_request *api = msg; 350 351 uni_print_eol(cx); 352 uni_print_msg(NULL, 0, UNI_CONNECT_ACK, 353 (const union uni_msgall *)&api->connect_ack, cx); 354 break; 355 } 356 357 case UNIAPI_ALERTING_request: 358 { 359 const struct uniapi_alerting_request *api = msg; 360 361 uni_print_eol(cx); 362 uni_print_msg(NULL, 0, UNI_ALERTING, 363 (const union uni_msgall *)&api->alerting, cx); 364 break; 365 } 366 367 case UNIAPI_ALERTING_indication: 368 { 369 const struct uniapi_alerting_indication *api = msg; 370 371 uni_print_eol(cx); 372 uni_print_msg(NULL, 0, UNI_ALERTING, 373 (const union uni_msgall *)&api->alerting, cx); 374 break; 375 } 376 377 case UNIAPI_PROCEEDING_request: 378 { 379 const struct uniapi_proceeding_request *api = msg; 380 381 uni_print_eol(cx); 382 uni_print_msg(NULL, 0, UNI_CALL_PROC, 383 (const union uni_msgall *)&api->call_proc, cx); 384 break; 385 } 386 387 case UNIAPI_PROCEEDING_indication: 388 { 389 const struct uniapi_proceeding_indication *api = msg; 390 391 uni_print_eol(cx); 392 uni_print_msg(NULL, 0, UNI_CALL_PROC, 393 (const union uni_msgall *)&api->call_proc, cx); 394 break; 395 } 396 397 case UNIAPI_RELEASE_request: 398 { 399 const struct uniapi_release_request *api = msg; 400 401 uni_print_eol(cx); 402 uni_print_msg(NULL, 0, UNI_RELEASE, 403 (const union uni_msgall *)&api->release, cx); 404 break; 405 } 406 407 case UNIAPI_RELEASE_indication: 408 { 409 const struct uniapi_release_indication *api = msg; 410 411 uni_print_eol(cx); 412 uni_print_msg(NULL, 0, UNI_RELEASE, 413 (const union uni_msgall *)&api->release, cx); 414 break; 415 } 416 417 case UNIAPI_RELEASE_response: 418 { 419 const struct uniapi_release_response *api = msg; 420 421 uni_print_eol(cx); 422 uni_print_msg(NULL, 0, UNI_RELEASE_COMPL, 423 (const union uni_msgall *)&api->release_compl, cx); 424 break; 425 } 426 case UNIAPI_RELEASE_confirm: 427 { 428 const struct uniapi_release_confirm *api = msg; 429 430 uni_print_eol(cx); 431 uni_print_msg(NULL, 0, UNI_RELEASE, 432 (const union uni_msgall *)&api->release, cx); 433 break; 434 } 435 436 case UNIAPI_NOTIFY_request: 437 { 438 const struct uniapi_notify_request *api = msg; 439 440 uni_print_eol(cx); 441 uni_print_msg(NULL, 0, UNI_NOTIFY, 442 (const union uni_msgall *)&api->notify, cx); 443 break; 444 } 445 446 case UNIAPI_NOTIFY_indication: 447 { 448 const struct uniapi_notify_indication *api = msg; 449 450 uni_print_eol(cx); 451 uni_print_msg(NULL, 0, UNI_NOTIFY, 452 (const union uni_msgall *)&api->notify, cx); 453 break; 454 } 455 456 case UNIAPI_STATUS_indication: 457 { 458 const struct uniapi_status_indication *api = msg; 459 460 uni_print_cref(NULL, 0, &api->cref, cx); 461 uni_print_eol(cx); 462 uni_print_entry(cx, "my_state", "U%u", api->my_state); 463 uni_print_entry(cx, "my_cause", "%s", 464 uni_ie_cause2str(UNI_CODING_ITU, api->my_cause)); 465 uni_print_eol(cx); 466 uni_print_ie(NULL, 0, UNI_IE_CALLSTATE, 467 (const union uni_ieall *)&api->his_state, cx); 468 uni_print_eol(cx); 469 uni_print_ie(NULL, 0, UNI_IE_CAUSE, 470 (const union uni_ieall *)&api->his_cause, cx); 471 uni_print_eol(cx); 472 uni_print_ie(NULL, 0, UNI_IE_EPREF, 473 (const union uni_ieall *)&api->epref, cx); 474 break; 475 } 476 477 case UNIAPI_STATUS_ENQUIRY_request: 478 { 479 const struct uniapi_status_enquiry_request *api = msg; 480 481 uni_print_cref(NULL, 0, &api->cref, cx); 482 uni_print_eol(cx); 483 uni_print_ie(NULL, 0, UNI_IE_EPREF, 484 (const union uni_ieall *)&api->epref, cx); 485 break; 486 } 487 488 case UNIAPI_ADD_PARTY_request: 489 { 490 const struct uniapi_add_party_request *api = msg; 491 492 uni_print_eol(cx); 493 uni_print_msg(NULL, 0, UNI_ADD_PARTY, 494 (const union uni_msgall *)&api->add, cx); 495 break; 496 } 497 498 case UNIAPI_ADD_PARTY_indication: 499 { 500 const struct uniapi_add_party_indication *api = msg; 501 502 uni_print_eol(cx); 503 uni_print_msg(NULL, 0, UNI_ADD_PARTY, 504 (const union uni_msgall *)&api->add, cx); 505 break; 506 } 507 508 case UNIAPI_PARTY_ALERTING_request: 509 { 510 const struct uniapi_party_alerting_request *api = msg; 511 512 uni_print_eol(cx); 513 uni_print_msg(NULL, 0, UNI_PARTY_ALERTING, 514 (const union uni_msgall *)&api->alert, cx); 515 break; 516 } 517 518 case UNIAPI_PARTY_ALERTING_indication: 519 { 520 const struct uniapi_party_alerting_indication *api = msg; 521 522 uni_print_eol(cx); 523 uni_print_msg(NULL, 0, UNI_PARTY_ALERTING, 524 (const union uni_msgall *)&api->alert, cx); 525 break; 526 } 527 528 case UNIAPI_ADD_PARTY_ACK_request: 529 { 530 const struct uniapi_add_party_ack_request *api = msg; 531 532 uni_print_eol(cx); 533 uni_print_msg(NULL, 0, UNI_ADD_PARTY_ACK, 534 (const union uni_msgall *)&api->ack, cx); 535 break; 536 } 537 538 case UNIAPI_ADD_PARTY_ACK_indication: 539 { 540 const struct uniapi_add_party_ack_indication *api = msg; 541 542 uni_print_eol(cx); 543 uni_print_msg(NULL, 0, UNI_ADD_PARTY_ACK, 544 (const union uni_msgall *)&api->ack, cx); 545 break; 546 } 547 548 case UNIAPI_ADD_PARTY_REJ_request: 549 { 550 const struct uniapi_add_party_rej_request *api = msg; 551 552 uni_print_eol(cx); 553 uni_print_msg(NULL, 0, UNI_ADD_PARTY_REJ, 554 (const union uni_msgall *)&api->rej, cx); 555 break; 556 } 557 558 case UNIAPI_ADD_PARTY_REJ_indication: 559 { 560 const struct uniapi_add_party_rej_indication *api = msg; 561 562 uni_print_eol(cx); 563 uni_print_msg(NULL, 0, UNI_ADD_PARTY_REJ, 564 (const union uni_msgall *)&api->rej, cx); 565 break; 566 } 567 568 case UNIAPI_DROP_PARTY_request: 569 { 570 const struct uniapi_drop_party_request *api = msg; 571 572 uni_print_eol(cx); 573 uni_print_msg(NULL, 0, UNI_DROP_PARTY, 574 (const union uni_msgall *)&api->drop, cx); 575 break; 576 } 577 578 case UNIAPI_DROP_PARTY_indication: 579 { 580 const struct uniapi_drop_party_indication *api = msg; 581 582 uni_print_eol(cx); 583 uni_print_msg(NULL, 0, UNI_DROP_PARTY, 584 (const union uni_msgall *)&api->drop, cx); 585 break; 586 } 587 588 case UNIAPI_DROP_PARTY_ACK_request: 589 { 590 const struct uniapi_drop_party_ack_request *api = msg; 591 592 uni_print_eol(cx); 593 uni_print_msg(NULL, 0, UNI_DROP_PARTY_ACK, 594 (const union uni_msgall *)&api->ack, cx); 595 break; 596 } 597 598 case UNIAPI_DROP_PARTY_ACK_indication: 599 { 600 const struct uniapi_drop_party_ack_indication *api = msg; 601 602 uni_print_eol(cx); 603 uni_print_msg(NULL, 0, UNI_DROP_PARTY, 604 (const union uni_msgall *)&api->drop, cx); 605 uni_print_eol(cx); 606 uni_print_ie(NULL, 0, UNI_IE_CRANKBACK, 607 (const union uni_ieall *)&api->crankback, cx); 608 break; 609 } 610 611 case UNIAPI_ABORT_CALL_request: 612 { 613 const struct uniapi_abort_call_request *api = msg; 614 615 uni_print_cref(NULL, 0, &api->cref, cx); 616 break; 617 } 618 } 619 620 out: 621 cx->dont_init = old_dont_init; 622} 623