multinetwork

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Raw CGo bindings for Android Multi-Network

Index

Constants

View Source
const (
	ANDROID_RESOLV_NO_RETRY        = 1
	ANDROID_RESOLV_NO_CACHE_STORE  = 2
	ANDROID_RESOLV_NO_CACHE_LOOKUP = 4
)

Variables

This section is empty.

Functions

func Android_getprocdns

func Android_getprocdns(network *Net_handle_t) int32

func Android_getprocnetwork

func Android_getprocnetwork(network *Net_handle_t) int32

func Android_res_cancel

func Android_res_cancel(nsend_fd int32)

func Android_res_nquery

func Android_res_nquery(network Net_handle_t, dname string, ns_class int32, ns_type int32, flags uint32) int32

func Android_res_nresult

func Android_res_nresult(fd int32, rcode *int32, answer *uint8, anslen uint64) int32

func Android_res_nsend

func Android_res_nsend(network Net_handle_t, msg *uint8, msglen uint64, flags uint32) int32

func Android_setprocdns

func Android_setprocdns(network Net_handle_t) int32

func Android_setprocnetwork

func Android_setprocnetwork(network Net_handle_t) int32

func Android_setsocknetwork

func Android_setsocknetwork(network Net_handle_t, fd int32) int32

func Android_tag_socket

func Android_tag_socket(sockfd int32, tag uint32) int32

func Android_tag_socket_with_uid

func Android_tag_socket_with_uid(sockfd int32, tag uint32, uid Uid_t) int32

func Android_untag_socket

func Android_untag_socket(sockfd int32) int32

Types

type CgoAllocMap

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

CgoAllocMap stores pointers to C allocated memory for future reference.

func UnpackPCharString

func UnpackPCharString(str string) (*C.char, *CgoAllocMap)

UnpackPCharString copies the data from Go string as *C.char.

func (*CgoAllocMap) Add

func (a *CgoAllocMap) Add(ptr unsafe.Pointer)

func (*CgoAllocMap) Borrow

func (a *CgoAllocMap) Borrow(b *CgoAllocMap)

func (*CgoAllocMap) Free

func (a *CgoAllocMap) Free()

func (*CgoAllocMap) IsEmpty

func (a *CgoAllocMap) IsEmpty() bool

type Net_handle_t

type Net_handle_t uint64

type SliceHeader

type SliceHeader struct {
	Data unsafe.Pointer
	Len  int
	Cap  int
}

type Uid_t

type Uid_t C.uid_t

Jump to

Keyboard shortcuts

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