Updated buffer definition macro due to core changes.
This commit is contained in:
parent
3048126ff1
commit
78e3a75b9c
|
@ -85,8 +85,8 @@
|
||||||
#define COAP_MAX_ATTEMPTS 4
|
#define COAP_MAX_ATTEMPTS 4
|
||||||
#endif /* COAP_MAX_ATTEMPTS */
|
#endif /* COAP_MAX_ATTEMPTS */
|
||||||
|
|
||||||
#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN])
|
#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN])
|
||||||
#define UIP_UDP_BUF ((struct uip_udp_hdr *)&uip_buf[uip_l2_l3_hdr_len])
|
#define UIP_UDP_BUF ((struct uip_udp_hdr *)&uip_buf[UIP_LLH_LEN + UIP_IPH_LEN])
|
||||||
|
|
||||||
#define SET_OPTION(packet, opt) ((packet)->options |= 1<<opt)
|
#define SET_OPTION(packet, opt) ((packet)->options |= 1<<opt)
|
||||||
#define IS_OPTION(packet, opt) ((packet)->options & 1<<opt)
|
#define IS_OPTION(packet, opt) ((packet)->options & 1<<opt)
|
||||||
|
|
|
@ -87,8 +87,8 @@
|
||||||
#define COAP_MAX_ATTEMPTS 4
|
#define COAP_MAX_ATTEMPTS 4
|
||||||
#endif /* COAP_MAX_ATTEMPTS */
|
#endif /* COAP_MAX_ATTEMPTS */
|
||||||
|
|
||||||
#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN])
|
#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN])
|
||||||
#define UIP_UDP_BUF ((struct uip_udp_hdr *)&uip_buf[uip_l2_l3_hdr_len])
|
#define UIP_UDP_BUF ((struct uip_udp_hdr *)&uip_buf[UIP_LLH_LEN + UIP_IPH_LEN])
|
||||||
|
|
||||||
#define SET_OPTION(packet, opt) ((packet)->options |= 1L<<opt)
|
#define SET_OPTION(packet, opt) ((packet)->options |= 1L<<opt)
|
||||||
#define IS_OPTION(packet, opt) ((packet)->options & 1L<<opt)
|
#define IS_OPTION(packet, opt) ((packet)->options & 1L<<opt)
|
||||||
|
|
|
@ -92,8 +92,8 @@
|
||||||
#define COAP_MAX_ATTEMPTS 4
|
#define COAP_MAX_ATTEMPTS 4
|
||||||
#endif /* COAP_MAX_ATTEMPTS */
|
#endif /* COAP_MAX_ATTEMPTS */
|
||||||
|
|
||||||
#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN])
|
#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN])
|
||||||
#define UIP_UDP_BUF ((struct uip_udp_hdr *)&uip_buf[uip_l2_l3_hdr_len])
|
#define UIP_UDP_BUF ((struct uip_udp_hdr *)&uip_buf[UIP_LLH_LEN + UIP_IPH_LEN])
|
||||||
|
|
||||||
/* Bitmap for set options */
|
/* Bitmap for set options */
|
||||||
enum { OPTION_MAP_SIZE = sizeof(uint8_t) * 8 };
|
enum { OPTION_MAP_SIZE = sizeof(uint8_t) * 8 };
|
||||||
|
|
|
@ -36,8 +36,8 @@
|
||||||
* Matthias Kovatsch <kovatsch@inf.ethz.ch>
|
* Matthias Kovatsch <kovatsch@inf.ethz.ch>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef COAP_12_H_
|
#ifndef COAP_13_H_
|
||||||
#define COAP_12_H_
|
#define COAP_13_H_
|
||||||
|
|
||||||
#include <stddef.h> /* for size_t */
|
#include <stddef.h> /* for size_t */
|
||||||
#include "contiki-net.h"
|
#include "contiki-net.h"
|
||||||
|
@ -92,8 +92,8 @@
|
||||||
#define COAP_MAX_ATTEMPTS 4
|
#define COAP_MAX_ATTEMPTS 4
|
||||||
#endif /* COAP_MAX_ATTEMPTS */
|
#endif /* COAP_MAX_ATTEMPTS */
|
||||||
|
|
||||||
#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN])
|
#define UIP_IP_BUF ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN])
|
||||||
#define UIP_UDP_BUF ((struct uip_udp_hdr *)&uip_buf[uip_l2_l3_hdr_len])
|
#define UIP_UDP_BUF ((struct uip_udp_hdr *)&uip_buf[UIP_LLH_LEN + UIP_IPH_LEN])
|
||||||
|
|
||||||
/* Bitmap for set options */
|
/* Bitmap for set options */
|
||||||
enum { OPTION_MAP_SIZE = sizeof(uint8_t) * 8 };
|
enum { OPTION_MAP_SIZE = sizeof(uint8_t) * 8 };
|
||||||
|
@ -379,4 +379,4 @@ int coap_set_header_size(void *packet, uint32_t size);
|
||||||
int coap_get_payload(void *packet, const uint8_t **payload);
|
int coap_get_payload(void *packet, const uint8_t **payload);
|
||||||
int coap_set_payload(void *packet, const void *payload, size_t length);
|
int coap_set_payload(void *packet, const void *payload, size_t length);
|
||||||
|
|
||||||
#endif /* COAP_12_H_ */
|
#endif /* COAP_13_H_ */
|
||||||
|
|
Loading…
Reference in a new issue