c

package
v1.26.4 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GoString

func GoString(cstr *Char) string

func PluginLog

func PluginLog(cb *OpenVPNPluginCallbacks, flags PLogLevel, msg *Char)

Types

type Char

type Char = C.char

func CString

func CString(str string) *Char

type Int

type Int = int

type OpenVPNPluginArgsFuncIn

type OpenVPNPluginArgsFuncIn struct {
	Type             C.int
	Argv             **C.char
	Envp             **C.char
	Handle           OpenVPNPluginHandle
	PerClientContext unsafe.Pointer
	CurrentCertDepth C.int
	CurrentCert      unsafe.Pointer // *C.openvpn_x509_cert_t
}

type OpenVPNPluginArgsFuncReturn

type OpenVPNPluginArgsFuncReturn struct {
	ReturnList **OpenVPNPluginStringList
}

type OpenVPNPluginArgsOpenIn

type OpenVPNPluginArgsOpenIn struct {
	TypeMask         C.int
	Argv             **C.char
	Envp             **C.char
	Callbacks        *OpenVPNPluginCallbacks
	SSLApi           C.int
	OVPNVersion      *C.char
	OVPNVersionMajor C.uint
	OVPNVersionMinor C.uint
	OVPNVersionPatch *C.char
}

type OpenVPNPluginArgsOpenReturn

type OpenVPNPluginArgsOpenReturn struct {
	TypeMask   C.int
	Handle     OpenVPNPluginHandle
	ReturnList **OpenVPNPluginStringList
}

type OpenVPNPluginCallbacks

type OpenVPNPluginCallbacks struct {
	PluginLog           unsafe.Pointer // plugin_log_t
	PluginVLog          unsafe.Pointer // plugin_vlog_t
	PluginSecureMemzero unsafe.Pointer // plugin_secure_memzero_t
	PluginBase64Encode  unsafe.Pointer // plugin_base64_encode_t
	PluginBase64Decode  unsafe.Pointer // plugin_base64_decode_t
}

type OpenVPNPluginFuncStatus

type OpenVPNPluginFuncStatus = Int

type OpenVPNPluginFuncType

type OpenVPNPluginFuncType = C.int
const (
	OpenVPNPluginUp                 OpenVPNPluginFuncType = C.OPENVPN_PLUGIN_UP
	OpenVPNPluginAuthUserPassVerify OpenVPNPluginFuncType = C.OPENVPN_PLUGIN_AUTH_USER_PASS_VERIFY
	OpenVPNPluginClientConnectV2    OpenVPNPluginFuncType = C.OPENVPN_PLUGIN_CLIENT_CONNECT_V2
	OpenVPNPluginClientDisconnect   OpenVPNPluginFuncType = C.OPENVPN_PLUGIN_CLIENT_DISCONNECT
)

type OpenVPNPluginHandle

type OpenVPNPluginHandle = *cgo.Handle

type OpenVPNPluginInitPoint

type OpenVPNPluginInitPoint = Int
const OpenVPNPluginInitPreDaemon OpenVPNPluginInitPoint = C.OPENVPN_PLUGIN_INIT_PRE_DAEMON

type OpenVPNPluginStringList

type OpenVPNPluginStringList struct {
	Next  *OpenVPNPluginStringList
	Name  *C.char
	Value *C.char
}

type PLogLevel

type PLogLevel = Int
const (
	PLogErr   PLogLevel = C.PLOG_ERR
	PLogWarn  PLogLevel = C.PLOG_WARN
	PLogNote  PLogLevel = C.PLOG_NOTE
	PLogDebug PLogLevel = C.PLOG_DEBUG
)

type Uintptr

type Uintptr = C.uintptr_t

Jump to

Keyboard shortcuts

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