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

Delta Between Two Patch Sets: ipv4/control.go

Issue 9727045: code review 9727045: go.net/ipv4: Expose SpecDst in ControlMessage and set i...
Left Patch Set: code review 9727045: go.net/ipv4: Expose SpecDst in ControlMessage and set i... Created 10 years, 7 months ago
Right Patch Set: diff -r 89dbba2db2d4 https://code.google.com/p/go.net Created 10 years, 1 month 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 | « no previous file | ipv4/control_linux.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. 1 // Copyright 2012 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 4
5 package ipv4 5 package ipv4
6 6
7 import ( 7 import (
8 "fmt" 8 "fmt"
9 "net" 9 "net"
10 "sync" 10 "sync"
(...skipping 22 matching lines...) Expand all
33 // Receiving socket options: SetControlMessage allows to 33 // Receiving socket options: SetControlMessage allows to
34 // receive the options from the protocol stack using ReadFrom 34 // receive the options from the protocol stack using ReadFrom
35 // method of PacketConn or RawConn. 35 // method of PacketConn or RawConn.
36 // 36 //
37 // Specifying socket options: ControlMessage for WriteTo 37 // Specifying socket options: ControlMessage for WriteTo
38 // method of PacketConn or RawConn allows to send the options 38 // method of PacketConn or RawConn allows to send the options
39 // to the protocol stack. 39 // to the protocol stack.
40 // 40 //
41 TTL int // time-to-live, receiving only 41 TTL int // time-to-live, receiving only
42 Src net.IP // source address, specifying only 42 Src net.IP // source address, specifying only
43 SpecDst net.IP // local address of packet
43 Dst net.IP // destination address, receiving only 44 Dst net.IP // destination address, receiving only
44 IfIndex int // interface index, must be 1 <= value when specifying 45 IfIndex int // interface index, must be 1 <= value when specifying
45 } 46 }
46 47
47 func (cm *ControlMessage) String() string { 48 func (cm *ControlMessage) String() string {
48 if cm == nil { 49 if cm == nil {
49 return "<nil>" 50 return "<nil>"
50 } 51 }
51 » return fmt.Sprintf("ttl: %v, src: %v, dst: %v, ifindex: %v", cm.TTL, cm. Src, cm.Dst, cm.IfIndex) 52 » return fmt.Sprintf("ttl: %v, src: %v, specdst: %v, dst: %v, ifindex: %v" , cm.TTL, cm.Src, cm.SpecDst, cm.Dst, cm.IfIndex)
52 } 53 }
LEFTRIGHT

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