// Copyright 2014 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.

//go:build aix || darwin || freebsd || linux || solaris || zos

package ipv6

import (
	
	

	
)

var compatFreeBSD32 bool // 386 emulation on amd64

func ( *sockOpt) ( *socket.Conn,  *net.Interface,  net.IP) error {
	var  groupReq
	if  != nil {
		.Interface = uint32(.Index)
	}
	.setGroup()
	var  []byte
	if compatFreeBSD32 {
		var  [sizeofGroupReq + 4]byte
		 := (*[sizeofGroupReq]byte)(unsafe.Pointer(&))
		copy([:4], [:4])
		copy([8:], [4:])
		 = [:]
	} else {
		 = (*[sizeofGroupReq]byte)(unsafe.Pointer(&))[:sizeofGroupReq]
	}
	return .Set(, )
}

func ( *sockOpt) ( *socket.Conn,  *net.Interface, ,  net.IP) error {
	var  groupSourceReq
	if  != nil {
		.Interface = uint32(.Index)
	}
	.setSourceGroup(, )
	var  []byte
	if compatFreeBSD32 {
		var  [sizeofGroupSourceReq + 4]byte
		 := (*[sizeofGroupSourceReq]byte)(unsafe.Pointer(&))
		copy([:4], [:4])
		copy([8:], [4:])
		 = [:]
	} else {
		 = (*[sizeofGroupSourceReq]byte)(unsafe.Pointer(&))[:sizeofGroupSourceReq]
	}
	return .Set(, )
}