github.com/ooni/psiphon/tunnel-core@v0.0.0-20230105123940-fe12a24c96ee/oovendor/quic-go/conn_helper_darwin.go (about)

     1  //go:build darwin
     2  // +build darwin
     3  
     4  package quic
     5  
     6  import "golang.org/x/sys/unix"
     7  
     8  const msgTypeIPTOS = unix.IP_RECVTOS
     9  
    10  const (
    11  	ipv4RECVPKTINFO = unix.IP_RECVPKTINFO
    12  	ipv6RECVPKTINFO = 0x3d
    13  )
    14  
    15  const (
    16  	msgTypeIPv4PKTINFO = unix.IP_PKTINFO
    17  	msgTypeIPv6PKTINFO = 0x2e
    18  )
    19  
    20  // ReadBatch only returns a single packet on OSX,
    21  // see https://godoc.org/golang.org/x/net/ipv4#PacketConn.ReadBatch.
    22  const batchSize = 1