Lines Matching full:pdu
328 app->pdu = skb; in mrp_pdu_init()
336 if (skb_tailroom(app->pdu) < sizeof(*endmark)) in mrp_pdu_append_end_mark()
338 endmark = __skb_put(app->pdu, sizeof(*endmark)); in mrp_pdu_append_end_mark()
345 if (!app->pdu) in mrp_pdu_queue()
348 if (mrp_cb(app->pdu)->mh) in mrp_pdu_queue()
352 dev_hard_header(app->pdu, app->dev, ntohs(app->app->pkttype.type), in mrp_pdu_queue()
354 app->pdu->len); in mrp_pdu_queue()
356 skb_queue_tail(&app->queue, app->pdu); in mrp_pdu_queue()
357 app->pdu = NULL; in mrp_pdu_queue()
373 if (mrp_cb(app->pdu)->mh) { in mrp_pdu_append_msg_hdr()
376 mrp_cb(app->pdu)->mh = NULL; in mrp_pdu_append_msg_hdr()
377 mrp_cb(app->pdu)->vah = NULL; in mrp_pdu_append_msg_hdr()
380 if (skb_tailroom(app->pdu) < sizeof(*mh)) in mrp_pdu_append_msg_hdr()
382 mh = __skb_put(app->pdu, sizeof(*mh)); in mrp_pdu_append_msg_hdr()
385 mrp_cb(app->pdu)->mh = mh; in mrp_pdu_append_msg_hdr()
394 if (skb_tailroom(app->pdu) < sizeof(*vah) + attrlen) in mrp_pdu_append_vecattr_hdr()
396 vah = __skb_put(app->pdu, sizeof(*vah) + attrlen); in mrp_pdu_append_vecattr_hdr()
399 mrp_cb(app->pdu)->vah = vah; in mrp_pdu_append_vecattr_hdr()
400 memcpy(mrp_cb(app->pdu)->attrvalue, firstattrvalue, attrlen); in mrp_pdu_append_vecattr_hdr()
412 if (!app->pdu) { in mrp_pdu_append_vecattr_event()
418 /* If there is no Message header in the PDU, or the Message header is in mrp_pdu_append_vecattr_event()
420 * new Message header to the PDU. in mrp_pdu_append_vecattr_event()
422 if (!mrp_cb(app->pdu)->mh || in mrp_pdu_append_vecattr_event()
423 mrp_cb(app->pdu)->mh->attrtype != attr->type || in mrp_pdu_append_vecattr_event()
424 mrp_cb(app->pdu)->mh->attrlen != attr->len) { in mrp_pdu_append_vecattr_event()
429 /* If there is no VectorAttribute header for this Message in the PDU, in mrp_pdu_append_vecattr_event()
431 * attribute's value, add a new VectorAttribute header to the PDU. in mrp_pdu_append_vecattr_event()
433 if (!mrp_cb(app->pdu)->vah || in mrp_pdu_append_vecattr_event()
434 memcmp(mrp_cb(app->pdu)->attrvalue, attr->value, attr->len)) { in mrp_pdu_append_vecattr_event()
439 len = be16_to_cpu(get_unaligned(&mrp_cb(app->pdu)->vah->lenflags)); in mrp_pdu_append_vecattr_event()
442 /* Events are packed into Vectors in the PDU, three to a byte. Add a in mrp_pdu_append_vecattr_event()
446 if (skb_tailroom(app->pdu) < sizeof(u8)) in mrp_pdu_append_vecattr_event()
448 vaevents = __skb_put(app->pdu, sizeof(u8)); in mrp_pdu_append_vecattr_event()
450 vaevents = (u8 *)(skb_tail_pointer(app->pdu) - sizeof(u8)); in mrp_pdu_append_vecattr_event()
468 /* Increment the length of the VectorAttribute in the PDU, as well as in mrp_pdu_append_vecattr_event()
471 put_unaligned(cpu_to_be16(++len), &mrp_cb(app->pdu)->vah->lenflags); in mrp_pdu_append_vecattr_event()
472 mrp_attrvalue_inc(mrp_cb(app->pdu)->attrvalue, attr->len); in mrp_pdu_append_vecattr_event()
706 /* The VectorAttribute structure in a PDU carries event information in mrp_pdu_parse_vecattr()