linux/net/bluetooth/bnep/bnep.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
  BNEP protocol definition for Linux Bluetooth stack (BlueZ).
  Copyright (C) 2002 Maxim Krasnyansky <[email protected]>

*/

#ifndef _BNEP_H
#define _BNEP_H

#include <linux/types.h>
#include <linux/crc32.h>
#include <net/bluetooth/bluetooth.h>

/* Limits */
#define BNEP_MAX_PROTO_FILTERS
#define BNEP_MAX_MULTICAST_FILTERS

/* UUIDs */
#define BNEP_BASE_UUID
#define BNEP_UUID16
#define BNEP_UUID32
#define BNEP_UUID128

#define BNEP_SVC_PANU
#define BNEP_SVC_NAP
#define BNEP_SVC_GN

/* Packet types */
#define BNEP_GENERAL
#define BNEP_CONTROL
#define BNEP_COMPRESSED
#define BNEP_COMPRESSED_SRC_ONLY
#define BNEP_COMPRESSED_DST_ONLY

/* Control types */
#define BNEP_CMD_NOT_UNDERSTOOD
#define BNEP_SETUP_CONN_REQ
#define BNEP_SETUP_CONN_RSP
#define BNEP_FILTER_NET_TYPE_SET
#define BNEP_FILTER_NET_TYPE_RSP
#define BNEP_FILTER_MULTI_ADDR_SET
#define BNEP_FILTER_MULTI_ADDR_RSP

/* Extension types */
#define BNEP_EXT_CONTROL

/* Response messages */
#define BNEP_SUCCESS

#define BNEP_CONN_INVALID_DST
#define BNEP_CONN_INVALID_SRC
#define BNEP_CONN_INVALID_SVC
#define BNEP_CONN_NOT_ALLOWED

#define BNEP_FILTER_UNSUPPORTED_REQ
#define BNEP_FILTER_INVALID_RANGE
#define BNEP_FILTER_INVALID_MCADDR
#define BNEP_FILTER_LIMIT_REACHED
#define BNEP_FILTER_DENIED_SECURITY

/* L2CAP settings */
#define BNEP_MTU
#define BNEP_PSM
#define BNEP_FLUSH_TO
#define BNEP_CONNECT_TO
#define BNEP_FILTER_TO

/* Headers */
#define BNEP_TYPE_MASK
#define BNEP_EXT_HEADER

struct bnep_setup_conn_req {} __packed;

struct bnep_set_filter_req {} __packed;

struct bnep_control_rsp {} __packed;

struct bnep_ext_hdr {} __packed;

/* BNEP ioctl defines */
#define BNEPCONNADD
#define BNEPCONNDEL
#define BNEPGETCONNLIST
#define BNEPGETCONNINFO
#define BNEPGETSUPPFEAT

#define BNEP_SETUP_RESPONSE
#define BNEP_SETUP_RSP_SENT

struct bnep_connadd_req {};

struct bnep_conndel_req {};

struct bnep_conninfo {};

struct bnep_connlist_req {};

struct bnep_proto_filter {};

int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock);
int bnep_del_connection(struct bnep_conndel_req *req);
int bnep_get_connlist(struct bnep_connlist_req *req);
int bnep_get_conninfo(struct bnep_conninfo *ci);

/* BNEP sessions */
struct bnep_session {};

void bnep_net_setup(struct net_device *dev);
int bnep_sock_init(void);
void bnep_sock_cleanup(void);

static inline int bnep_mc_hash(__u8 *addr)
{}

#endif