mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
2751708341
This adds two functions `coap_payload_add()` and `coap_payload_advance()`. - `coap_payload_add()` will add n bytes to the payload buffer and advance payload pointer accordingly. const char hello[] = "Hello CoAP!"; coap_payload_add(pkt, hello, sizeof(hello)); - `coap_payload_advance()` will advance the payload buffer after data has been added to it. int len = snprintf(pkt->payload, pkt->payload_len, "%s %s!", "Hello", "CoAP"); coap_payload_advance(pkt, len); I considered adding an additional parameter to keep track of the total request size (returned size from coap_opt_finish() incremented by each added payload fragment), but decided against it to keep consistency with the existing API. |
||
---|---|---|
.. | ||
bluetil | ||
cord | ||
dhcpv6 | ||
ethernet | ||
fib | ||
gnrc | ||
iana | ||
ipv4 | ||
ipv6 | ||
lorawan | ||
ppp | ||
rpl | ||
sixlowpan | ||
skald | ||
sock | ||
af.h | ||
arp.h | ||
asymcute.h | ||
ble.h | ||
coap.h | ||
credman.h | ||
csma_sender.h | ||
dhcpv6.h | ||
dns.h | ||
dtls.h | ||
eddystone.h | ||
emcute.h | ||
ethernet.h | ||
ethertype.h | ||
eui48.h | ||
eui64.h | ||
fib.h | ||
gcoap.h | ||
gnrc.h | ||
icmp.h | ||
icmpv6.h | ||
ieee802154.h | ||
inet_csum.h | ||
ipv4.h | ||
ipv6.h | ||
l2filter.h | ||
l2util.h | ||
lora.h | ||
loramac.h | ||
mqttsn.h | ||
nanocoap_sock.h | ||
nanocoap.h | ||
ndp.h | ||
netdev_test.h | ||
netif.h | ||
netopt.h | ||
netstats.h | ||
ntp_packet.h | ||
packet.h | ||
ppptype.h | ||
protnum.h | ||
sixlowpan.h | ||
skald.h | ||
sntp.h | ||
sock.h | ||
tcp.h | ||
udp.h | ||
uhcp.h | ||
zep.h |