Lines Matching refs:pdu
27 coap_pdu_t *pdu; in make_pdu() local
32 if ( ! ( pdu = coap_new_pdu() ) ) in make_pdu()
35 pdu->hdr->type = COAP_MESSAGE_NON; in make_pdu()
36 pdu->hdr->code = COAP_REQUEST_POST; in make_pdu()
37 pdu->hdr->id = htons(id++); in make_pdu()
40 coap_add_data( pdu, 1, &enc); in make_pdu()
44 coap_add_data( pdu, len, buf ); in make_pdu()
47 return pdu; in make_pdu()
103 coap_pdu_t *pdu; in main() local
134 if (! (pdu = make_pdu( rand() & 0xfff ) ) ) in main()
137 coap_send( ctx, (struct sockaddr *)&dst, sizeof(dst), pdu ); in main()
138 coap_delete_pdu(pdu); in main()