coap_subscribe_internal.h
Go to the documentation of this file.
/*
* coap_subscribe_internal.h -- Structures, Enums & Functions that are not
* exposed to application programming
*
* Copyright (C) 2010-2019 Olaf Bergmann <bergmann@tzi.org>
*
* This file is part of the CoAP library libcoap. Please see README for terms
* of use.
*/
#ifndef COAP_SUBSCRIBE_INTERNAL_H_
#define COAP_SUBSCRIBE_INTERNAL_H_
#ifndef COAP_OBS_MAX_NON
#define COAP_OBS_MAX_NON 5
#endif /* COAP_OBS_MAX_NON */
#ifndef COAP_OBS_MAX_FAIL
#define COAP_OBS_MAX_FAIL 3
#endif /* COAP_OBS_MAX_FAIL */
struct coap_subscription_t {
struct coap_subscription_t *next;
struct coap_session_t *session;
unsigned int non_cnt:4;
unsigned int fail_cnt:2;
unsigned int dirty:1;
unsigned int has_block2:1;
uint16_t tid;
coap_block_t block2;
size_t token_length;
unsigned char token[8];
struct coap_string_t *query;
};
void coap_subscription_init(coap_subscription_t *);
#endif /* COAP_SUBSCRIBE_INTERNAL_H_ */
coap_session_t
Definition: coap_session.h:59
coap_subscription_t::session
struct coap_session_t * session
subscriber session
Definition: coap_subscribe_internal.h:46
coap_subscription_t::next
struct coap_subscription_t * next
next element in linked list
Definition: coap_subscribe_internal.h:45
coap_subscription_init
void coap_subscription_init(coap_subscription_t *)
Definition: subscribe.c:13
coap_string_t
Coap string data definition.
Definition: str.h:25
coap_subscription_t::token_length
size_t token_length
actual length of token
Definition: coap_subscribe_internal.h:56
coap_subscription_t::query
struct coap_string_t * query
query string used for subscription, if any
Definition: coap_subscribe_internal.h:58
coap_subscription_t::non_cnt
unsigned int non_cnt
up to 15 non-confirmable notifies allowed
Definition: coap_subscribe_internal.h:48
coap_subscription_t::tid
uint16_t tid
transaction id, if any, in regular host byte order
Definition: coap_subscribe_internal.h:54
coap_subscription_t::block2
coap_block_t block2
GET request Block2 definition.
Definition: coap_subscribe_internal.h:55
coap_subscription_t
Subscriber information.
Definition: coap_subscribe_internal.h:44
coap_block_t
Structure of Block options.
Definition: block.h:36
coap_subscription_t::dirty
unsigned int dirty
set if the notification temporarily could not be sent (in that case, the resource&#39;s partially dirty f...
Definition: coap_subscribe_internal.h:50
coap_subscription_t::has_block2
unsigned int has_block2
GET request had Block2 definition.
Definition: coap_subscribe_internal.h:53
coap_subscription_t::fail_cnt
unsigned int fail_cnt
up to 3 confirmable notifies can fail
Definition: coap_subscribe_internal.h:49
coap_subscription_t::token
unsigned char token[8]
token used for subscription
Definition: coap_subscribe_internal.h:57