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

Delta Between Two Patch Sets: src/pkg/net/sockoptip_linux.go

Issue 6497044: code review 6497044: net: delete unused IP-level socket option helpers (Closed)
Left Patch Set: diff -r 6836919e6ff1 https://code.google.com/p/go Created 11 years, 7 months ago
Right Patch Set: diff -r dbcfb4459ab8 https://code.google.com/p/go Created 11 years, 6 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:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/net/sockoptip_freebsd.go ('k') | src/pkg/net/sockoptip_netbsd.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
1 // Copyright 2011 The Go Authors. All rights reserved. 1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4
5 // IP-level socket options for Linux
6 4
7 package net 5 package net
8 6
9 import ( 7 import (
10 "os" 8 "os"
11 "syscall" 9 "syscall"
12 ) 10 )
13 11
14 func setIPv4MulticastInterface(fd *netFD, ifi *Interface) error { 12 func setIPv4MulticastInterface(fd *netFD, ifi *Interface) error {
15 var v int32 13 var v int32
(...skipping 16 matching lines...) Expand all
32 if err := fd.incref(false); err != nil { 30 if err := fd.incref(false); err != nil {
33 return err 31 return err
34 } 32 }
35 defer fd.decref() 33 defer fd.decref()
36 err := syscall.SetsockoptInt(fd.sysfd, syscall.IPPROTO_IP, syscall.IP_MU LTICAST_LOOP, boolint(v)) 34 err := syscall.SetsockoptInt(fd.sysfd, syscall.IPPROTO_IP, syscall.IP_MU LTICAST_LOOP, boolint(v))
37 if err != nil { 35 if err != nil {
38 return os.NewSyscallError("setsockopt", err) 36 return os.NewSyscallError("setsockopt", err)
39 } 37 }
40 return nil 38 return nil
41 } 39 }
LEFTRIGHT

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