| // 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. |
| // +build darwin freebsd linux solaris |
| "golang.org/x/net/internal/socket" |
| func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { |
| gr.Interface = uint32(ifi.Index) |
| var d [sizeofGroupReq + 4]byte |
| s := (*[sizeofGroupReq]byte)(unsafe.Pointer(&gr)) |
| b = (*[sizeofGroupReq]byte)(unsafe.Pointer(&gr))[:sizeofGroupReq] |
| func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error { |
| gsr.Interface = uint32(ifi.Index) |
| gsr.setSourceGroup(grp, src) |
| var d [sizeofGroupSourceReq + 4]byte |
| s := (*[sizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr)) |
| b = (*[sizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr))[:sizeofGroupSourceReq] |