Documentation ¶
Index ¶
- type MockSyscalls
- func (_m *MockSyscalls) Bind(fd int, sa syscall.Sockaddr) error
- func (_m *MockSyscalls) Close(fd int) error
- func (_m *MockSyscalls) EXPECT() *MockSyscallsMockRecorder
- func (_m *MockSyscalls) Recvfrom(fd int, p []byte, flags int) (int, syscall.Sockaddr, error)
- func (_m *MockSyscalls) Sendto(fd int, p []byte, flags int, to syscall.Sockaddr) error
- func (_m *MockSyscalls) SetsockoptInt(fd int, level int, opt int, value int) error
- func (_m *MockSyscalls) Socket(domain int, typ int, proto int) (int, error)
- func (_m *MockSyscalls) Syscall(trap uintptr, a1 uintptr, a2 uintptr, a3 uintptr) (uintptr, uintptr, syscall.Errno)
- type MockSyscallsMockRecorder
- func (_mr *MockSyscallsMockRecorder) Bind(arg0, arg1 interface{}) *gomock.Call
- func (_mr *MockSyscallsMockRecorder) Close(arg0 interface{}) *gomock.Call
- func (_mr *MockSyscallsMockRecorder) Recvfrom(arg0, arg1, arg2 interface{}) *gomock.Call
- func (_mr *MockSyscallsMockRecorder) Sendto(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
- func (_mr *MockSyscallsMockRecorder) SetsockoptInt(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
- func (_mr *MockSyscallsMockRecorder) Socket(arg0, arg1, arg2 interface{}) *gomock.Call
- func (_mr *MockSyscallsMockRecorder) Syscall(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
- type Syscalls
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) EXPECT ¶
func (_m *MockSyscalls) EXPECT() *MockSyscallsMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockSyscalls) SetsockoptInt ¶
SetsockoptInt 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