/* $NetBSD: bnep.h,v 1.1 2008/08/17 13:20:57 plunky Exp $ */12/*-3* SPDX-License-Identifier: BSD-2-Clause4*5* Copyright (c) 2008 Iain Hibbert6* All rights reserved.7*8* Redistribution and use in source and binary forms, with or without9* modification, are permitted provided that the following conditions10* are met:11* 1. Redistributions of source code must retain the above copyright12* notice, this list of conditions and the following disclaimer.13* 2. Redistributions in binary form must reproduce the above copyright14* notice, this list of conditions and the following disclaimer in the15* documentation and/or other materials provided with the distribution.16*17* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR18* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES19* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.20* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,21* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT22* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,23* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY24* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT25* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF26* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.27*/282930/*31* Constants defined in the Bluetooth Network Encapsulation32* Protocol (BNEP) specification v1.033*/3435#define BNEP_MTU_MIN 16913637#define BNEP_EXT 0x8038#define BNEP_TYPE(x) ((x) & 0x7f)39#define BNEP_TYPE_EXT(x) (((x) & BNEP_EXT) == BNEP_EXT)4041/* BNEP packet types */42#define BNEP_GENERAL_ETHERNET 0x0043#define BNEP_CONTROL 0x0144#define BNEP_COMPRESSED_ETHERNET 0x0245#define BNEP_COMPRESSED_ETHERNET_SRC_ONLY 0x0346#define BNEP_COMPRESSED_ETHERNET_DST_ONLY 0x044748/* BNEP extension header types */49#define BNEP_EXTENSION_CONTROL 0x005051/* BNEP control types */52#define BNEP_CONTROL_COMMAND_NOT_UNDERSTOOD 0x0053#define BNEP_SETUP_CONNECTION_REQUEST 0x0154#define BNEP_SETUP_CONNECTION_RESPONSE 0x0255#define BNEP_FILTER_NET_TYPE_SET 0x0356#define BNEP_FILTER_NET_TYPE_RESPONSE 0x0457#define BNEP_FILTER_MULTI_ADDR_SET 0x0558#define BNEP_FILTER_MULTI_ADDR_RESPONSE 0x065960/* BNEP setup response codes */61#define BNEP_SETUP_SUCCESS 0x000062#define BNEP_SETUP_INVALID_SRC_UUID 0x000163#define BNEP_SETUP_INVALID_DST_UUID 0x000264#define BNEP_SETUP_INVALID_UUID_SIZE 0x000365#define BNEP_SETUP_NOT_ALLOWED 0x00046667/* BNEP filter return codes */68#define BNEP_FILTER_SUCCESS 0x000069#define BNEP_FILTER_UNSUPPORTED_REQUEST 0x000170#define BNEP_FILTER_INVALID_RANGE 0x000271#define BNEP_FILTER_TOO_MANY_FILTERS 0x000372#define BNEP_FILTER_SECURITY_FAILURE 0x0004737475