netutils

package
v4.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Copyright (C) 2016 Nippon Telegraph and Telephone Corporation.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DialerControl

func DialerControl(logger *slog.Logger, network, address string, c syscall.RawConn, ttl, minTtl uint8, mss uint16, password string, bindInterface string) error

func SetBindToDevSockopt

func SetBindToDevSockopt(sc syscall.RawConn, device string) error

func SetTCPMD5SigSockopt

func SetTCPMD5SigSockopt(l *net.TCPListener, address string, key string) error

func SetTCPMSSSockopt

func SetTCPMSSSockopt(conn net.Conn, mss uint16) error

func SetTCPMinTTLSockopt

func SetTCPMinTTLSockopt(conn net.Conn, ttl int) error

func SetTCPTTLSockopt

func SetTCPTTLSockopt(conn net.Conn, ttl int) error

Types

type TCPConn

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

func (*TCPConn) Close

func (c *TCPConn) Close() error

func (*TCPConn) Key

func (c *TCPConn) Key() string

type TCPListener

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

func NewTCPListener

func NewTCPListener(logger *slog.Logger, address string, port uint32, bindToDev string, connChan chan net.Conn) (*TCPListener, error)

avoid mapped IPv6 address

func (*TCPListener) Addr

func (l *TCPListener) Addr() net.Addr

func (*TCPListener) Close

func (l *TCPListener) Close()

func (*TCPListener) Listener

func (l *TCPListener) Listener() *net.TCPListener

Jump to

Keyboard shortcuts

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