usb

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProgName            = "ipsw"
	BundleID            = "io.blacktop.ipsw"
	ClientVersionString = "ipsw-usbmux-0.0.1"
)

Variables

View Source
var HeaderSize = uint32(binary.Size(Header{}))

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(udid string, port int) (*Client, error)

func (Client) Close

func (c Client) Close() error

func (*Client) Conn

func (c *Client) Conn() net.Conn

func (*Client) DeviceID

func (c *Client) DeviceID() int

func (*Client) DeviceLinkHandshake

func (c *Client) DeviceLinkHandshake() ([]any, error)

func (*Client) DeviceLinkRecv

func (c *Client) DeviceLinkRecv() (any, error)

func (*Client) DeviceLinkSend

func (c *Client) DeviceLinkSend(msg any) error

func (*Client) DisableSSL

func (c *Client) DisableSSL()

func (*Client) EnableSSL

func (c *Client) EnableSSL() error

func (*Client) PairRecord

func (c *Client) PairRecord() *PairRecord

func (Client) Recv

func (c Client) Recv(resp any) error

func (*Client) RecvByte

func (c *Client) RecvByte() (byte, error)

func (*Client) RecvBytes

func (c *Client) RecvBytes() ([]byte, error)

func (*Client) Request

func (c *Client) Request(req, resp any) error

func (*Client) Send

func (c *Client) Send(req any) error

func (*Client) UDID

func (c *Client) UDID() string

type Conn

type Conn struct {
	net.Conn
	// contains filtered or unexported fields
}

func NewConn

func NewConn() (*Conn, error)

func (*Conn) Dial

func (c *Conn) Dial(deviceId, port int) error

func (*Conn) ListDevices

func (c *Conn) ListDevices() ([]*DeviceAttachment, error)

func (*Conn) ReadPairRecord

func (c *Conn) ReadPairRecord(udid string) (*PairRecord, error)

func (*Conn) Recv

func (c *Conn) Recv(msg any) error

func (*Conn) Request

func (c *Conn) Request(req, resp any) error

func (*Conn) Send

func (c *Conn) Send(msg any) error

type DeviceAttached

type DeviceAttached struct {
	MessageType string
	DeviceID    int
	Properties  *DeviceAttachment
}

type DeviceAttachment

type DeviceAttachment struct {
	ConnectionSpeed int
	ConnectionType  string
	DeviceID        int
	LocationID      int
	ProductID       int
	SerialNumber    string
	UDID            string
	USBSerialNumber string
}

func (DeviceAttachment) String

func (d DeviceAttachment) String() string
type Header struct {
	Length      uint32
	Version     uint32
	MessageType uint32
	Tag         uint32
}

type PairRecord

type PairRecord struct {
	DeviceCertificate []byte
	EscrowBag         []byte
	HostCertificate   []byte
	HostID            string
	HostPrivateKey    []byte
	RootCertificate   []byte
	RootPrivateKey    []byte
	SystemBUID        string
}

type ResultValue

type ResultValue int
const (
	ResultValueOK ResultValue = iota
	ResultValueBadCommand
	ResultValueBadDevice
	ResultValueConnectionRefused
	ResultValueConnectionUnknown1
	ResultValueConnectionUnknown2
	ResultValueBadVersion
)

Jump to

Keyboard shortcuts

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