13deb3ec6SMatthias Ringwald /* 23deb3ec6SMatthias Ringwald * Copyright (C) 2014 BlueKitchen GmbH 33deb3ec6SMatthias Ringwald * 43deb3ec6SMatthias Ringwald * Redistribution and use in source and binary forms, with or without 53deb3ec6SMatthias Ringwald * modification, are permitted provided that the following conditions 63deb3ec6SMatthias Ringwald * are met: 73deb3ec6SMatthias Ringwald * 83deb3ec6SMatthias Ringwald * 1. Redistributions of source code must retain the above copyright 93deb3ec6SMatthias Ringwald * notice, this list of conditions and the following disclaimer. 103deb3ec6SMatthias Ringwald * 2. Redistributions in binary form must reproduce the above copyright 113deb3ec6SMatthias Ringwald * notice, this list of conditions and the following disclaimer in the 123deb3ec6SMatthias Ringwald * documentation and/or other materials provided with the distribution. 133deb3ec6SMatthias Ringwald * 3. Neither the name of the copyright holders nor the names of 143deb3ec6SMatthias Ringwald * contributors may be used to endorse or promote products derived 153deb3ec6SMatthias Ringwald * from this software without specific prior written permission. 163deb3ec6SMatthias Ringwald * 4. Any redistribution, use, or modification is done solely for 173deb3ec6SMatthias Ringwald * personal benefit and not for any commercial purpose or for 183deb3ec6SMatthias Ringwald * monetary gain. 193deb3ec6SMatthias Ringwald * 203deb3ec6SMatthias Ringwald * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS 213deb3ec6SMatthias Ringwald * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 223deb3ec6SMatthias Ringwald * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23*2fca4dadSMilanka Ringwald * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BLUEKITCHEN 24*2fca4dadSMilanka Ringwald * GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 253deb3ec6SMatthias Ringwald * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 263deb3ec6SMatthias Ringwald * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 273deb3ec6SMatthias Ringwald * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 283deb3ec6SMatthias Ringwald * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 293deb3ec6SMatthias Ringwald * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 303deb3ec6SMatthias Ringwald * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 313deb3ec6SMatthias Ringwald * SUCH DAMAGE. 323deb3ec6SMatthias Ringwald * 333deb3ec6SMatthias Ringwald * Please inquire about commercial licensing options at 343deb3ec6SMatthias Ringwald * [email protected] 353deb3ec6SMatthias Ringwald * 363deb3ec6SMatthias Ringwald */ 373deb3ec6SMatthias Ringwald 38fe5a6c4eSMilanka Ringwald 39fe5a6c4eSMilanka Ringwald /** 40fe5a6c4eSMilanka Ringwald * @title Personal Area Network (PAN) 413deb3ec6SMatthias Ringwald * 423deb3ec6SMatthias Ringwald */ 433deb3ec6SMatthias Ringwald 4480e33422SMatthias Ringwald #ifndef PAN_H 4580e33422SMatthias Ringwald #define PAN_H 463deb3ec6SMatthias Ringwald 473deb3ec6SMatthias Ringwald #include <stdint.h> 4819076cb8SMatthias Ringwald #include "bluetooth.h" 493deb3ec6SMatthias Ringwald 503deb3ec6SMatthias Ringwald #if defined __cplusplus 513deb3ec6SMatthias Ringwald extern "C" { 523deb3ec6SMatthias Ringwald #endif 533deb3ec6SMatthias Ringwald 543deb3ec6SMatthias Ringwald /* API_START */ 553deb3ec6SMatthias Ringwald 563deb3ec6SMatthias Ringwald /** 573deb3ec6SMatthias Ringwald * @brief Creates SDP record for PANU BNEP service in provided empty buffer. 583deb3ec6SMatthias Ringwald * @note Make sure the buffer is big enough. 593deb3ec6SMatthias Ringwald * 603deb3ec6SMatthias Ringwald * @param service is an empty buffer to store service record 61106e8b67SMatthias Ringwald * @param service_record_handle for new service 623deb3ec6SMatthias Ringwald * @param network_packet_types array of types terminated by a 0x0000 entry 633deb3ec6SMatthias Ringwald * @param name if NULL, the default service name will be assigned 643deb3ec6SMatthias Ringwald * @param description if NULL, the default service description will be assigned 653deb3ec6SMatthias Ringwald * @param security_desc 663deb3ec6SMatthias Ringwald */ 67a3bf6c7bSMatthias Ringwald void pan_create_panu_sdp_record(uint8_t *service, uint32_t service_record_handle, uint16_t * network_packet_types, const char *name, 683deb3ec6SMatthias Ringwald const char *description, security_description_t security_desc); 693deb3ec6SMatthias Ringwald 703deb3ec6SMatthias Ringwald /** 713deb3ec6SMatthias Ringwald * @brief Creates SDP record for GN BNEP service in provided empty buffer. 723deb3ec6SMatthias Ringwald * @note Make sure the buffer is big enough. 733deb3ec6SMatthias Ringwald * 743deb3ec6SMatthias Ringwald * @param service is an empty buffer to store service record 75106e8b67SMatthias Ringwald * @param service_record_handle for new service 763deb3ec6SMatthias Ringwald * @param network_packet_types array of types terminated by a 0x0000 entry 773deb3ec6SMatthias Ringwald * @param name if NULL, the default service name will be assigned 783deb3ec6SMatthias Ringwald * @param description if NULL, the default service description will be assigned 793deb3ec6SMatthias Ringwald * @param security_desc 803deb3ec6SMatthias Ringwald * @param IPv4Subnet is optional subnet definition, e.g. "10.0.0.0/8" 813deb3ec6SMatthias Ringwald * @param IPv6Subnet is optional subnet definition given in the standard IETF format with the absolute attribute IDs 823deb3ec6SMatthias Ringwald */ 830b91a77fSMatthias Ringwald void pan_create_gn_sdp_record(uint8_t *service, uint32_t service_record_handle, uint16_t * network_packet_types, const char *name, 843deb3ec6SMatthias Ringwald const char *description, security_description_t security_desc, const char *IPv4Subnet, 853deb3ec6SMatthias Ringwald const char *IPv6Subnet); 863deb3ec6SMatthias Ringwald 873deb3ec6SMatthias Ringwald /** 883deb3ec6SMatthias Ringwald * @brief Creates SDP record for NAP BNEP service in provided empty buffer. 893deb3ec6SMatthias Ringwald * @note Make sure the buffer is big enough. 903deb3ec6SMatthias Ringwald * 913deb3ec6SMatthias Ringwald * @param service is an empty buffer to store service record 92106e8b67SMatthias Ringwald * @param service_record_handle for new service 933deb3ec6SMatthias Ringwald * @param name if NULL, the default service name will be assigned 943deb3ec6SMatthias Ringwald * @param network_packet_types array of types terminated by a 0x0000 entry 953deb3ec6SMatthias Ringwald * @param description if NULL, the default service description will be assigned 963deb3ec6SMatthias Ringwald * @param security_desc 973deb3ec6SMatthias Ringwald * @param net_access_type type of available network access 983deb3ec6SMatthias Ringwald * @param max_net_access_rate based on net_access_type measured in byte/s 993deb3ec6SMatthias Ringwald * @param IPv4Subnet is optional subnet definition, e.g. "10.0.0.0/8" 1003deb3ec6SMatthias Ringwald * @param IPv6Subnet is optional subnet definition given in the standard IETF format with the absolute attribute IDs 1013deb3ec6SMatthias Ringwald */ 102a3bf6c7bSMatthias Ringwald void pan_create_nap_sdp_record(uint8_t *service, uint32_t service_record_handle, uint16_t * network_packet_types, const char *name, 1033deb3ec6SMatthias Ringwald const char *description, security_description_t security_desc, net_access_type_t net_access_type, 1043deb3ec6SMatthias Ringwald uint32_t max_net_access_rate, const char *IPv4Subnet, const char *IPv6Subnet); 1053deb3ec6SMatthias Ringwald 1063deb3ec6SMatthias Ringwald /* API_END */ 1073deb3ec6SMatthias Ringwald 1083deb3ec6SMatthias Ringwald #if defined __cplusplus 1093deb3ec6SMatthias Ringwald } 1103deb3ec6SMatthias Ringwald #endif 11180e33422SMatthias Ringwald #endif // PAN_H 112