syscallwrappers

package
v1.36.6 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockSyscalls

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

MockSyscalls is a mock of Syscalls interface

func NewMockSyscalls

func NewMockSyscalls(ctrl *gomock.Controller) *MockSyscalls

NewMockSyscalls creates a new mock instance

func (*MockSyscalls) Bind

func (_m *MockSyscalls) Bind(fd int, sa syscall.Sockaddr) error

Bind mocks base method

func (*MockSyscalls) Close

func (_m *MockSyscalls) Close(fd int) error

Close mocks base method

func (*MockSyscalls) EXPECT

func (_m *MockSyscalls) EXPECT() *MockSyscallsMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockSyscalls) Recvfrom

func (_m *MockSyscalls) Recvfrom(fd int, p []byte, flags int) (int, syscall.Sockaddr, error)

Recvfrom mocks base method

func (*MockSyscalls) Sendto

func (_m *MockSyscalls) Sendto(fd int, p []byte, flags int, to syscall.Sockaddr) error

Sendto mocks base method

func (*MockSyscalls) SetsockoptInt

func (_m *MockSyscalls) SetsockoptInt(fd int, level int, opt int, value int) error

SetsockoptInt mocks base method

func (*MockSyscalls) Socket

func (_m *MockSyscalls) Socket(domain int, typ int, proto int) (int, error)

Socket mocks base method

func (*MockSyscalls) Syscall

func (_m *MockSyscalls) Syscall(trap uintptr, a1 uintptr, a2 uintptr, a3 uintptr) (uintptr, uintptr, syscall.Errno)

Syscall mocks base method

type MockSyscallsMockRecorder

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

MockSyscallsMockRecorder is the mock recorder for MockSyscalls

func (*MockSyscallsMockRecorder) Bind

func (_mr *MockSyscallsMockRecorder) Bind(arg0, arg1 interface{}) *gomock.Call

Bind indicates an expected call of Bind

func (*MockSyscallsMockRecorder) Close

func (_mr *MockSyscallsMockRecorder) Close(arg0 interface{}) *gomock.Call

Close indicates an expected call of Close

func (*MockSyscallsMockRecorder) Recvfrom

func (_mr *MockSyscallsMockRecorder) Recvfrom(arg0, arg1, arg2 interface{}) *gomock.Call

Recvfrom indicates an expected call of Recvfrom

func (*MockSyscallsMockRecorder) Sendto

func (_mr *MockSyscallsMockRecorder) Sendto(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

Sendto indicates an expected call of Sendto

func (*MockSyscallsMockRecorder) SetsockoptInt

func (_mr *MockSyscallsMockRecorder) SetsockoptInt(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

SetsockoptInt indicates an expected call of SetsockoptInt

func (*MockSyscallsMockRecorder) Socket

func (_mr *MockSyscallsMockRecorder) Socket(arg0, arg1, arg2 interface{}) *gomock.Call

Socket indicates an expected call of Socket

func (*MockSyscallsMockRecorder) Syscall

func (_mr *MockSyscallsMockRecorder) Syscall(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

Syscall indicates an expected call of Syscall

type Syscalls

type Syscalls interface {
	// Bind will bind to a PF family
	Bind(fd int, sa syscall.Sockaddr) error
	// Socket will open a new socket
	Socket(domain, typ, proto int) (int, error)
	// SetsockoptInt will be used to set socket options
	SetsockoptInt(fd, level, opt int, value int) error
	// Close will close the current socket
	Close(fd int) error
	// Recvfrom is used to receive message from Socket
	Recvfrom(fd int, p []byte, flags int) (int, syscall.Sockaddr, error)
	// Sendto is used to send message via socket
	Sendto(fd int, p []byte, flags int, to syscall.Sockaddr) error
	// Syscall is used as wrapper for syscall.SYS_SENDMSG
	Syscall(trap, a1, a2, a3 uintptr) (uintptr, uintptr, syscall.Errno)
}

Syscalls interface will have the methods for syscall system functions used in nfqueue

func NewSyscalls

func NewSyscalls() Syscalls

NewSyscalls is used to return Syscall struct

Jump to

Keyboard shortcuts

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