Lines Matching refs:uni

44 #include <netnatm/sig/uni.h>
97 (c->uni->proto == UNIPROTO_UNI40U &&
99 (c->uni->proto == UNIPROTO_UNI40N &&
101 ("setting wrong callstate for proto %u: %u", c->uni->proto, state));
104 VERBOSE(c->uni, UNI_FAC_CALL, 1, "call %d/%d %s -> %s",
123 uni_find_call(struct uni *uni, struct uni_cref *cref)
127 TAILQ_FOREACH(c, &uni->calls, link)
133 uni_find_callx(struct uni *uni, u_int cref, u_int mine)
137 TAILQ_FOREACH(c, &uni->calls, link)
147 uni_create_call(struct uni *uni, u_int cref, u_int mine, uint32_t cookie)
163 c->uni = uni;
177 TAILQ_INSERT_HEAD(&uni->calls, c, link);
179 uni->funcs->uni_output(uni, uni->arg, UNIAPI_CALL_CREATED, cookie, api);
181 VERBOSE(c->uni, UNI_FAC_CALL, 1, "created call %u/%s",
188 uni_create_new_call(struct uni *uni, uint32_t cookie)
191 uint32_t old = uni->cref_alloc++;
194 if (uni->cref_alloc == (1 << 23))
195 uni->cref_alloc = 1;
196 if (uni->cref_alloc == old)
198 TAILQ_FOREACH(c, &uni->calls, link)
199 if (c->mine && c->cref == uni->cref_alloc) {
200 uni->cref_alloc++;
203 return (uni_create_call(uni, uni->cref_alloc, 1, cookie));
219 VERBOSE(c->uni, UNI_FAC_CALL, 1, "destroying call %u/%s",
228 TAILQ_REMOVE(&c->uni->calls, c, link);
230 uni_delsig(c->uni, SIG_CALL, c, NULL);
243 uni_enq_coord(c->uni, SIGO_CALL_DESTROYED, 0, api);
301 * the calling function in uni->cause.
318 ind->release.cause[0] = c->uni->cause;
320 c->uni->funcs->uni_output(c->uni, c->uni->arg,
333 c->msg_release.cause[0] = c->uni->cause;
338 (void)uni_send_output(rel, c->uni);
342 TIMER_START_CALL(c, t308, c->uni->timer308);
345 if (c->uni->proto == UNIPROTO_UNI40N)
380 (void)uni_decode_body(m, u, &c->uni->cx);
381 MANDATE_IE(c->uni, u->u.setup.bearer, UNI_IE_BEARER);
382 MANDATE_IE(c->uni, u->u.setup.traffic, UNI_IE_TRAFFIC);
383 MANDATE_IE(c->uni, u->u.setup.called, UNI_IE_CALLED);
389 MANDATE_IE(c->uni, u->u.setup.exqos, UNI_IE_EXQOS);
391 MANDATE_IE(c->uni, u->u.setup.qos, UNI_IE_QOS);
401 (void)UNI_SAVE_IERR(&c->uni->cx, UNI_IE_EPREF,
404 uni_mandate_epref(c->uni, &u->u.setup.epref);
407 v = uni_verify(c->uni, u->u.hdr.act);
411 uni_respond_status_verify(c->uni, &u->u.hdr.cref,
422 uni_vfy_collect_ies(c->uni);
423 resp->u.release_compl.cause[0] = c->uni->cause;
424 uni_send_output(resp, c->uni);
432 uni_respond_status_verify(c->uni, &u->u.hdr.cref,
453 c->uni->funcs->uni_output(c->uni, c->uni->arg,
507 if (c->uni->proto == UNIPROTO_UNI40N)
529 (void)uni_send_output(out, c->uni);
532 TIMER_START_CALL(c, t303, c->uni->timer303);
564 (void)uni_decode_body(m, u, &c->uni->cx);
566 uni_mandate_ie(c->uni, UNI_IE_CONNID);
575 uni_mandate_ie(c->uni, UNI_IE_EPREF); \
581 (void)UNI_SAVE_IERR(&c->uni->cx, UNI_IE_EPREF,
586 switch (uni_verify(c->uni, u->u.hdr.act)) {
589 uni_vfy_collect_ies(c->uni);
599 uni_respond_status_verify(c->uni, &u->u.hdr.cref,
608 uni_respond_status_verify(c->uni, &u->u.hdr.cref,
622 c->uni->funcs->uni_output(c->uni, c->uni->arg,
625 TIMER_START_CALL(c, t310, c->uni->timer310);
646 VERBOSE(c->uni, UNI_FAC_TIMEOUT, 1, "call %u/%s T303 tick %d",
649 if (++c->cnt303 < c->uni->init303) {
653 (void)uni_send_output(msg, c->uni);
656 TIMER_START_CALL(c, t303, c->uni->timer303);
670 c->uni->funcs->uni_output(c->uni, c->uni->arg,
693 VERBOSE(c->uni, UNI_FAC_TIMEOUT, 1, "call %u/%s T310 tick",
696 MK_IE_CAUSE(c->uni->cause, UNI_CAUSE_LOC_USER, UNI_CAUSE_NO_RESPONSE);
709 VERBOSE(c->uni, UNI_FAC_TIMEOUT, 1, "call %u/%s T301 tick",
712 MK_IE_CAUSE(c->uni->cause, UNI_CAUSE_LOC_USER, UNI_CAUSE_NO_RESP_ALERT);
749 (void)uni_decode_body(m, u, &c->uni->cx);
751 uni_mandate_ie(c->uni, UNI_IE_CONNID);
760 uni_mandate_ie(c->uni, UNI_IE_EPREF); \
766 (void)UNI_SAVE_IERR(&c->uni->cx, UNI_IE_EPREF,
771 switch (uni_verify(c->uni, u->u.hdr.act)) {
774 uni_vfy_collect_ies(c->uni);
783 uni_respond_status_verify(c->uni, &u->u.hdr.cref,
792 uni_respond_status_verify(c->uni, &u->u.hdr.cref,
812 c->uni->funcs->uni_output(c->uni, c->uni->arg,
815 c->uni->funcs->uni_output(c->uni, c->uni->arg,
817 TIMER_START_CALL(c, t301, c->uni->timer301);
850 (void)uni_send_output(msg, c->uni);
896 (void)uni_send_output(msg, c->uni);
958 if (c->uni->proto == UNIPROTO_UNI40N && c->type == CALL_LEAF)
964 (void)uni_send_output(msg, c->uni);
967 if (c->uni->proto == UNIPROTO_UNI40U)
968 TIMER_START_CALL(c, t313, c->uni->timer313);
998 if (c->uni->proto == UNIPROTO_UNI40N &&
1007 (void)uni_send_output(msg, c->uni);
1052 (void)uni_decode_body(m, u, &c->uni->cx);
1054 uni_mandate_ie(c->uni, UNI_IE_CONNID);
1063 uni_mandate_ie(c->uni, UNI_IE_EPREF); \
1068 (void)UNI_SAVE_IERR(&c->uni->cx, UNI_IE_EPREF,
1085 switch (uni_verify(c->uni, u->u.hdr.act)) {
1088 uni_vfy_collect_ies(c->uni);
1099 uni_respond_status_verify(c->uni, &u->u.hdr.cref,
1109 uni_respond_status_verify(c->uni, &u->u.hdr.cref,
1132 if (c->uni->proto == UNIPROTO_UNI40U &&
1138 c->uni->funcs->uni_output(c->uni, c->uni->arg,
1141 if (c->uni->proto == UNIPROTO_UNI40U) {
1144 (void)uni_send_output(ack, c->uni);
1162 VERBOSE(c->uni, UNI_FAC_TIMEOUT, 1, "call %u/%s T313 tick",
1165 MK_IE_CAUSE(c->uni->cause, UNI_CAUSE_LOC_USER, UNI_CAUSE_RECOVER);
1166 ADD_CAUSE_TIMER(c->uni->cause, "313");
1193 (void)uni_decode_body(m, u, &c->uni->cx);
1195 switch (uni_verify(c->uni, u->u.hdr.act)) {
1198 uni_vfy_collect_ies(c->uni);
1207 uni_respond_status_verify(c->uni, &u->u.hdr.cref,
1214 uni_respond_status_verify(c->uni, &u->u.hdr.cref,
1237 c->uni->funcs->uni_output(c->uni, c->uni->arg,
1257 (void)uni_decode_body(m, u, &c->uni->cx);
1259 switch (uni_verify(c->uni, u->u.hdr.act)) {
1262 uni_vfy_collect_ies(c->uni);
1274 uni_respond_status_verify(c->uni, &u->u.hdr.cref,
1315 (void)uni_send_output(msg, c->uni);
1363 c->uni->funcs->uni_output(c->uni, c->uni->arg,
1372 (void)uni_decode_body(m, u, &c->uni->cx);
1373 (void)uni_verify(c->uni, u->u.hdr.act); /* no point :-) */
1400 (void)uni_decode_body(m, u, &c->uni->cx);
1401 (void)uni_verify(c->uni, u->u.hdr.act); /* no point :-) */
1423 c->uni->funcs->uni_output(c->uni, c->uni->arg,
1452 (void)uni_decode_body(m, u, &c->uni->cx);
1453 (void)uni_verify(c->uni, u->u.hdr.act); /* no point :-) */
1460 c->uni->funcs->uni_output(c->uni, c->uni->arg,
1492 (void)uni_decode_body(m, u, &c->uni->cx);
1493 MANDATE_IE(c->uni, u->u.notify.notify, UNI_IE_NOTIFY);
1504 switch (uni_verify(c->uni, u->u.hdr.act)) {
1508 uni_vfy_collect_ies(c->uni);
1514 uni_respond_status_verify(c->uni, &u->u.hdr.cref,
1524 uni_respond_status_verify(c->uni, &u->u.hdr.cref,
1534 c->uni->funcs->uni_output(c->uni, c->uni->arg,
1562 (void)uni_send_output(msg, c->uni);
1610 (void)uni_send_output(msg, c->uni);
1613 TIMER_START_CALL(c, t308, c->uni->timer308);
1638 (void)uni_send_output(msg, c->uni);
1655 VERBOSE(c->uni, UNI_FAC_TIMEOUT, 1, "call %u/%s T308 tick %d",
1658 if (++c->cnt308 < c->uni->init308) {
1667 (void)uni_send_output(msg, c->uni);
1670 TIMER_START_CALL(c, t308, c->uni->timer308);
1685 c->uni->funcs->uni_output(c->uni, c->uni->arg,
1713 (void)uni_decode_body(m, u, &c->uni->cx);
1714 MANDATE_IE(c->uni, u->u.status.callstate, UNI_IE_CALLSTATE);
1715 MANDATE_IE(c->uni, u->u.status.cause, UNI_IE_CAUSE);
1726 switch (uni_verify(c->uni, u->u.hdr.act)) {
1729 uni_vfy_collect_ies(c->uni);
1739 uni_respond_status_verify(c->uni, &u->u.hdr.cref,
1760 c->uni->funcs->uni_output(c->uni, c->uni->arg,
1784 c->uni->funcs->uni_output(c->uni, c->uni->arg,
1817 (void)uni_decode_body(m, u, &c->uni->cx);
1818 MANDATE_IE(c->uni, u->u.status.callstate, UNI_IE_CALLSTATE);
1819 MANDATE_IE(c->uni, u->u.status.cause, UNI_IE_CAUSE);
1828 MANDATE_IE(c->uni, u->u.status.epstate, UNI_IE_EPSTATE);
1831 switch (uni_verify(c->uni, u->u.hdr.act)) {
1834 uni_vfy_collect_ies(c->uni);
1844 uni_respond_status_verify(c->uni, &u->u.hdr.cref,
1875 c->uni->funcs->uni_output(c->uni, c->uni->arg,
1886 uni_undel(c->uni, status_enq_filter, c);
1917 c->uni->funcs->uni_output(c->uni, c->uni->arg,
1927 c->uni->funcs->uni_output(c->uni, c->uni->arg,
1931 MK_IE_CAUSE(c->uni->cause, UNI_CAUSE_LOC_USER, UNI_CAUSE_MSG_INCOMP);
1979 (void)uni_send_output(stat, c->uni);
1982 TIMER_START_CALL(c, t322, c->uni->timer322);
2000 VERBOSE(c->uni, UNI_FAC_TIMEOUT, 1, "call %u/%s T322 tick %d",
2003 if (++c->cnt322 < c->uni->init322) {
2007 (void)uni_send_output(stat, c->uni);
2010 TIMER_START_CALL(c, t322, c->uni->timer322);
2015 MK_IE_CAUSE(c->uni->cause, UNI_CAUSE_LOC_USER, UNI_CAUSE_RECOVER);
2016 ADD_CAUSE_TIMER(c->uni->cause, "322");
2036 (void)uni_decode_body(m, u, &c->uni->cx);
2038 switch (uni_verify(c->uni, u->u.hdr.act)) {
2041 uni_vfy_collect_ies(c->uni);
2078 (void)uni_send_output(u, c->uni);
2102 uni_enq_coord(c->uni, SIGO_LINK_ESTABLISH_request, 0, NULL);
2129 c->uni->funcs->uni_output(c->uni, c->uni->arg,
2160 c->uni->funcs->uni_output(c->uni, c->uni->arg,
2185 (void)uni_send_output(stat, c->uni);
2189 TIMER_START_CALL(c, t322, c->uni->timer322);
2261 uni_delenq_sig(c->uni, SIG_CALL, c, NULL,
2267 (void)uni_send_output(u, c->uni);
2270 TIMER_START_CALL(c, t322, c->uni->timer322);
2283 MK_IE_CAUSE(c->uni->cause, UNI_CAUSE_LOC_USER,
2286 MK_IE_CAUSE(c->uni->cause, UNI_CAUSE_LOC_USER,
2288 c->uni->cause.u.ie.len = 1;
2289 c->uni->cause.u.ie.ie[0] = UNI_IE_CAUSE;
2290 c->uni->cause.h.present |= UNI_CAUSE_IE_P;
2292 } else if (!IE_ISGOOD(c->uni->cause))
2293 c->uni->cause = *cause;
2315 c->uni->funcs->uni_output(c->uni, c->uni->arg,
2338 c->uni->funcs->uni_output(c->uni, c->uni->arg,
2343 c->uni->funcs->uni_output(c->uni, c->uni->arg,
2367 c->uni->funcs->uni_output(c->uni, c->uni->arg,
2390 c->uni->funcs->uni_output(c->uni, c->uni->arg,
2395 c->uni->funcs->uni_output(c->uni, c->uni->arg,
2419 c->uni->funcs->uni_output(c->uni, c->uni->arg,
2442 c->uni->funcs->uni_output(c->uni, c->uni->arg,
2447 c->uni->funcs->uni_output(c->uni, c->uni->arg,
2682 uni_mandate_epref(c->uni, &u->u.add_party.epref);
2683 MANDATE_IE(c->uni, u->u.add_party.called, UNI_IE_CALLED);
2691 c->uni->cause.u.ie.len = 0;
2692 FOREACH_ERR(e1, c->uni) {
2694 MK_IE_CAUSE(c->uni->cause, UNI_CAUSE_LOC_USER,
2699 FOREACH_ERR(e1, c->uni) {
2702 MK_IE_CAUSE(c->uni->cause, UNI_CAUSE_LOC_USER,
2705 uni_vfy_collect_ies(c->uni);
2713 c->uni->cause;
2724 vfy = uni_verify(c->uni, u->u.hdr.act);
2729 uni_vfy_collect_ies(c->uni);
2735 uni_respond_status_verify(c->uni, &u->u.hdr.cref,
2744 uni_respond_status_verify(c->uni, &u->u.hdr.cref,
2760 (void)UNI_SAVE_IERR(&c->uni->cx, UNI_IE_EPREF,
2767 MK_IE_CAUSE(c->uni->cause, UNI_CAUSE_LOC_USER,
2770 uni_respond_status_verify(c->uni, &u->u.hdr.cref,
2805 (void)UNI_SAVE_IERR(&c->uni->cx, UNI_IE_EPREF,
2817 uni_mandate_epref(c->uni, &u->u.add_party_ack.epref);
2819 switch (uni_verify(c->uni, u->u.hdr.act)) {
2822 uni_vfy_collect_ies(c->uni);
2829 uni_respond_status_verify(c->uni, &u->u.hdr.cref,
2837 uni_respond_status_verify(c->uni, &u->u.hdr.cref,
2875 default_act_epref(struct uni *uni, struct uni_ie_epref *epref)
2879 FOREACH_ERR(e, uni)
2905 (void)UNI_SAVE_IERR(&c->uni->cx, UNI_IE_EPREF,
2917 uni_mandate_epref(c->uni, &u->u.party_alerting.epref);
2919 switch (uni_verify(c->uni, u->u.hdr.act)) {
2922 uni_vfy_collect_ies(c->uni);
2929 uni_respond_status_verify(c->uni, &u->u.hdr.cref,
2937 uni_respond_status_verify(c->uni, &u->u.hdr.cref,
2988 uni_vfy_remove_cause(c->uni);
2995 uni_vfy_remove_cause(c->uni);
3011 c->uni->cause = u->u.add_party_rej.cause;
3015 (void)uni_send_output(u, c->uni);
3042 uni_vfy_remove_unknown(c->uni);
3043 switch (uni_verify(c->uni, u->u.hdr.act)) {
3050 uni_respond_status_verify(c->uni,
3057 uni_vfy_collect_ies(c->uni);
3061 uni_respond_status_verify(c->uni,
3079 default_act_epref(c->uni, &ar->epref);
3081 uni_mandate_ie(c->uni, UNI_IE_EPREF);
3082 (void)uni_verify(c->uni, u->u.hdr.act);
3085 uni_vfy_collect_ies(c->uni);
3116 uni_vfy_remove_unknown(c->uni);
3117 switch (uni_verify(c->uni, u->u.hdr.act)) {
3124 uni_respond_status_verify(c->uni, &u->u.hdr.cref,
3131 uni_vfy_collect_ies(c->uni);
3135 uni_respond_status_verify(c->uni, &u->u.hdr.cref,
3153 FOREACH_ERR(e, c->uni)
3161 uni_mandate_ie(c->uni, UNI_IE_EPREF);
3162 (void)uni_verify(c->uni, u->u.hdr.act);
3165 uni_vfy_collect_ies(c->uni);
3195 uni_vfy_remove_unknown(c->uni);
3196 switch (uni_verify(c->uni, u->u.hdr.act)) {
3203 uni_respond_status_verify(c->uni,
3210 uni_respond_status_verify(c->uni,
3230 (void)uni_verify(c->uni, u->u.hdr.act);
3231 MK_IE_CAUSE(c->uni->cause, UNI_CAUSE_LOC_USER, UNI_CAUSE_IE_INV);
3234 uni_vfy_collect_ies(c->uni);
3267 MK_IE_CAUSE(c->uni->cause, UNI_CAUSE_LOC_USER, cause);
3268 ADD_CAUSE_MTYPE(c->uni->cause, u->mtype);
3282 resp->u.status.cause = c->uni->cause;
3295 (void)uni_send_output(resp, c->uni);
3317 MK_IE_CAUSE(c->uni->cause, UNI_CAUSE_LOC_USER,
3319 ADD_CAUSE_MTYPE(c->uni->cause, u->mtype);
3324 (void)uni_decode_body(m, u, &c->uni->cx);
3338 VERBOSE(c->uni, UNI_FAC_ERR, 1,
3347 VERBOSE(c->uni, UNI_FAC_CALL, 1, "Signal %s in state %s of call %u/%s"
3366 VERBOSE(c->uni, UNI_FAC_ERR, 1,
3404 VERBOSE(c->uni, UNI_FAC_ERR, 1,
3412 VERBOSE(c->uni, UNI_FAC_ERR, 1,
3430 (void)uni_decode_body(msg, u, &c->uni->cx);
3435 if (c->uni->proto == UNIPROTO_UNI40N)
3454 (void)uni_decode_body(msg, u, &c->uni->cx);
3472 (void)uni_decode_body(msg, u, &c->uni->cx);
3494 (void)uni_decode_body(msg, u, &c->uni->cx);
3589 (void)uni_decode_body(msg, u, &c->uni->cx);
3617 (void)uni_decode_body(msg, u, &c->uni->cx);
3644 (void)uni_decode_body(msg, u, &c->uni->cx);
3668 (void)uni_decode_body(msg, u, &c->uni->cx);
3698 (void)uni_decode_body(msg, u, &c->uni->cx);
3728 if (c->uni->sb_tb) {
3746 (void)uni_decode_body(msg, u, &c->uni->cx);
3801 if (c->uni->proto == UNIPROTO_UNI40N)
3807 VERBOSE(c->uni, UNI_FAC_ERR, 1, "setup.request in cs=%s",
3830 VERBOSE(c->uni, UNI_FAC_ERR, 1, "setup.response in cs=%s",
3842 VERBOSE(c->uni, UNI_FAC_ERR, 1, "setup_compl.request in cs=%s",
3859 VERBOSE(c->uni, UNI_FAC_ERR, 1, "proceeding.request in cs=%s",
3878 VERBOSE(c->uni, UNI_FAC_ERR, 1, "alerting.request in cs=%s",
3916 VERBOSE(c->uni, UNI_FAC_ERR, 1,
3936 VERBOSE(c->uni, UNI_FAC_ERR, 1, "release.response in cs=%s",
3964 VERBOSE(c->uni, UNI_FAC_ERR, 1, "add-party.request in cs=%s",
3982 VERBOSE(c->uni, UNI_FAC_ERR, 1,
3996 VERBOSE(c->uni, UNI_FAC_ERR, 1,
4015 VERBOSE(c->uni, UNI_FAC_ERR, 1,
4033 VERBOSE(c->uni, UNI_FAC_ERR, 1, "drop-party.request in cs=%s",
4050 VERBOSE(c->uni, UNI_FAC_ERR, 1,
4059 struct uni *uni = c->uni;
4062 uniapi_uni_error(uni, UNIAPI_OK, cookie, UNI_CALLSTATE_U0);
4076 VERBOSE(c->uni, UNI_FAC_ERR, 1, "T301 in cs=%s",
4087 VERBOSE(c->uni, UNI_FAC_ERR, 1, "T303 in cs=%s",
4098 VERBOSE(c->uni, UNI_FAC_ERR, 1, "T308 in cs=%s",
4109 VERBOSE(c->uni, UNI_FAC_ERR, 1, "T310 in cs=%s",
4119 VERBOSE(c->uni, UNI_FAC_ERR, 1, "T313 in cs=%s",
4137 if (c->uni->proto == UNIPROTO_UNI40U)
4146 if (c->uni->proto == UNIPROTO_UNI40U)
4155 if (c->uni->proto == UNIPROTO_UNI40U)
4168 (void)uni_send_output(u, c->uni);
4170 c->uni->cause = u->u.drop_party.cause;
4180 (void)uni_send_output(u, c->uni);
4182 c->uni->cause = u->u.drop_party_ack.cause;
4201 c->uni->funcs->uni_output(c->uni, c->uni->arg,