1187938Semax/* $NetBSD: bnep.h,v 1.1 2008/08/17 13:20:57 plunky Exp $ */ 2187938Semax 3187938Semax/*- 4187938Semax * Copyright (c) 2008 Iain Hibbert 5187938Semax * All rights reserved. 6187938Semax * 7187938Semax * Redistribution and use in source and binary forms, with or without 8187938Semax * modification, are permitted provided that the following conditions 9187938Semax * are met: 10187938Semax * 1. Redistributions of source code must retain the above copyright 11187938Semax * notice, this list of conditions and the following disclaimer. 12187938Semax * 2. Redistributions in binary form must reproduce the above copyright 13187938Semax * notice, this list of conditions and the following disclaimer in the 14187938Semax * documentation and/or other materials provided with the distribution. 15187938Semax * 16187938Semax * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17187938Semax * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18187938Semax * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19187938Semax * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20187938Semax * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21187938Semax * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22187938Semax * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23187938Semax * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24187938Semax * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25187938Semax * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26187938Semax */ 27187938Semax 28187938Semax/* $FreeBSD: releng/10.2/usr.sbin/bluetooth/btpand/bnep.h 187938 2009-01-30 22:23:21Z emax $ */ 29187938Semax 30187938Semax/* 31187938Semax * Constants defined in the Bluetooth Network Encapsulation 32187938Semax * Protocol (BNEP) specification v1.0 33187938Semax */ 34187938Semax 35187938Semax#define BNEP_MTU_MIN 1691 36187938Semax 37187938Semax#define BNEP_EXT 0x80 38187938Semax#define BNEP_TYPE(x) ((x) & 0x7f) 39187938Semax#define BNEP_TYPE_EXT(x) (((x) & BNEP_EXT) == BNEP_EXT) 40187938Semax 41187938Semax/* BNEP packet types */ 42187938Semax#define BNEP_GENERAL_ETHERNET 0x00 43187938Semax#define BNEP_CONTROL 0x01 44187938Semax#define BNEP_COMPRESSED_ETHERNET 0x02 45187938Semax#define BNEP_COMPRESSED_ETHERNET_SRC_ONLY 0x03 46187938Semax#define BNEP_COMPRESSED_ETHERNET_DST_ONLY 0x04 47187938Semax 48187938Semax/* BNEP extension header types */ 49187938Semax#define BNEP_EXTENSION_CONTROL 0x00 50187938Semax 51187938Semax/* BNEP control types */ 52187938Semax#define BNEP_CONTROL_COMMAND_NOT_UNDERSTOOD 0x00 53187938Semax#define BNEP_SETUP_CONNECTION_REQUEST 0x01 54187938Semax#define BNEP_SETUP_CONNECTION_RESPONSE 0x02 55187938Semax#define BNEP_FILTER_NET_TYPE_SET 0x03 56187938Semax#define BNEP_FILTER_NET_TYPE_RESPONSE 0x04 57187938Semax#define BNEP_FILTER_MULTI_ADDR_SET 0x05 58187938Semax#define BNEP_FILTER_MULTI_ADDR_RESPONSE 0x06 59187938Semax 60187938Semax/* BNEP setup response codes */ 61187938Semax#define BNEP_SETUP_SUCCESS 0x0000 62187938Semax#define BNEP_SETUP_INVALID_SRC_UUID 0x0001 63187938Semax#define BNEP_SETUP_INVALID_DST_UUID 0x0002 64187938Semax#define BNEP_SETUP_INVALID_UUID_SIZE 0x0003 65187938Semax#define BNEP_SETUP_NOT_ALLOWED 0x0004 66187938Semax 67187938Semax/* BNEP filter return codes */ 68187938Semax#define BNEP_FILTER_SUCCESS 0x0000 69187938Semax#define BNEP_FILTER_UNSUPPORTED_REQUEST 0x0001 70187938Semax#define BNEP_FILTER_INVALID_RANGE 0x0002 71187938Semax#define BNEP_FILTER_TOO_MANY_FILTERS 0x0003 72187938Semax#define BNEP_FILTER_SECURITY_FAILURE 0x0004 73