Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2527)

Delta Between Two Patch Sets: ipv4/sockopt_mreq.go

Issue 97800043: code review 97800043: go.net/ipv4: add support for dragonfly (Closed)
Left Patch Set: diff -r f3fd9e904a78 https://code.google.com/p/go.net Created 9 years, 10 months ago
Right Patch Set: diff -r 9c33002573cb https://code.google.com/p/go.net Created 9 years, 10 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « ipv4/sockopt_linux.go ('k') | ipv4/sockopt_mreqn.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // Copyright 2012 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // +build darwin dragonfly netbsd openbsd
6
7 package ipv4
8
9 import (
10 "net"
11 "os"
12 "syscall"
13 )
14
15 func joinIPv4Group(fd int, ifi *net.Interface, grp net.IP) error {
16 mreq := syscall.IPMreq{Multiaddr: [4]byte{grp[0], grp[1], grp[2], grp[3] }}
17 if err := setSysIPMreqInterface(&mreq, ifi); err != nil {
18 return err
19 }
20 return os.NewSyscallError("setsockopt", syscall.SetsockoptIPMreq(fd, ian aProtocolIP, sysSockoptJoinGroup, &mreq))
21 }
22
23 func leaveIPv4Group(fd int, ifi *net.Interface, grp net.IP) error {
24 mreq := syscall.IPMreq{Multiaddr: [4]byte{grp[0], grp[1], grp[2], grp[3] }}
25 if err := setSysIPMreqInterface(&mreq, ifi); err != nil {
26 return err
27 }
28 return os.NewSyscallError("setsockopt", syscall.SetsockoptIPMreq(fd, ian aProtocolIP, sysSockoptLeaveGroup, &mreq))
29 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b