Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/next/external/cache/sources/hcitools/lib/bluetooth/bnep.h
Views: 3960
/*1*2* BlueZ - Bluetooth protocol stack for Linux3*4* Copyright (C) 2002-2003 Maxim Krasnyansky <[email protected]>5* Copyright (C) 2002-2010 Marcel Holtmann <[email protected]>6*7*8* This program is free software; you can redistribute it and/or modify9* it under the terms of the GNU General Public License as published by10* the Free Software Foundation; either version 2 of the License, or11* (at your option) any later version.12*13* This program is distributed in the hope that it will be useful,14* but WITHOUT ANY WARRANTY; without even the implied warranty of15* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the16* GNU General Public License for more details.17*18* You should have received a copy of the GNU General Public License19* along with this program; if not, write to the Free Software20* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA21*22*/2324#ifndef __BNEP_H25#define __BNEP_H2627#ifdef __cplusplus28extern "C" {29#endif3031#include <bluetooth/bluetooth.h>3233#ifndef ETH_ALEN34#define ETH_ALEN 6 /* from <net/ethernet.h> */35#endif3637/* BNEP UUIDs */38#define BNEP_BASE_UUID 0x0000000000001000800000805F9B34FB39#define BNEP_UUID16 0x0240#define BNEP_UUID32 0x0441#define BNEP_UUID128 0x164243#define BNEP_SVC_PANU 0x111544#define BNEP_SVC_NAP 0x111645#define BNEP_SVC_GN 0x11174647/* BNEP packet types */48#define BNEP_GENERAL 0x0049#define BNEP_CONTROL 0x0150#define BNEP_COMPRESSED 0x0251#define BNEP_COMPRESSED_SRC_ONLY 0x0352#define BNEP_COMPRESSED_DST_ONLY 0x045354/* BNEP control types */55#define BNEP_CMD_NOT_UNDERSTOOD 0x0056#define BNEP_SETUP_CONN_REQ 0x0157#define BNEP_SETUP_CONN_RSP 0x0258#define BNEP_FILTER_NET_TYPE_SET 0x0359#define BNEP_FILTER_NET_TYPE_RSP 0x0460#define BNEP_FILTER_MULT_ADDR_SET 0x0561#define BNEP_FILTER_MULT_ADDR_RSP 0x066263/* BNEP response messages */64#define BNEP_SUCCESS 0x006566#define BNEP_CONN_INVALID_DST 0x0167#define BNEP_CONN_INVALID_SRC 0x0268#define BNEP_CONN_INVALID_SVC 0x0369#define BNEP_CONN_NOT_ALLOWED 0x047071#define BNEP_FILTER_UNSUPPORTED_REQ 0x0172#define BNEP_FILTER_INVALID_RANGE 0x0273#define BNEP_FILTER_INVALID_MCADDR 0x0274#define BNEP_FILTER_LIMIT_REACHED 0x0375#define BNEP_FILTER_DENIED_SECURITY 0x047677/* L2CAP settings */78#define BNEP_MTU 169179#define BNEP_FLUSH_TO 0xffff80#define BNEP_CONNECT_TO 1581#define BNEP_FILTER_TO 158283#ifndef BNEP_PSM84#define BNEP_PSM 0x0f85#endif8687/* BNEP headers */88#define BNEP_TYPE_MASK 0x7f89#define BNEP_EXT_HEADER 0x809091struct bnep_setup_conn_req {92uint8_t type;93uint8_t ctrl;94uint8_t uuid_size;95uint8_t service[0];96} __attribute__((packed));9798struct bnep_set_filter_req {99uint8_t type;100uint8_t ctrl;101uint16_t len;102uint8_t list[0];103} __attribute__((packed));104105struct bnep_control_rsp {106uint8_t type;107uint8_t ctrl;108uint16_t resp;109} __attribute__((packed));110111struct bnep_ext_hdr {112uint8_t type;113uint8_t len;114uint8_t data[0];115} __attribute__((packed));116117/* BNEP ioctl defines */118#define BNEPCONNADD _IOW('B', 200, int)119#define BNEPCONNDEL _IOW('B', 201, int)120#define BNEPGETCONNLIST _IOR('B', 210, int)121#define BNEPGETCONNINFO _IOR('B', 211, int)122123struct bnep_connadd_req {124int sock; /* Connected socket */125uint32_t flags;126uint16_t role;127char device[16]; /* Name of the Ethernet device */128};129130struct bnep_conndel_req {131uint32_t flags;132uint8_t dst[ETH_ALEN];133};134135struct bnep_conninfo {136uint32_t flags;137uint16_t role;138uint16_t state;139uint8_t dst[ETH_ALEN];140char device[16];141};142143struct bnep_connlist_req {144uint32_t cnum;145struct bnep_conninfo *ci;146};147148#ifdef __cplusplus149}150#endif151152#endif /* __BNEP_H */153154155