Source File
helper.go
Belonging Package
golang.org/x/net/ipv4
// Copyright 2012 The Go Authors. All rights reserved.// Use of this source code is governed by a BSD-style// license that can be found in the LICENSE file.package ipv4import ()var (errInvalidConn = errors.New("invalid connection")errMissingAddress = errors.New("missing address")errNilHeader = errors.New("nil header")errHeaderTooShort = errors.New("header too short")errExtHeaderTooShort = errors.New("extension header too short")errInvalidConnType = errors.New("invalid conn type")errNotImplemented = errors.New("not implemented on " + runtime.GOOS + "/" + runtime.GOARCH)// See https://www.freebsd.org/doc/en/books/porters-handbook/versions.html.freebsdVersion uint32compatFreeBSD32 bool // 386 emulation on amd64)// See golang.org/issue/30899.func adjustFreeBSD32( *socket.Message) {// FreeBSD 12.0-RELEASE is affected by https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236737if 1200086 <= freebsdVersion && freebsdVersion < 1201000 {:= (.NN + 4 - 1) &^ (4 - 1)if .NN < && <= len(.OOB) {.NN =}}}func boolint( bool) int {if {return 1}return 0}func netAddrToIP4( net.Addr) net.IP {switch v := .(type) {case *net.UDPAddr:if := .IP.To4(); != nil {return}case *net.IPAddr:if := .IP.To4(); != nil {return}}return nil}func opAddr( net.Addr) net.Addr {switch .(type) {case *net.TCPAddr:if == nil {return nil}case *net.UDPAddr:if == nil {return nil}case *net.IPAddr:if == nil {return nil}}return}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |