libcoap  4.3.0beta
coap_subscribe_internal.h
Go to the documentation of this file.
1 /*
2  * coap_subscribe_internal.h -- Structures, Enums & Functions that are not
3  * exposed to application programming
4  *
5  * Copyright (C) 2010-2019 Olaf Bergmann <bergmann@tzi.org>
6  *
7  * This file is part of the CoAP library libcoap. Please see README for terms
8  * of use.
9  */
10 
16 #ifndef COAP_SUBSCRIBE_INTERNAL_H_
17 #define COAP_SUBSCRIBE_INTERNAL_H_
18 
26 #ifndef COAP_OBS_MAX_NON
32 #define COAP_OBS_MAX_NON 5
33 #endif /* COAP_OBS_MAX_NON */
34 
35 #ifndef COAP_OBS_MAX_FAIL
41 #define COAP_OBS_MAX_FAIL 3
42 #endif /* COAP_OBS_MAX_FAIL */
43 
49  unsigned int non_cnt:4;
50  unsigned int fail_cnt:2;
51  unsigned int dirty:1;
54  unsigned int has_block2:1;
56  uint16_t tid;
58  size_t token_length;
59  unsigned char token[8];
60  struct coap_string_t *query;
61 };
62 
64 
67 #endif /* COAP_SUBSCRIBE_INTERNAL_H_ */
void coap_subscription_init(coap_subscription_t *)
Definition: subscribe.c:13
Structure of Block options.
Definition: block.h:33
CoAP string data definition.
Definition: str.h:30
Subscriber information.
coap_block_t block2
request Block2 definition
unsigned char token[8]
token used for subscription
unsigned int has_block2
request had Block2 definition
unsigned int fail_cnt
up to 3 confirmable notifies can fail
unsigned int non_cnt
up to 15 non-confirmable notifies allowed
size_t token_length
actual length of token
struct coap_session_t * session
subscriber session
unsigned int dirty
set if the notification temporarily could not be sent (in that case, the resource's partially dirty f...
struct coap_subscription_t * next
next element in linked list
uint16_t tid
request type code (GET/FETCH)
struct coap_string_t * query
query string used for subscription, if any
unsigned char uint8_t
Definition: uthash.h:79