gatt: github.com/bettercap/gatt/linux/socket Index | Files

package socket

import "github.com/bettercap/gatt/linux/socket"

Index

Package Files

socket.go socket_common.go socket_linux.go

Constants

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

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

    SOL_BLUETOOTH = 274
)

Socket Level

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

HCI Socket options

const AF_BLUETOOTH = syscall.AF_BLUETOOTH

Variables

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

func Bind Uses

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

func SetsockoptFilter Uses

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

func Socket Uses

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

type HCIFilter Uses

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

type Sockaddr Uses

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

type SockaddrHCI Uses

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

Package socket imports 4 packages (graph) and is imported by 2 packages. Updated 2018-02-27. Refresh now. Tools for package owners.