Lines Matching refs:session
13 * @brief Defines the application visible session information
21 * @defgroup session Sessions
47 COAP_SESSION_TYPE_HELLO, /**< server-side ephemeral session for
63 * Increment reference counter on a session.
65 * @param session The CoAP session.
66 * @return same as session
68 coap_session_t *coap_session_reference(coap_session_t *session);
71 * Decrement reference counter on a session.
72 * Note that the session may be deleted as a result and should not be used
75 * @param session The CoAP session.
77 void coap_session_release(coap_session_t *session);
80 * Notify session that it has failed. This cleans up any outstanding / queued
83 * @param session The CoAP session.
84 * @param reason The reason why the session was disconnected.
86 void coap_session_disconnected(coap_session_t *session,
90 * Stores @p data with the given session. This function overwrites any value
91 * that has previously been stored with @p session.
93 * @param session The CoAP session.
96 void coap_session_set_app_data(coap_session_t *session, void *data);
100 * session using the function coap_session_set_app_data(). This function will
103 * @param session The CoAP session.
107 void *coap_session_get_app_data(const coap_session_t *session);
110 * Get the remote IP address and port from the session.
116 * @param session The CoAP session.
118 * @return The session's remote address or @c NULL on failure.
121 const coap_session_t *session);
124 * Get the remote multicast IP address and port from the session if the
129 * @param session The CoAP session.
131 * @return The session's remote multicast address or @c NULL on failure or if
132 * this is not a multicast session.
135 const coap_session_t *session);
138 * Get the local IP address and port from the session.
140 * @param session The CoAP session.
142 * @return The session's local address or @c NULL on failure.
145 const coap_session_t *session);
148 * Get the session protocol type
150 * @param session The CoAP session.
152 * @return The session's protocol type
154 coap_proto_t coap_session_get_proto(const coap_session_t *session);
157 * Get the session type
159 * @param session The CoAP session.
161 * @return The session's type
163 coap_session_type_t coap_session_get_type(const coap_session_t *session);
166 * Get the session state
168 * @param session The CoAP session.
170 * @return The session's state
172 coap_session_state_t coap_session_get_state(const coap_session_t *session);
175 * Get the session if index
177 * @param session The CoAP session.
179 * @return The session's if index, or @c -1 on error.
181 int coap_session_get_ifindex(const coap_session_t *session);
184 * Get the session TLS security ptr (TLS type dependent)
191 * @param session The CoAP session.
194 * @return The session TLS ptr or @c NULL if not set up
196 void *coap_session_get_tls(const coap_session_t *session,
200 * Get the session context
202 * @param session The CoAP session.
204 * @return The session's context
206 coap_context_t *coap_session_get_context(const coap_session_t *session);
209 * Set the session type to client. Typically used in a call-home server.
210 * The session needs to be of type COAP_SESSION_TYPE_SERVER.
211 * Note: If this function is successful, the session reference count is
213 * reference count to 0 will cause the session to be freed off.
215 * @param session The CoAP session.
219 int coap_session_set_type_client(coap_session_t *session);
222 * Set the session MTU. This is the maximum message size that can be sent,
225 * @param session The CoAP session.
228 void coap_session_set_mtu(coap_session_t *session, unsigned mtu);
233 * @param session The CoAP session.
236 size_t coap_session_max_pdu_size(const coap_session_t *session);
239 * Creates a new client session to the designated server.
245 * @return A new CoAP session or NULL if failed. Call coap_session_release to free.
255 * Creates a new client session to the designated server with PSK credentials
267 * @return A new CoAP session or NULL if failed. Call coap_session_release to free.
280 * Creates a new client session to the designated server with PSK credentials
291 * @return A new CoAP session or NULL if failed. Call coap_session_release()
303 * Get the server session's current Identity Hint (PSK).
305 * @param session The current coap_session_t object.
310 const coap_session_t *session);
313 * Get the server session's current PSK identity (PSK).
315 * @param session The current coap_session_t object.
320 const coap_session_t *session);
322 * Get the session's current pre-shared key (PSK).
324 * @param session The current coap_session_t object.
329 const coap_session_t *session);
332 * Creates a new client session to the designated server with PKI credentials
343 * @return A new CoAP session or NULL if failed. Call coap_session_release()
357 * @param session The current coap_session_t object.
362 void coap_session_init_token(coap_session_t *session, size_t length,
368 * @param session The current coap_session_t object.
373 void coap_session_new_token(coap_session_t *session, size_t *length,
378 * Get session description.
380 * @param session The CoAP session.
383 const char *coap_session_str(const coap_session_t *session);
417 * Get the session associated with the specified @p remote_addr and @p index.
423 * @return The found session or @c NULL if not found.
551 * @param session The CoAP session.
555 void coap_session_set_ack_timeout(coap_session_t *session,
565 * @param session The CoAP session.
569 coap_fixed_point_t coap_session_get_ack_timeout(const coap_session_t *session);
578 * @param session The CoAP session.
582 void coap_session_set_ack_random_factor(coap_session_t *session,
592 * @param session The CoAP session.
597 const coap_session_t *session);
605 * @param session The CoAP session.
609 void coap_session_set_max_retransmit(coap_session_t *session,
618 * @param session The CoAP session.
622 uint16_t coap_session_get_max_retransmit(const coap_session_t *session);
628 * @param session The CoAP session.
632 void coap_session_set_nstart(coap_session_t *session,
639 * @param session The CoAP session.
643 uint16_t coap_session_get_nstart(const coap_session_t *session);
649 * @param session The CoAP session.
653 void coap_session_set_default_leisure(coap_session_t *session,
660 * @param session The CoAP session.
665 const coap_session_t *session);
671 * @param session The CoAP session.
675 void coap_session_set_probing_rate(coap_session_t *session, uint32_t value);
681 * @param session The CoAP session.
685 uint32_t coap_session_get_probing_rate(const coap_session_t *session);
692 * @param session The CoAP session.
696 void coap_session_set_max_payloads(coap_session_t *session,
704 * @param session The CoAP session.
708 uint16_t coap_session_get_max_payloads(const coap_session_t *session);
715 * @param session The CoAP session.
719 void coap_session_set_non_max_retransmit(coap_session_t *session,
727 * @param session The CoAP session.
731 uint16_t coap_session_get_non_max_retransmit(const coap_session_t *session);
740 * @param session The CoAP session.
744 void coap_session_set_non_timeout(coap_session_t *session,
754 * @param session The CoAP session.
758 coap_fixed_point_t coap_session_get_non_timeout(const coap_session_t *session);
766 * @param session The CoAP session.
770 void coap_session_set_non_receive_timeout(coap_session_t *session,
779 * @param session The CoAP session.
784 const coap_session_t *session);
788 * Send a ping message for the session.
789 * @param session The CoAP session.
793 coap_mid_t coap_session_send_ping(coap_session_t *session);
796 * Disable client automatically sending observe cancel on session close
798 * @param session The CoAP session.
800 void coap_session_set_no_observe_cancel(coap_session_t *session);