Lines Matching refs:msg

62 	int uni_ie_encode_##Coding##_##IE(struct uni_msg *msg, struct uni_ie_##IE *ie, struct unicx *cx)
65 …int uni_ie_decode_##Coding##_##IE(struct uni_ie_##IE *ie, struct uni_msg *msg, u_int ielen, struct…
137 if (uni_encode_ie_hdr(msg, CODE, &ie->h, (LEN), cx)) \
140 ielen = msg->b_wptr - msg->b_rptr - 2;
147 if (uni_encode_ie_hdr(msg, REALCODE, &ie->h, (LEN), cx)) \
150 ielen = msg->b_wptr - msg->b_rptr - 2;
187 ie->F = *msg->b_rptr++ << 16; \
188 ie->F |= *msg->b_rptr++ << 8; \
189 ie->F |= *msg->b_rptr++; \
191 msg->b_rptr += 3; \
201 ie->F = *msg->b_rptr++; \
203 msg->b_rptr++; \
214 uni_encode_msg_hdr(struct uni_msg *msg, struct uni_msghdr *h, in uni_encode_msg_hdr() argument
219 (void)uni_msg_ensure(msg, 9); in uni_encode_msg_hdr()
221 APP_BYTE(msg, cx->pnni ? PNNI_PROTO : UNI_PROTO); in uni_encode_msg_hdr()
222 APP_BYTE(msg, 3); in uni_encode_msg_hdr()
225 APP_24BIT(msg, h->cref.cref | (h->cref.flag ? 0x800000 : 0)); in uni_encode_msg_hdr()
226 APP_BYTE(msg, type); in uni_encode_msg_hdr()
233 APP_BYTE(msg, byte); in uni_encode_msg_hdr()
235 *mlen = msg->b_wptr - msg->b_rptr; in uni_encode_msg_hdr()
236 APP_16BIT(msg, 0); in uni_encode_msg_hdr()
449 MKT(UNI_IEACT_MSG_IGNORE, ignore-msg), in uni_print_iehdr()
450 MKT(UNI_IEACT_MSG_REPORT, report-msg), in uni_print_iehdr()
531 struct uni_msg *msg, struct unicx *cx, u_int *ielen) in uni_decode_ie_hdr() argument
541 if ((len = uni_msg_len(msg)) == 0) in uni_decode_ie_hdr()
544 *ietype = *msg->b_rptr++; in uni_decode_ie_hdr()
549 hdr->coding = (*msg->b_rptr >> 5) & 3; in uni_decode_ie_hdr()
552 switch (*msg->b_rptr & 0x17) { in uni_decode_ie_hdr()
556 hdr->act = *msg->b_rptr & 0x7; in uni_decode_ie_hdr()
569 if (cx->pnni && (*msg->b_rptr & 0x08)) in uni_decode_ie_hdr()
573 msg->b_rptr++; in uni_decode_ie_hdr()
581 msg->b_rptr += len; in uni_decode_ie_hdr()
586 *ielen = *msg->b_rptr++ << 8; in uni_decode_ie_hdr()
587 *ielen |= *msg->b_rptr++; in uni_decode_ie_hdr()
597 struct uni_msg *msg, u_int ielen, struct unicx *cx) in uni_decode_ie_body() argument
603 if (ielen > uni_msg_len(msg)) { in uni_decode_ie_body()
608 msg->b_rptr = msg->b_wptr; in uni_decode_ie_body()
618 msg->b_rptr += ielen; in uni_decode_ie_body()
628 msg->b_rptr += iedecl->maxlen; in uni_decode_ie_body()
633 end = msg->b_rptr + ielen; in uni_decode_ie_body()
634 ret = (*iedecl->decode)(ie, msg, ielen, cx); in uni_decode_ie_body()
635 msg->b_rptr = end; in uni_decode_ie_body()
641 uni_encode_ie(enum uni_ietype code, struct uni_msg *msg, union uni_ieall *ie, in uni_encode_ie() argument
648 return (iedecl->encode(msg, ie, cx)); in uni_encode_ie()
652 uni_encode_ie_hdr(struct uni_msg *msg, enum uni_ietype type, in uni_encode_ie_hdr() argument
657 (void)uni_msg_ensure(msg, 4 + len); in uni_encode_ie_hdr()
658 *msg->b_wptr++ = type; in uni_encode_ie_hdr()
665 *msg->b_wptr++ = byte; in uni_encode_ie_hdr()
668 *msg->b_wptr++ = 0; in uni_encode_ie_hdr()
669 *msg->b_wptr++ = 4; in uni_encode_ie_hdr()
672 *msg->b_wptr++ = 0; in uni_encode_ie_hdr()
673 *msg->b_wptr++ = 0; in uni_encode_ie_hdr()
727 uni_print_internal(const struct uni_all *msg, struct unicx *cx) in uni_print_internal() argument
730 if(msg->mtype >= 256 || uni_msgtable[msg->mtype] == NULL) { in uni_print_internal()
731 uni_printf(cx, "0x%02x(ERROR)", msg->mtype); in uni_print_internal()
733 uni_printf(cx, "%s", uni_msgtable[msg->mtype]->name); in uni_print_internal()
734 uni_print_msghdr_internal(&msg->u.hdr, cx); in uni_print_internal()
737 (*uni_msgtable[msg->mtype]->print)(&msg->u, cx); in uni_print_internal()
753 uni_print_msg_internal(u_int mtype, const union uni_msgall *msg, in uni_print_msg_internal() argument
762 uni_print_msghdr_internal(&msg->hdr, cx); in uni_print_msg_internal()
765 (*uni_msgtable[mtype]->print)(msg, cx); in uni_print_msg_internal()
1343 encode_cause(struct uni_msg *msg, struct uni_ie_cause *ie, struct unicx *cx) in encode_cause() argument
1350 APP_BYTE(msg, 0x00 | ie->loc); in encode_cause()
1352 APP_BYTE(msg, 0x80 | ie->loc); in encode_cause()
1354 APP_BYTE(msg, 0x80 | ie->cause); in encode_cause()
1357 APP_BYTE(msg, 0x80 | (ie->u.cond.pu << 3) | in encode_cause()
1361 APP_BYTE(msg, 0x80 | (ie->u.rej.reason << 2) | ie->u.rej.cond); in encode_cause()
1363 APP_BYTE(msg, ie->u.rej.user); in encode_cause()
1365 APP_BYTE(msg, ie->u.rej.ie); in encode_cause()
1368 APP_BUF(msg, ie->u.ie.ie, ie->u.ie.len); in encode_cause()
1371 APP_BUF(msg, ie->u.traffic.traffic, ie->u.traffic.len); in encode_cause()
1374 APP_BYTE(msg, (ie->u.vpci.vpci >> 8)); in encode_cause()
1375 APP_BYTE(msg, (ie->u.vpci.vpci >> 0)); in encode_cause()
1376 APP_BYTE(msg, (ie->u.vpci.vci >> 8)); in encode_cause()
1377 APP_BYTE(msg, (ie->u.vpci.vci >> 0)); in encode_cause()
1380 APP_BYTE(msg, ie->u.mtype); in encode_cause()
1383 APP_BYTE(msg, ie->u.timer[0]); in encode_cause()
1384 APP_BYTE(msg, ie->u.timer[1]); in encode_cause()
1385 APP_BYTE(msg, ie->u.timer[2]); in encode_cause()
1388 uni_encode_ie(UNI_IE_TNS, msg, in encode_cause()
1392 uni_encode_ie(UNI_IE_CALLED, msg, in encode_cause()
1397 APP_BYTE(msg, ie->u.attr.attr[i][0]); in encode_cause()
1399 APP_BYTE(msg, ie->u.attr.attr[i][1]); in encode_cause()
1401 APP_BYTE(msg, ie->u.attr.attr[i][2]); in encode_cause()
1405 APP_BYTE(msg, ie->u.param); in encode_cause()
1407 SET_IE_LEN(msg); in encode_cause()
1414 return encode_cause(msg, ie, cx); in DEF_IE_ENCODE()
1418 return encode_cause(msg, ie, cx); in DEF_IE_ENCODE()
1424 decode_cause(struct uni_ie_cause *ie, struct uni_msg *msg, u_int ielen, in decode_cause() argument
1437 c = *msg->b_rptr++; in decode_cause()
1443 c = *msg->b_rptr++; in decode_cause()
1467 c = *msg->b_rptr++; in decode_cause()
1482 c = *msg->b_rptr++; in decode_cause()
1493 c = *msg->b_rptr++; in decode_cause()
1516 *msg->b_rptr++; in decode_cause()
1524 ie->u.ie.ie[ie->u.ie.len++] = *msg->b_rptr++; in decode_cause()
1533 ie->u.vpci.vpci = *msg->b_rptr++ << 8; in decode_cause()
1534 ie->u.vpci.vpci |= *msg->b_rptr++; in decode_cause()
1535 ie->u.vpci.vci = *msg->b_rptr++ << 8; in decode_cause()
1536 ie->u.vpci.vci |= *msg->b_rptr++; in decode_cause()
1542 ie->u.mtype = *msg->b_rptr++; in decode_cause()
1550 ie->u.timer[0] = *msg->b_rptr++; in decode_cause()
1551 ie->u.timer[1] = *msg->b_rptr++; in decode_cause()
1552 ie->u.timer[2] = *msg->b_rptr++; in decode_cause()
1559 if(uni_decode_ie_hdr(&ietype, &ie->u.tns.h, msg, cx, &xielen)) in decode_cause()
1564 (union uni_ieall *)&ie->u.tns, msg, xielen, cx)) in decode_cause()
1572 if(uni_decode_ie_hdr(&ietype, &ie->u.number.h, msg, cx, &xielen)) in decode_cause()
1577 (union uni_ieall *)&ie->u.number, msg, xielen, cx)) in decode_cause()
1585 c = *msg->b_rptr++; in decode_cause()
1589 c = *msg->b_rptr++; in decode_cause()
1593 c = *msg->b_rptr++; in decode_cause()
1603 ie->u.param = *msg->b_rptr++; in decode_cause()
1614 return decode_cause(ie, msg, ielen, cx, itu_causes, NULL); in DEF_IE_DECODE()
1618 return decode_cause(ie, msg, ielen, cx, net_causes, itu_causes); in DEF_IE_DECODE()
1692 APP_BYTE(msg, ie->state); in DEF_IE_ENCODE()
1694 SET_IE_LEN(msg); in DEF_IE_ENCODE()
1705 ie->state = *msg->b_rptr++ & 0x3f; in DEF_IE_DECODE()
1759 APP_BYTE(msg, ie->proto | 0x80); in DEF_IE_ENCODE()
1760 APP_BUF(msg, ie->apdu, ie->len); in DEF_IE_ENCODE()
1762 SET_IE_LEN(msg); in DEF_IE_ENCODE()
1775 ie->proto = (c = *msg->b_rptr++) & 0x1f; in DEF_IE_DECODE()
1782 (void)memcpy(ie->apdu, msg->b_rptr, ie->len); in DEF_IE_DECODE()
1783 msg->b_rptr += ie->len; in DEF_IE_DECODE()
1828 APP_BUF(msg, ie->notify, ie->len); in DEF_IE_ENCODE()
1834 APP_BYTE(msg, 0x00); in DEF_IE_ENCODE()
1839 SET_IE_LEN(msg); in DEF_IE_ENCODE()
1852 (void)memcpy(ie->notify, msg->b_rptr, ie->len); in DEF_IE_DECODE()
1853 msg->b_rptr += ie->len; in DEF_IE_DECODE()
1941 APP_BYTE(msg, UNI_EETD_CTD_ID); in DEF_IE_ENCODE()
1942 APP_16BIT(msg, ie->cumulative); in DEF_IE_ENCODE()
1945 APP_BYTE(msg, UNI_EETD_MTD_ID); in DEF_IE_ENCODE()
1946 APP_16BIT(msg, ie->maximum); in DEF_IE_ENCODE()
1949 APP_BYTE(msg, UNI_EETD_PMTD_ID); in DEF_IE_ENCODE()
1950 APP_24BIT(msg, ie->pmtd); in DEF_IE_ENCODE()
1953 APP_BYTE(msg, UNI_EETD_PCTD_ID); in DEF_IE_ENCODE()
1954 APP_24BIT(msg, ie->pctd); in DEF_IE_ENCODE()
1957 APP_BYTE(msg, UNI_EETD_NET_ID); in DEF_IE_ENCODE()
1960 SET_IE_LEN(msg); in DEF_IE_ENCODE()
1966 return (uni_ie_encode_itu_eetd(msg, ie, cx)); in DEF_IE_ENCODE()
1974 switch (ielen--, *msg->b_rptr++) { in DEF_IE_DECODE()
1980 ie->cumulative = *msg->b_rptr++ << 8; in DEF_IE_DECODE()
1981 ie->cumulative |= *msg->b_rptr++; in DEF_IE_DECODE()
1989 ie->maximum = *msg->b_rptr++ << 8; in DEF_IE_DECODE()
1990 ie->maximum |= *msg->b_rptr++; in DEF_IE_DECODE()
1998 ie->pctd = *msg->b_rptr++ << 16; in DEF_IE_DECODE()
1999 ie->pctd |= *msg->b_rptr++ << 8; in DEF_IE_DECODE()
2000 ie->pctd |= *msg->b_rptr++; in DEF_IE_DECODE()
2008 ie->pmtd = *msg->b_rptr++ << 16; in DEF_IE_DECODE()
2009 ie->pmtd |= *msg->b_rptr++ << 8; in DEF_IE_DECODE()
2010 ie->pmtd |= *msg->b_rptr++; in DEF_IE_DECODE()
2027 return (uni_ie_decode_itu_eetd(ie, msg, ielen, cx)); in DEF_IE_DECODE()
2210 encode_addr(struct uni_msg *msg, struct uni_addr *addr, u_int flag, in encode_addr() argument
2216 APP_BYTE(msg, (addr->type << 4) | addr->plan); in encode_addr()
2217 APP_BYTE(msg, ext | (pres << 5) | (screen)); in encode_addr()
2219 APP_BYTE(msg, ext | (addr->type << 4) | addr->plan); in encode_addr()
2221 APP_BUF(msg, addr->addr, addr->len); in encode_addr()
2225 encode_subaddr(struct uni_msg *msg, struct uni_subaddr *addr) in encode_subaddr() argument
2227 APP_BYTE(msg, 0x80|(addr->type<<4)); in encode_subaddr()
2228 APP_BUF(msg, addr->addr, addr->len); in encode_subaddr()
2232 decode_addr(struct uni_addr *addr, u_int ielen, struct uni_msg *msg, u_int plan) in decode_addr() argument
2253 (void)memcpy(addr->addr, msg->b_rptr, ielen); in decode_addr()
2255 msg->b_rptr += ielen; in decode_addr()
2261 decode_subaddr(struct uni_subaddr *addr, u_int ielen, struct uni_msg *msg, in decode_subaddr() argument
2285 (void)memcpy(addr->addr, msg->b_rptr, ielen); in decode_subaddr()
2286 msg->b_rptr += ielen; in decode_subaddr()
2313 encode_addr(msg, &ie->addr, 0, 0, 0, IE_ISERROR(*ie)); in DEF_IE_ENCODE()
2314 SET_IE_LEN(msg); in DEF_IE_ENCODE()
2326 c = *msg->b_rptr++; in DEF_IE_DECODE()
2332 if (decode_addr(&ie->addr, ielen, msg, c)) in DEF_IE_DECODE()
2360 encode_subaddr(msg, &ie->addr); in DEF_IE_ENCODE()
2361 SET_IE_LEN(msg); in DEF_IE_ENCODE()
2374 c = *msg->b_rptr++; in DEF_IE_DECODE()
2377 if(decode_subaddr(&ie->addr, ielen, msg, c)) in DEF_IE_DECODE()
2415 …encode_addr(msg, &ie->addr, ie->h.present & UNI_CALLING_SCREEN_P, ie->screen, ie->pres, IE_ISERROR… in DEF_IE_ENCODE()
2416 SET_IE_LEN(msg); in DEF_IE_ENCODE()
2429 plan = *msg->b_rptr++; in DEF_IE_DECODE()
2436 c = *msg->b_rptr++; in DEF_IE_DECODE()
2446 if(decode_addr(&ie->addr, ielen, msg, plan)) in DEF_IE_DECODE()
2474 encode_subaddr(msg, &ie->addr); in DEF_IE_ENCODE()
2475 SET_IE_LEN(msg); in DEF_IE_ENCODE()
2488 c = *msg->b_rptr++; in DEF_IE_DECODE()
2491 if(decode_subaddr(&ie->addr, ielen, msg, c)) in DEF_IE_DECODE()
2529 …encode_addr(msg, &ie->addr, ie->h.present & UNI_CONNED_SCREEN_P, ie->screen, ie->pres, IE_ISERROR(… in DEF_IE_ENCODE()
2530 SET_IE_LEN(msg); in DEF_IE_ENCODE()
2543 plan = *msg->b_rptr++; in DEF_IE_DECODE()
2550 c = *msg->b_rptr++; in DEF_IE_DECODE()
2560 if(decode_addr(&ie->addr, ielen, msg, plan)) in DEF_IE_DECODE()
2588 encode_subaddr(msg, &ie->addr); in DEF_IE_ENCODE()
2589 SET_IE_LEN(msg); in DEF_IE_ENCODE()
2602 c = *msg->b_rptr++; in DEF_IE_DECODE()
2605 if(decode_subaddr(&ie->addr, ielen, msg, c)) in DEF_IE_DECODE()
2645 APP_BYTE(msg, 0xff); in DEF_IE_ENCODE()
2647 APP_BYTE(msg, 0); in DEF_IE_ENCODE()
2648 APP_BYTE(msg, (ie->flag << 7) | ((ie->epref >> 8) & 0x7f)); in DEF_IE_ENCODE()
2649 APP_BYTE(msg, (ie->epref & 0xff)); in DEF_IE_ENCODE()
2651 SET_IE_LEN(msg); in DEF_IE_ENCODE()
2663 if(*msg->b_rptr++ != 0) in DEF_IE_DECODE()
2666 c = *msg->b_rptr++; in DEF_IE_DECODE()
2669 ie->epref |= *msg->b_rptr++; in DEF_IE_DECODE()
2731 APP_BYTE(msg, ie->state); in DEF_IE_ENCODE()
2733 SET_IE_LEN(msg); in DEF_IE_ENCODE()
2744 ie->state = *msg->b_rptr++ & 0x3f; in DEF_IE_DECODE()
3038 APP_BYTE(msg, ie->type); in DEF_IE_ENCODE()
3045 APP_SUB_BYTE(msg, in DEF_IE_ENCODE()
3047 APP_SUB_BYTE(msg, in DEF_IE_ENCODE()
3049 APP_OPT_16BIT(msg, ie->h.present, UNI_AAL1_MULT_P, in DEF_IE_ENCODE()
3051 APP_OPT_BYTE(msg, ie->h.present, UNI_AAL1_SCREC_P, in DEF_IE_ENCODE()
3053 APP_OPT_BYTE(msg, ie->h.present, UNI_AAL1_ECM_P, in DEF_IE_ENCODE()
3055 APP_OPT_16BIT(msg, ie->h.present, UNI_AAL1_BSIZE_P, in DEF_IE_ENCODE()
3057 APP_OPT_BYTE(msg, ie->h.present, UNI_AAL1_PART_P, in DEF_IE_ENCODE()
3066 APP_SUB_16BIT(msg, in DEF_IE_ENCODE()
3068 APP_SUB_16BIT(msg, in DEF_IE_ENCODE()
3072 APP_BYTE(msg, UNI_AAL_MID_ID); in DEF_IE_ENCODE()
3073 APP_16BIT(msg, ie->u.aal4.mid_low); in DEF_IE_ENCODE()
3074 APP_16BIT(msg, ie->u.aal4.mid_high); in DEF_IE_ENCODE()
3076 APP_OPT_BYTE(msg, ie->h.present, UNI_AAL4_SSCS_P, in DEF_IE_ENCODE()
3082 APP_SUB_16BIT(msg, in DEF_IE_ENCODE()
3084 APP_SUB_16BIT(msg, in DEF_IE_ENCODE()
3087 APP_OPT_BYTE(msg, ie->h.present, UNI_AAL5_SSCS_P, in DEF_IE_ENCODE()
3092 APP_BUF(msg, ie->u.aalu.user, ie->u.aalu.len); in DEF_IE_ENCODE()
3099 SET_IE_LEN(msg); in DEF_IE_ENCODE()
3108 decode_aal_1(struct uni_ie_aal *ie, struct uni_msg *msg, u_int ielen) in decode_aal_1() argument
3115 switch(*msg->b_rptr++) { in decode_aal_1()
3122 ie->u.aal1.subtype = *msg->b_rptr++; in decode_aal_1()
3130 ie->u.aal1.cbr_rate = *msg->b_rptr++; in decode_aal_1()
3138 ie->u.aal1.mult = *msg->b_rptr++ << 8; in decode_aal_1()
3139 ie->u.aal1.mult |= *msg->b_rptr++; in decode_aal_1()
3147 ie->u.aal1.screc = *msg->b_rptr++; in decode_aal_1()
3155 ie->u.aal1.ecm = *msg->b_rptr++; in decode_aal_1()
3163 ie->u.aal1.bsize = *msg->b_rptr++ << 8; in decode_aal_1()
3164 ie->u.aal1.bsize |= *msg->b_rptr++; in decode_aal_1()
3172 ie->u.aal1.part = *msg->b_rptr++; in decode_aal_1()
3186 decode_aal_4(struct uni_ie_aal *ie, struct uni_msg *msg, u_int ielen) in decode_aal_4() argument
3193 switch(*msg->b_rptr++) { in decode_aal_4()
3200 ie->u.aal4.fwd_cpcs = *msg->b_rptr++ << 8; in decode_aal_4()
3201 ie->u.aal4.fwd_cpcs |= *msg->b_rptr++; in decode_aal_4()
3209 ie->u.aal4.bwd_cpcs = *msg->b_rptr++ << 8; in decode_aal_4()
3210 ie->u.aal4.bwd_cpcs |= *msg->b_rptr++; in decode_aal_4()
3218 ie->u.aal4.mid_low = *msg->b_rptr++ << 8; in decode_aal_4()
3219 ie->u.aal4.mid_low |= *msg->b_rptr++; in decode_aal_4()
3220 ie->u.aal4.mid_high = *msg->b_rptr++ << 8; in decode_aal_4()
3221 ie->u.aal4.mid_high |= *msg->b_rptr++; in decode_aal_4()
3229 ie->u.aal4.sscs = *msg->b_rptr++; in decode_aal_4()
3246 decode_aal_5(struct uni_ie_aal *ie, struct uni_msg *msg, u_int ielen) in decode_aal_5() argument
3253 switch(*msg->b_rptr++) { in decode_aal_5()
3260 ie->u.aal5.fwd_cpcs = *msg->b_rptr++ << 8; in decode_aal_5()
3261 ie->u.aal5.fwd_cpcs |= *msg->b_rptr++; in decode_aal_5()
3269 ie->u.aal5.bwd_cpcs = *msg->b_rptr++ << 8; in decode_aal_5()
3270 ie->u.aal5.bwd_cpcs |= *msg->b_rptr++; in decode_aal_5()
3278 ie->u.aal5.sscs = *msg->b_rptr++; in decode_aal_5()
3295 decode_aal_user(struct uni_ie_aal *ie, struct uni_msg *msg, u_int ielen) in decode_aal_user() argument
3302 ie->u.aalu.user[ie->u.aalu.len++] = *msg->b_rptr++; in decode_aal_user()
3316 c = *msg->b_rptr++; in DEF_IE_DECODE()
3327 if(decode_aal_1(ie, msg, ielen)) in DEF_IE_DECODE()
3337 if(decode_aal_4(ie, msg, ielen)) in DEF_IE_DECODE()
3343 if(decode_aal_5(ie, msg, ielen)) in DEF_IE_DECODE()
3349 if(decode_aal_user(ie, msg, ielen)) in DEF_IE_DECODE()
3585 encode_traffic_common(struct uni_msg *msg, struct uni_xtraffic *ie, in encode_traffic_common() argument
3588 APP_OPT_24BIT(msg, present, UNI_TRAFFIC_FPCR0_P, in encode_traffic_common()
3590 APP_OPT_24BIT(msg, present, UNI_TRAFFIC_BPCR0_P, in encode_traffic_common()
3592 APP_OPT_24BIT(msg, present, UNI_TRAFFIC_FPCR1_P, in encode_traffic_common()
3594 APP_OPT_24BIT(msg, present, UNI_TRAFFIC_BPCR1_P, in encode_traffic_common()
3596 APP_OPT_24BIT(msg, present, UNI_TRAFFIC_FSCR0_P, in encode_traffic_common()
3598 APP_OPT_24BIT(msg, present, UNI_TRAFFIC_BSCR0_P, in encode_traffic_common()
3600 APP_OPT_24BIT(msg, present, UNI_TRAFFIC_FSCR1_P, in encode_traffic_common()
3602 APP_OPT_24BIT(msg, present, UNI_TRAFFIC_BSCR1_P, in encode_traffic_common()
3604 APP_OPT_24BIT(msg, present, UNI_TRAFFIC_FMBS0_P, in encode_traffic_common()
3606 APP_OPT_24BIT(msg, present, UNI_TRAFFIC_BMBS0_P, in encode_traffic_common()
3608 APP_OPT_24BIT(msg, present, UNI_TRAFFIC_FMBS1_P, in encode_traffic_common()
3610 APP_OPT_24BIT(msg, present, UNI_TRAFFIC_BMBS1_P, in encode_traffic_common()
3612 APP_OPT_24BIT(msg, present, UNI_TRAFFIC_FABR1_P, in encode_traffic_common()
3614 APP_OPT_24BIT(msg, present, UNI_TRAFFIC_BABR1_P, in encode_traffic_common()
3617 APP_OPT(msg, present, UNI_TRAFFIC_BEST_P, in encode_traffic_common()
3619 APP_OPT_BYTE(msg, present, UNI_TRAFFIC_MOPT_P, in encode_traffic_common()
3630 decode_traffic_common(struct uni_xtraffic *ie, struct uni_msg *msg, in decode_traffic_common() argument
3636 switch(c = *msg->b_rptr++) { in decode_traffic_common()
3666 ie->ftag = (*msg->b_rptr&UNI_TRAFFIC_FTAG)?1:0; in decode_traffic_common()
3667 ie->btag = (*msg->b_rptr&UNI_TRAFFIC_BTAG)?1:0; in decode_traffic_common()
3668 ie->fdisc = (*msg->b_rptr&UNI_TRAFFIC_FDISC)?1:0; in decode_traffic_common()
3669 ie->bdisc = (*msg->b_rptr&UNI_TRAFFIC_BDISC)?1:0; in decode_traffic_common()
3671 msg->b_rptr++; in decode_traffic_common()
3697 encode_traffic_common(msg, &ie->t, ie->h.present, cx); in DEF_IE_ENCODE()
3698 SET_IE_LEN(msg); in DEF_IE_ENCODE()
3709 if(decode_traffic_common(&ie->t, msg, ielen, &ie->h.present)) in DEF_IE_DECODE()
3733 encode_traffic_common(msg, &ie->t, ie->h.present, cx); in DEF_IE_ENCODE()
3734 SET_IE_LEN(msg); in DEF_IE_ENCODE()
3745 if(decode_traffic_common(&ie->t, msg, ielen, &ie->h.present)) in DEF_IE_DECODE()
3805 APP_OPT_24BIT(msg, ie->h.present, UNI_MINTRAFFIC_FPCR0_P, in DEF_IE_ENCODE()
3807 APP_OPT_24BIT(msg, ie->h.present, UNI_MINTRAFFIC_BPCR0_P, in DEF_IE_ENCODE()
3809 APP_OPT_24BIT(msg, ie->h.present, UNI_MINTRAFFIC_FPCR1_P, in DEF_IE_ENCODE()
3811 APP_OPT_24BIT(msg, ie->h.present, UNI_MINTRAFFIC_BPCR1_P, in DEF_IE_ENCODE()
3813 APP_OPT_24BIT(msg, ie->h.present, UNI_MINTRAFFIC_FABR1_P, in DEF_IE_ENCODE()
3815 APP_OPT_24BIT(msg, ie->h.present, UNI_MINTRAFFIC_BABR1_P, in DEF_IE_ENCODE()
3818 SET_IE_LEN(msg); in DEF_IE_ENCODE()
3832 switch(c = *msg->b_rptr++) { in DEF_IE_DECODE()
3888 APP_BYTE(msg, ie->origin); in DEF_IE_ENCODE()
3889 APP_SUB_24BIT(msg, UNI_TRAFFIC_FMDCR_ID, ie->fmdcr); in DEF_IE_ENCODE()
3890 APP_SUB_24BIT(msg, UNI_TRAFFIC_BMDCR_ID, ie->bmdcr); in DEF_IE_ENCODE()
3892 SET_IE_LEN(msg); in DEF_IE_ENCODE()
3908 ie->origin = *msg->b_rptr++; in DEF_IE_DECODE()
3912 switch(c = *msg->b_rptr++) { in DEF_IE_DECODE()
4006 APP_BYTE(msg, 0x80 | (ie->assoc << 3) | ie->type); in DEF_IE_ENCODE()
4007 APP_BYTE(msg, ie->vpci >> 8); in DEF_IE_ENCODE()
4008 APP_BYTE(msg, ie->vpci >> 0); in DEF_IE_ENCODE()
4009 APP_BYTE(msg, ie->vci >> 8); in DEF_IE_ENCODE()
4010 APP_BYTE(msg, ie->vci >> 0); in DEF_IE_ENCODE()
4012 SET_IE_LEN(msg); in DEF_IE_ENCODE()
4025 c = *msg->b_rptr++; in DEF_IE_DECODE()
4030 ie->vpci = *msg->b_rptr++ << 8; in DEF_IE_DECODE()
4031 ie->vpci |= *msg->b_rptr++; in DEF_IE_DECODE()
4032 ie->vci = *msg->b_rptr++ << 8; in DEF_IE_DECODE()
4033 ie->vci |= *msg->b_rptr++; in DEF_IE_DECODE()
4130 APP_BYTE(msg, ie->fwd); in DEF_IE_ENCODE()
4131 APP_BYTE(msg, ie->bwd); in DEF_IE_ENCODE()
4133 SET_IE_LEN(msg); in DEF_IE_ENCODE()
4140 APP_BYTE(msg, ie->fwd); in DEF_IE_ENCODE()
4141 APP_BYTE(msg, ie->bwd); in DEF_IE_ENCODE()
4143 SET_IE_LEN(msg); in DEF_IE_ENCODE()
4154 ie->fwd = *msg->b_rptr++; in DEF_IE_DECODE()
4155 ie->bwd = *msg->b_rptr++; in DEF_IE_DECODE()
4167 ie->fwd = *msg->b_rptr++; in DEF_IE_DECODE()
4168 ie->bwd = *msg->b_rptr++; in DEF_IE_DECODE()
4231 APP_BYTE(msg, 0x80 | ie->type); in DEF_IE_ENCODE()
4232 APP_BUF(msg, ie->info, ie->len); in DEF_IE_ENCODE()
4234 SET_IE_LEN(msg); in DEF_IE_ENCODE()
4247 c = *msg->b_rptr++; in DEF_IE_DECODE()
4254 (void)memcpy(ie->info, msg->b_rptr, ielen); in DEF_IE_DECODE()
4255 msg->b_rptr += ielen; in DEF_IE_DECODE()
4437 APP_BYTE(msg, ie->bclass | in DEF_IE_ENCODE()
4439 APP_OPT(msg, ie->h.present, UNI_BEARER_ATC_P, in DEF_IE_ENCODE()
4441 APP_BYTE(msg, 0x80 | (ie->clip << 5) | ie->cfg); in DEF_IE_ENCODE()
4443 SET_IE_LEN(msg); in DEF_IE_ENCODE()
4456 c = *msg->b_rptr++; in DEF_IE_DECODE()
4460 c = *msg->b_rptr++; in DEF_IE_DECODE()
4499 c = *msg->b_rptr++; in DEF_IE_DECODE()
4913 APP_BYTE(msg, 0xff); in DEF_IE_ENCODE()
4914 APP_BYTE(msg, 0xff); in DEF_IE_ENCODE()
4919 APP_BYTE(msg, (UNI_BLLI_L1_ID<<5)|ie->l1|0x80); in DEF_IE_ENCODE()
4923 APP_BYTE(msg, (UNI_BLLI_L2_ID<<5)|ie->l2); in DEF_IE_ENCODE()
4925 APP_BYTE(msg, (ie->l2_mode<<5)|ie->l2_q933); in DEF_IE_ENCODE()
4926 APP_BYTE(msg, ie->l2_wsiz | 0x80); in DEF_IE_ENCODE()
4928 APP_BYTE(msg, (ie->l2_mode<<5)|ie->l2_q933|0x80); in DEF_IE_ENCODE()
4931 APP_BYTE(msg, (UNI_BLLI_L2_ID<<5)|ie->l2); in DEF_IE_ENCODE()
4932 APP_BYTE(msg, ie->l2_user | 0x80); in DEF_IE_ENCODE()
4934 APP_BYTE(msg, (UNI_BLLI_L2_ID << 5) | ie->l2 | 0x80); in DEF_IE_ENCODE()
4942 APP_BYTE(msg,(UNI_BLLI_L3_ID<<5)|ie->l3); in DEF_IE_ENCODE()
4943 APP_BYTE(msg,(ie->l3_mode<<5)); in DEF_IE_ENCODE()
4944 APP_BYTE(msg,ie->l3_psiz); in DEF_IE_ENCODE()
4945 APP_BYTE(msg,ie->l3_wsiz|0x80); in DEF_IE_ENCODE()
4947 APP_BYTE(msg,(UNI_BLLI_L3_ID<<5)|ie->l3); in DEF_IE_ENCODE()
4948 APP_BYTE(msg,(ie->l3_mode<<5)); in DEF_IE_ENCODE()
4949 APP_BYTE(msg,(ie->l3_psiz|0x80)); in DEF_IE_ENCODE()
4952 APP_BYTE(msg, (UNI_BLLI_L3_ID<<5)|ie->l3); in DEF_IE_ENCODE()
4953 APP_BYTE(msg, (ie->l3_mode<<5)|0x80); in DEF_IE_ENCODE()
4956 APP_BYTE(msg, (UNI_BLLI_L3_ID<<5)|ie->l3); in DEF_IE_ENCODE()
4957 APP_BYTE(msg,(ie->l3_user|0x80)); in DEF_IE_ENCODE()
4959 APP_BYTE(msg, (UNI_BLLI_L3_ID<<5)|ie->l3); in DEF_IE_ENCODE()
4960 APP_BYTE(msg,((ie->l3_ipi>>1) & 0x7f)); in DEF_IE_ENCODE()
4961 APP_BYTE(msg,(((ie->l3_ipi&1)<<6)|0x80)); in DEF_IE_ENCODE()
4963 APP_BYTE(msg, 0x80); in DEF_IE_ENCODE()
4964 APP_BYTE(msg, (ie->oui >> 16)); in DEF_IE_ENCODE()
4965 APP_BYTE(msg, (ie->oui >> 8)); in DEF_IE_ENCODE()
4966 APP_BYTE(msg, (ie->oui >> 0)); in DEF_IE_ENCODE()
4967 APP_BYTE(msg, (ie->pid >> 8)); in DEF_IE_ENCODE()
4968 APP_BYTE(msg, (ie->pid >> 0)); in DEF_IE_ENCODE()
4972 APP_BYTE(msg, ie->l3_ttype | (ie->l3_tcap << 4)); in DEF_IE_ENCODE()
4973 APP_BYTE(msg, 0x80 | (ie->l3_fmux << 3) | ie->l3_bmux); in DEF_IE_ENCODE()
4975 APP_BYTE(msg, 0x80 | ie->l3_ttype | (ie->l3_tcap << 4)); in DEF_IE_ENCODE()
4978 APP_BYTE(msg, (UNI_BLLI_L3_ID<<5)|ie->l3|0x80); in DEF_IE_ENCODE()
4983 SET_IE_LEN(msg); in DEF_IE_ENCODE()
4997 switch(((c = *msg->b_rptr++) >> 5) & 0x3) { in DEF_IE_DECODE()
5015 c = *msg->b_rptr++; in DEF_IE_DECODE()
5029 c = *msg->b_rptr++; in DEF_IE_DECODE()
5055 c = *msg->b_rptr++; in DEF_IE_DECODE()
5065 c = *msg->b_rptr++; in DEF_IE_DECODE()
5075 c = *msg->b_rptr++; in DEF_IE_DECODE()
5087 c = *msg->b_rptr++; in DEF_IE_DECODE()
5091 c = *msg->b_rptr++; in DEF_IE_DECODE()
5102 if(*msg->b_rptr++ != 0x80) in DEF_IE_DECODE()
5105 ie->oui = *msg->b_rptr++ << 16; in DEF_IE_DECODE()
5106 ie->oui |= *msg->b_rptr++ << 8; in DEF_IE_DECODE()
5107 ie->oui |= *msg->b_rptr++; in DEF_IE_DECODE()
5108 ie->pid = *msg->b_rptr++ << 8; in DEF_IE_DECODE()
5109 ie->pid |= *msg->b_rptr++; in DEF_IE_DECODE()
5116 c = *msg->b_rptr++; in DEF_IE_DECODE()
5125 c = *msg->b_rptr++; in DEF_IE_DECODE()
5137 c = *msg->b_rptr++; in DEF_IE_DECODE()
5183 APP_BYTE(msg, 0x80 | ie->set); in DEF_IE_ENCODE()
5184 SET_IE_LEN(msg); in DEF_IE_ENCODE()
5197 c = *msg->b_rptr++; in DEF_IE_DECODE()
5224 APP_BYTE(msg, 0x80 | ie->set); in DEF_IE_ENCODE()
5225 SET_IE_LEN(msg); in DEF_IE_ENCODE()
5238 c = *msg->b_rptr++; in DEF_IE_DECODE()
5274 APP_BYTE(msg, 0x80 | 0x21); in DEF_IE_ENCODE()
5276 SET_IE_LEN(msg); in DEF_IE_ENCODE()
5287 if(*msg->b_rptr++ != (0x80 | 0x21)) in DEF_IE_DECODE()
5342 APP_BYTE(msg, 0x80 | ie->type); in DEF_IE_ENCODE()
5344 SET_IE_LEN(msg); in DEF_IE_ENCODE()
5357 c = *msg->b_rptr++; in DEF_IE_DECODE()
5417 APP_BYTE(msg, 0x80 | (0x2 << 4) | 0x1); in DEF_IE_ENCODE()
5418 APP_BUF(msg, ie->net, ie->len); in DEF_IE_ENCODE()
5420 SET_IE_LEN(msg); in DEF_IE_ENCODE()
5431 if(*msg->b_rptr++ != (0x80 | (0x2 << 4) | 0x1)) in DEF_IE_DECODE()
5437 ie->net[ie->len++] = *msg->b_rptr++; in DEF_IE_DECODE()
5490 APP_BYTE(msg, 0x80 | ie->rclass); in DEF_IE_ENCODE()
5492 SET_IE_LEN(msg); in DEF_IE_ENCODE()
5505 ie->rclass = (c = *msg->b_rptr++) & 0x7; in DEF_IE_DECODE()
5552 APP_BUF(msg, ie->uu, ie->len); in DEF_IE_ENCODE()
5554 SET_IE_LEN(msg); in DEF_IE_ENCODE()
5567 (void)memcpy(ie->uu, msg->b_rptr, ie->len); in DEF_IE_DECODE()
5568 msg->b_rptr += ie->len; in DEF_IE_DECODE()
5665 APP_BYTE(msg, ie->std); in DEF_IE_ENCODE()
5667 APP_BYTE(msg, ie->sub[i].type); in DEF_IE_ENCODE()
5668 APP_BYTE(msg, ie->sub[i].len); in DEF_IE_ENCODE()
5669 APP_BUF(msg, ie->sub[i].val, ie->sub[i].len); in DEF_IE_ENCODE()
5672 SET_IE_LEN(msg); in DEF_IE_ENCODE()
5683 ie->std = *msg->b_rptr++; in DEF_IE_DECODE()
5691 ie->sub[ie->numsub].type = *msg->b_rptr++; in DEF_IE_DECODE()
5696 ie->sub[ie->numsub].len = *msg->b_rptr++; in DEF_IE_DECODE()
5704 (void)memcpy(ie->sub[ie->numsub].val, msg->b_rptr, ie->sub[ie->numsub].len); in DEF_IE_DECODE()
5706 msg->b_rptr += ie->sub[ie->numsub].len; in DEF_IE_DECODE()
5786 APP_SUB_32BIT(msg, UNI_ABRADD_FADD_ID, encode_abr_rec(&ie->fwd)); in DEF_IE_ENCODE()
5787 APP_SUB_32BIT(msg, UNI_ABRADD_BADD_ID, encode_abr_rec(&ie->bwd)); in DEF_IE_ENCODE()
5789 SET_IE_LEN(msg); in DEF_IE_ENCODE()
5794 decode_abr_rec(struct uni_msg *msg, struct uni_abr_rec *rec) in decode_abr_rec() argument
5798 val = *msg->b_rptr++ << 24; in decode_abr_rec()
5799 val |= *msg->b_rptr++ << 16; in decode_abr_rec()
5800 val |= *msg->b_rptr++ << 8; in decode_abr_rec()
5801 val |= *msg->b_rptr++ << 0; in decode_abr_rec()
5822 switch(*msg->b_rptr++) { in DEF_IE_DECODE()
5828 if(decode_abr_rec(msg, &ie->fwd)) in DEF_IE_DECODE()
5834 if(decode_abr_rec(msg, &ie->bwd)) in DEF_IE_DECODE()
5939 APP_OPT_24BIT(msg, ie->h.present, UNI_ABRSETUP_FICR_P, in DEF_IE_ENCODE()
5941 APP_OPT_24BIT(msg, ie->h.present, UNI_ABRSETUP_BICR_P, in DEF_IE_ENCODE()
5943 APP_OPT_24BIT(msg, ie->h.present, UNI_ABRSETUP_FTBE_P, in DEF_IE_ENCODE()
5945 APP_OPT_24BIT(msg, ie->h.present, UNI_ABRSETUP_BTBE_P, in DEF_IE_ENCODE()
5947 APP_SUB_24BIT(msg, UNI_ABRSETUP_RMFRT_ID, ie->rmfrt); in DEF_IE_ENCODE()
5948 APP_OPT_BYTE(msg, ie->h.present, UNI_ABRSETUP_FRIF_P, in DEF_IE_ENCODE()
5950 APP_OPT_BYTE(msg, ie->h.present, UNI_ABRSETUP_BRIF_P, in DEF_IE_ENCODE()
5952 APP_OPT_BYTE(msg, ie->h.present, UNI_ABRSETUP_FRDF_P, in DEF_IE_ENCODE()
5954 APP_OPT_BYTE(msg, ie->h.present, UNI_ABRSETUP_BRDF_P, in DEF_IE_ENCODE()
5957 SET_IE_LEN(msg); in DEF_IE_ENCODE()
5970 switch(*msg->b_rptr++) { in DEF_IE_DECODE()
6041 APP_BYTE(msg, ie->report); in DEF_IE_ENCODE()
6043 SET_IE_LEN(msg); in DEF_IE_ENCODE()
6053 ie->report = *msg->b_rptr++; in DEF_IE_DECODE()
6144 APP_BYTE(msg, 0x81); in DEF_IE_ENCODE()
6145 APP_16BIT(msg, ie->vpi); in DEF_IE_ENCODE()
6148 APP_BYTE(msg, 0x82); in DEF_IE_ENCODE()
6149 APP_16BIT(msg, ie->vci); in DEF_IE_ENCODE()
6152 SET_IE_LEN(msg); in DEF_IE_ENCODE()
6160 APP_BYTE(msg, ie->sel); in DEF_IE_ENCODE()
6163 APP_BYTE(msg, 0x81); in DEF_IE_ENCODE()
6164 APP_16BIT(msg, ie->vpi); in DEF_IE_ENCODE()
6168 APP_BYTE(msg, 0x82); in DEF_IE_ENCODE()
6169 APP_16BIT(msg, ie->vci); in DEF_IE_ENCODE()
6172 SET_IE_LEN(msg); in DEF_IE_ENCODE()
6188 switch(*msg->b_rptr++) { in DEF_IE_DECODE()
6192 ie->vpi = *msg->b_rptr++ << 8; in DEF_IE_DECODE()
6193 ie->vpi |= *msg->b_rptr++; in DEF_IE_DECODE()
6195 msg->b_rptr += 2; in DEF_IE_DECODE()
6202 ie->vci = *msg->b_rptr++ << 8; in DEF_IE_DECODE()
6203 ie->vci |= *msg->b_rptr++; in DEF_IE_DECODE()
6205 msg->b_rptr += 2; in DEF_IE_DECODE()
6234 switch(*msg->b_rptr++) { in DEF_IE_DECODE()
6238 ie->vpi = *msg->b_rptr++ << 8; in DEF_IE_DECODE()
6239 ie->vpi |= *msg->b_rptr++; in DEF_IE_DECODE()
6242 msg->b_rptr += 2; in DEF_IE_DECODE()
6250 ie->vci = *msg->b_rptr++ << 8; in DEF_IE_DECODE()
6251 ie->vci |= *msg->b_rptr++; in DEF_IE_DECODE()
6254 msg->b_rptr += 2; in DEF_IE_DECODE()
6412 APP_BYTE(msg, ie->level); in DEF_IE_ENCODE()
6413 APP_BYTE(msg, ie->type); in DEF_IE_ENCODE()
6421 APP_BYTE(msg, ie->id.node.level); in DEF_IE_ENCODE()
6422 APP_BUF(msg, ie->id.node.id, 21); in DEF_IE_ENCODE()
6426 APP_BYTE(msg, ie->id.link.plevel); in DEF_IE_ENCODE()
6427 APP_BUF(msg, ie->id.link.pid, 21); in DEF_IE_ENCODE()
6428 APP_32BIT(msg, ie->id.link.port); in DEF_IE_ENCODE()
6429 APP_BYTE(msg, ie->id.link.slevel); in DEF_IE_ENCODE()
6430 APP_BUF(msg, ie->id.link.sid, 21); in DEF_IE_ENCODE()
6434 APP_BYTE(msg, ie->cause); in DEF_IE_ENCODE()
6437 APP_BYTE(msg, ie->diag.top.dir); in DEF_IE_ENCODE()
6438 APP_32BIT(msg, ie->diag.top.port); in DEF_IE_ENCODE()
6439 APP_32BIT(msg, ie->diag.top.avcr); in DEF_IE_ENCODE()
6441 APP_32BIT(msg, ie->diag.top.crm); in DEF_IE_ENCODE()
6442 APP_32BIT(msg, ie->diag.top.vf); in DEF_IE_ENCODE()
6447 APP_BYTE(msg, (ie->diag.qos.ctd << 3) in DEF_IE_ENCODE()
6452 SET_IE_LEN(msg); in DEF_IE_ENCODE()
6464 ie->level = *msg->b_rptr++; in DEF_IE_DECODE()
6467 ie->type = *msg->b_rptr++; in DEF_IE_DECODE()
6481 ie->id.node.level = *msg->b_rptr++; in DEF_IE_DECODE()
6482 (void)memcpy(ie->id.node.id, msg->b_rptr, 21); in DEF_IE_DECODE()
6483 msg->b_rptr += 21; in DEF_IE_DECODE()
6490 ie->id.link.plevel = *msg->b_rptr++; in DEF_IE_DECODE()
6491 (void)memcpy(ie->id.link.pid, msg->b_rptr, 21); in DEF_IE_DECODE()
6492 msg->b_rptr += 21; in DEF_IE_DECODE()
6495 ie->id.link.port = *msg->b_rptr++ << 24; in DEF_IE_DECODE()
6496 ie->id.link.port |= *msg->b_rptr++ << 16; in DEF_IE_DECODE()
6497 ie->id.link.port |= *msg->b_rptr++ << 8; in DEF_IE_DECODE()
6498 ie->id.link.port |= *msg->b_rptr++ << 0; in DEF_IE_DECODE()
6501 ie->id.link.slevel = *msg->b_rptr++; in DEF_IE_DECODE()
6502 (void)memcpy(ie->id.link.sid, msg->b_rptr, 21); in DEF_IE_DECODE()
6503 msg->b_rptr += 21; in DEF_IE_DECODE()
6511 ie->cause = *msg->b_rptr++; in DEF_IE_DECODE()
6518 ie->diag.top.dir = *msg->b_rptr++; in DEF_IE_DECODE()
6519 ie->diag.top.port = *msg->b_rptr++ << 24; in DEF_IE_DECODE()
6520 ie->diag.top.port |= *msg->b_rptr++ << 16; in DEF_IE_DECODE()
6521 ie->diag.top.port |= *msg->b_rptr++ << 8; in DEF_IE_DECODE()
6522 ie->diag.top.port |= *msg->b_rptr++ << 0; in DEF_IE_DECODE()
6523 ie->diag.top.avcr = *msg->b_rptr++ << 24; in DEF_IE_DECODE()
6524 ie->diag.top.avcr |= *msg->b_rptr++ << 16; in DEF_IE_DECODE()
6525 ie->diag.top.avcr |= *msg->b_rptr++ << 8; in DEF_IE_DECODE()
6526 ie->diag.top.avcr |= *msg->b_rptr++ << 0; in DEF_IE_DECODE()
6530 ie->diag.top.crm = *msg->b_rptr++ << 24; in DEF_IE_DECODE()
6531 ie->diag.top.crm |= *msg->b_rptr++ << 16; in DEF_IE_DECODE()
6532 ie->diag.top.crm |= *msg->b_rptr++ << 8; in DEF_IE_DECODE()
6533 ie->diag.top.crm |= *msg->b_rptr++ << 0; in DEF_IE_DECODE()
6534 ie->diag.top.vf = *msg->b_rptr++ << 24; in DEF_IE_DECODE()
6535 ie->diag.top.vf |= *msg->b_rptr++ << 16; in DEF_IE_DECODE()
6536 ie->diag.top.vf |= *msg->b_rptr++ << 8; in DEF_IE_DECODE()
6537 ie->diag.top.vf |= *msg->b_rptr++ << 0; in DEF_IE_DECODE()
6546 ie->diag.qos.ctd = *msg->b_rptr >> 3; in DEF_IE_DECODE()
6547 ie->diag.qos.cdv = *msg->b_rptr >> 2; in DEF_IE_DECODE()
6548 ie->diag.qos.clr = *msg->b_rptr >> 1; in DEF_IE_DECODE()
6549 ie->diag.qos.other = *msg->b_rptr >> 0; in DEF_IE_DECODE()
6620 APP_16BIT(msg, ie->ptr); in DEF_IE_ENCODE()
6623 APP_BYTE(msg, UNI_DTL_LOGNP); in DEF_IE_ENCODE()
6624 APP_BYTE(msg, ie->dtl[i].node_level); in DEF_IE_ENCODE()
6625 APP_BUF(msg, ie->dtl[i].node_id, 21); in DEF_IE_ENCODE()
6626 APP_32BIT(msg, ie->dtl[i].port_id); in DEF_IE_ENCODE()
6629 SET_IE_LEN(msg); in DEF_IE_ENCODE()
6641 ie->ptr = *msg->b_rptr++ << 8; in DEF_IE_DECODE()
6642 ie->ptr |= *msg->b_rptr++; in DEF_IE_DECODE()
6652 if(*msg->b_rptr++ != UNI_DTL_LOGNP) in DEF_IE_DECODE()
6656 ie->dtl[ie->num].node_level = *msg->b_rptr++; in DEF_IE_DECODE()
6659 (void)memcpy(ie->dtl[ie->num].node_id, msg->b_rptr, 21); in DEF_IE_DECODE()
6660 msg->b_rptr += 21; in DEF_IE_DECODE()
6663 ie->dtl[ie->num].port_id = *msg->b_rptr++ << 24; in DEF_IE_DECODE()
6664 ie->dtl[ie->num].port_id |= *msg->b_rptr++ << 16; in DEF_IE_DECODE()
6665 ie->dtl[ie->num].port_id |= *msg->b_rptr++ << 8; in DEF_IE_DECODE()
6666 ie->dtl[ie->num].port_id |= *msg->b_rptr++ << 0; in DEF_IE_DECODE()
6726 APP_BYTE(msg, 0x80 | ie->type); in DEF_IE_ENCODE()
6727 APP_32BIT(msg, ie->callid); in DEF_IE_ENCODE()
6729 SET_IE_LEN(msg); in DEF_IE_ENCODE()
6740 ie->type = *msg->b_rptr++ & 0xf; in DEF_IE_DECODE()
6741 ie->callid = *msg->b_rptr++ << 24; in DEF_IE_DECODE()
6742 ie->callid |= *msg->b_rptr++ << 16; in DEF_IE_DECODE()
6743 ie->callid |= *msg->b_rptr++ << 8; in DEF_IE_DECODE()
6744 ie->callid |= *msg->b_rptr++ << 0; in DEF_IE_DECODE()
6784 APP_BYTE(msg, 0x80 | ie->screen); in DEF_IE_ENCODE()
6786 SET_IE_LEN(msg); in DEF_IE_ENCODE()
6797 ie->screen = *msg->b_rptr++ & 0xf; in DEF_IE_DECODE()
6823 APP_32BIT(msg, ie->seqno); in DEF_IE_ENCODE()
6825 SET_IE_LEN(msg); in DEF_IE_ENCODE()
6836 ie->seqno = *msg->b_rptr++ << 24; in DEF_IE_DECODE()
6837 ie->seqno |= *msg->b_rptr++ << 16; in DEF_IE_DECODE()
6838 ie->seqno |= *msg->b_rptr++ << 8; in DEF_IE_DECODE()
6839 ie->seqno |= *msg->b_rptr++ << 0; in DEF_IE_DECODE()
6932 APP_BYTE(msg, ie->type | 0x80); in DEF_IE_ENCODE()
6933 APP_BYTE(msg, ie->scope); in DEF_IE_ENCODE()
6935 SET_IE_LEN(msg); in DEF_IE_ENCODE()
6945 if((*msg->b_rptr & 0xf0) != 0x80) in DEF_IE_DECODE()
6948 ie->type = *msg->b_rptr++ & 0xf; in DEF_IE_DECODE()
6949 ie->scope = *msg->b_rptr++; in DEF_IE_DECODE()
7066 APP_BYTE(msg, ie->origin); in DEF_IE_ENCODE()
7068 APP_OPT_24BIT(msg, ie->h.present, UNI_EXQOS_FACC_P, in DEF_IE_ENCODE()
7070 APP_OPT_24BIT(msg, ie->h.present, UNI_EXQOS_BACC_P, in DEF_IE_ENCODE()
7072 APP_OPT_24BIT(msg, ie->h.present, UNI_EXQOS_FCUM_P, in DEF_IE_ENCODE()
7074 APP_OPT_24BIT(msg, ie->h.present, UNI_EXQOS_BCUM_P, in DEF_IE_ENCODE()
7077 APP_OPT_BYTE(msg, ie->h.present, UNI_EXQOS_FCLR_P, in DEF_IE_ENCODE()
7079 APP_OPT_BYTE(msg, ie->h.present, UNI_EXQOS_BCLR_P, in DEF_IE_ENCODE()
7082 SET_IE_LEN(msg); in DEF_IE_ENCODE()
7093 ie->origin = *msg->b_rptr++; in DEF_IE_DECODE()
7097 switch(*msg->b_rptr++) { in DEF_IE_DECODE()
7147 APP_BUF(msg, ie->data, ie->len); in DEF_IE_ENCODE()
7149 SET_IE_LEN(msg); in DEF_IE_ENCODE()
7162 (void)memcpy(ie->data, msg->b_rptr, ie->len); in DEF_IE_DECODE()
7163 msg->b_rptr += ie->len; in DEF_IE_DECODE()