Lines Matching refs:msg
35 otMessage *msg; in coap_req_send() local
50 msg = otCoapNewMessage(ot, NULL); in coap_req_send()
51 if (!msg) { in coap_req_send()
56 otCoapMessageInit(msg, OT_COAP_TYPE_CONFIRMABLE, code); in coap_req_send()
58 err = otCoapMessageAppendUriPathOptions(msg, uri); in coap_req_send()
65 err = otCoapMessageSetPayloadMarker(msg); in coap_req_send()
72 err = otMessageAppend(msg, buf, len); in coap_req_send()
79 err = otCoapSendRequest(ot, msg, &msg_info, handler, ctx); in coap_req_send()
89 otMessageFree(msg); in coap_req_send()
187 int coap_req_handler(void *ctx, otMessage *msg, const otMessageInfo *msg_info, in coap_req_handler() argument
190 otCoapCode msg_code = otCoapMessageGetCode(msg); in coap_req_handler()
191 otCoapType msg_type = otCoapMessageGetType(msg); in coap_req_handler()
199 int len = otMessageGetLength(msg) - otMessageGetOffset(msg); in coap_req_handler()
201 otMessageRead(msg, otMessageGetOffset(msg), coap_buf, len); in coap_req_handler()
208 ret = get_fn(ctx, msg, msg_info); in coap_req_handler()
215 return get_fn(ctx, msg, msg_info); in coap_req_handler()
244 int coap_get_data(otMessage *msg, void *buf, int *len) in coap_get_data() argument
246 int coap_len = otMessageGetLength(msg) - otMessageGetOffset(msg); in coap_get_data()
253 otMessageRead(msg, otMessageGetOffset(msg), buf, coap_len); in coap_get_data()