Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-client-c by
sn_coap_header_internal.h
00001 /* 00002 * Copyright (c) 2011-2015 ARM Limited. All rights reserved. 00003 * SPDX-License-Identifier: Apache-2.0 00004 * Licensed under the Apache License, Version 2.0 (the License); you may 00005 * not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an AS IS BASIS, WITHOUT 00012 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 /** 00018 * \file sn_coap_header_internal.h 00019 * 00020 * \brief Header file for CoAP Header part 00021 * 00022 */ 00023 00024 #ifdef __cplusplus 00025 extern "C" { 00026 #endif 00027 00028 #ifndef SN_COAP_HEADER_INTERNAL_H_ 00029 #define SN_COAP_HEADER_INTERNAL_H_ 00030 00031 00032 /* * * * * * * * * * * */ 00033 /* * * * DEFINES * * * */ 00034 /* * * * * * * * * * * */ 00035 00036 #define COAP_VERSION COAP_VERSION_1 /* Tells which IETF CoAP specification version the CoAP message supports. */ 00037 /* This value is written to CoAP message header part. */ 00038 00039 /* CoAP Header defines */ 00040 #define COAP_HEADER_LENGTH 4 /* Fixed Header length of CoAP message as bytes */ 00041 #define COAP_HEADER_VERSION_MASK 0xC0 00042 #define COAP_HEADER_MSG_TYPE_MASK 0x30 00043 #define COAP_HEADER_TOKEN_LENGTH_MASK 0x0F 00044 #define COAP_HEADER_MSG_ID_MSB_SHIFT 8 00045 00046 /* CoAP Options defines */ 00047 #define COAP_OPTIONS_OPTION_NUMBER_SHIFT 4 00048 00049 /* * * * * * * * * * * * * * */ 00050 /* * * * ENUMERATIONS * * * */ 00051 /* * * * * * * * * * * * * * */ 00052 00053 /* * * * * * * * * * * * * */ 00054 /* * * * STRUCTURES * * * */ 00055 /* * * * * * * * * * * * * */ 00056 00057 /** 00058 * \brief This structure is returned by sn_coap_exec() for sending 00059 */ 00060 typedef struct sn_nsdl_transmit_ { 00061 sn_nsdl_addr_s *dst_addr_ptr; 00062 00063 sn_nsdl_capab_e protocol; 00064 00065 uint16_t packet_len; 00066 uint8_t *packet_ptr; 00067 uint8_t *uri_path_ptr; 00068 uint8_t uri_path_len; 00069 } sn_nsdl_transmit_s; 00070 00071 /* * * * * * * * * * * * * * * * * * * * * * */ 00072 /* * * * EXTERNAL FUNCTION PROTOTYPES * * * */ 00073 /* * * * * * * * * * * * * * * * * * * * * * */ 00074 extern int8_t sn_coap_header_validity_check(sn_coap_hdr_s *src_coap_msg_ptr, coap_version_e coap_version); 00075 00076 #endif /* SN_COAP_HEADER_INTERNAL_H_ */ 00077 00078 #ifdef __cplusplus 00079 } 00080 #endif
Generated on Wed Jul 13 2022 17:43:56 by
1.7.2
