socket

package
v0.0.0-...-df6e615 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2021 License: BSD-3-Clause Imports: 4 Imported by: 3

Documentation

Index

Constants

View Source
const (
	BTPROTO_L2CAP  = 0
	BTPROTO_HCI    = 1
	BTPROTO_SCO    = 2
	BTPROTO_RFCOMM = 3
	BTPROTO_BNEP   = 4
	BTPROTO_CMTP   = 5
	BTPROTO_HIDP   = 6
	BTPROTO_AVDTP  = 7
)

Bluetooth Protocols

View Source
const (
	HCI_CHANNEL_RAW     = 0
	HCI_CHANNEL_USER    = 1
	HCI_CHANNEL_MONITOR = 2
	HCI_CHANNEL_CONTROL = 3
)
View Source
const (
	SOL_HCI    = 0
	SOL_L2CAP  = 6
	SOL_SCO    = 17
	SOL_RFCOMM = 18

	SOL_BLUETOOTH = 274
)

Socket Level

View Source
const (
	HCI_DATA_DIR   = 1
	HCI_FILTER     = 2
	HCI_TIME_STAMP = 3
)

HCI Socket options

View Source
const AF_BLUETOOTH = syscall.AF_BLUETOOTH

Variables

View Source
var (
	ErrSocketOpenFailed  = errors.New("unable to open bluetooth socket to device")
	ErrSocketBindTimeout = errors.New("timeout occured binding to bluetooth device")
)

Functions

func Bind

func Bind(fd int, sa Sockaddr) (err error)

func SetsockoptFilter

func SetsockoptFilter(fd int, f *HCIFilter) (err error)

func Socket

func Socket(domain, typ, proto int) (int, error)

Types

type HCIFilter

type HCIFilter struct {
	TypeMask  uint32
	EventMask [2]uint32
	// contains filtered or unexported fields
}

type Sockaddr

type Sockaddr interface {
	// contains filtered or unexported methods
}

type SockaddrHCI

type SockaddrHCI struct {
	Dev     int
	Channel uint16
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL