Lines Matching refs:msg

44 uni_decode_head(struct uni_msg *msg, struct uni_all *out,  in uni_decode_head()  argument
52 if(uni_msg_len(msg) < 9) in uni_decode_head()
55 if(*msg->b_rptr++ != PNNI_PROTO) in uni_decode_head()
58 if(*msg->b_rptr++ != UNI_PROTO) in uni_decode_head()
61 if(*msg->b_rptr++ != 3) in uni_decode_head()
64 out->u.hdr.cref.flag = (*msg->b_rptr & 0x80) ? 1 : 0; in uni_decode_head()
65 out->u.hdr.cref.cref = (*msg->b_rptr++ & 0x7f) << 16; in uni_decode_head()
66 out->u.hdr.cref.cref |= *msg->b_rptr++ << 8; in uni_decode_head()
67 out->u.hdr.cref.cref |= *msg->b_rptr++; in uni_decode_head()
69 out->mtype = *msg->b_rptr++; in uni_decode_head()
74 switch(*msg->b_rptr & 0x13) { in uni_decode_head()
81 out->u.hdr.act = *msg->b_rptr & 0x3; in uni_decode_head()
88 if(cx->pnni && (*msg->b_rptr & 0x08)) in uni_decode_head()
93 msg->b_rptr++; in uni_decode_head()
95 mlen = *msg->b_rptr++ << 8; in uni_decode_head()
96 mlen |= *msg->b_rptr++; in uni_decode_head()
104 if(uni_msg_len(msg) > mlen) in uni_decode_head()
105 msg->b_wptr = msg->b_rptr + mlen; in uni_decode_head()
112 uni_decode_body_internal(enum uni_msgtype mtype, struct uni_msg *msg, in uni_decode_body_internal() argument
125 while (uni_msg_len(msg) != 0) { in uni_decode_body_internal()
126 if (uni_decode_ie_hdr(&ietype, &hdr, msg, cx, &ielen)) { in uni_decode_body_internal()
144 if (ielen > uni_msg_len(msg)) in uni_decode_body_internal()
145 msg->b_rptr = msg->b_wptr; in uni_decode_body_internal()
147 msg->b_rptr += ielen; in uni_decode_body_internal()
155 if (ielen > iedecl->maxlen - 4 || ielen > uni_msg_len(msg)) { in uni_decode_body_internal()
170 if (ielen > uni_msg_len(msg)) in uni_decode_body_internal()
171 ielen = uni_msg_len(msg); in uni_decode_body_internal()
184 end = msg->b_rptr + ielen; in uni_decode_body_internal()
185 ret = uni_msgtable[mtype]->decode(out, msg, ietype, in uni_decode_body_internal()
187 msg->b_rptr = end; in uni_decode_body_internal()
231 uni_decode_body(struct uni_msg *msg, struct uni_all *out, struct unicx *cx) in uni_decode_body() argument
238 return (uni_decode_body_internal(out->mtype, msg, &out->u, cx)); in uni_decode_body()
246 uni_decode(struct uni_msg *msg, struct uni_all *out, struct unicx *cx) in uni_decode() argument
249 if (uni_decode_head(msg, out, cx)) in uni_decode()
251 if (uni_decode_body(msg, out, cx)) in uni_decode()
257 uni_encode(struct uni_msg *msg, struct uni_all *in, struct unicx *cx) in uni_encode() argument
264 return ((uni_msgtable[in->mtype]->encode)(msg, &in->u, cx)); in uni_encode()