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

Issue 5489062: code review 5489062: net, syscall: interface address and mask (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 4 months ago by mikio
Modified:
13 years, 4 months ago
Reviewers:
CC:
rsc, golang-dev
Visibility:
Public.

Description

net, syscall: interface address and mask This CL makes both InterfaceAddrs and Addrs method on Interface return IPNet struct for representing interface address and mask like below: interface "lo0": flags "up|loopback|multicast", ifindex 1, mtu 16384 interface address "fe80::1/64" interface address "127.0.0.1/8" interface address "::1/128" joined group address "ff02::fb" joined group address "224.0.0.251" joined group address "ff02::2:65d0:d71e" joined group address "224.0.0.1" joined group address "ff01::1" joined group address "ff02::1" joined group address "ff02::1:ff00:1" Fixes issue 2571.

Patch Set 1 : diff -r 3036d2362ea5 https://go.googlecode.com/hg/ #

Patch Set 2 : diff -r 3036d2362ea5 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 3036d2362ea5 https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r f95e094d062e https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r 5e84bc1446c5 https://go.googlecode.com/hg/ #

Patch Set 6 : diff -r 15b63cc10b22 https://go.googlecode.com/hg/ #

Patch Set 7 : diff -r 96ec7655472a https://go.googlecode.com/hg/ #

Total comments: 9

Patch Set 8 : diff -r 9b926e5d3635 https://go.googlecode.com/hg/ #

Patch Set 9 : diff -r 52f87bdb279f https://go.googlecode.com/hg/ #

Patch Set 10 : diff -r ef6acc5fe84d https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+137 lines, -110 lines) Patch
M src/pkg/net/interface_bsd.go View 1 2 3 4 5 6 7 5 chunks +45 lines, -46 lines 0 comments Download
M src/pkg/net/interface_linux.go View 1 2 3 4 5 6 7 7 chunks +33 lines, -40 lines 0 comments Download
M src/pkg/net/interface_test.go View 1 2 3 4 5 2 chunks +40 lines, -17 lines 0 comments Download
M src/pkg/net/ip.go View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M src/pkg/syscall/route_bsd.go View 3 chunks +16 lines, -7 lines 0 comments Download

Messages

Total messages: 16
mikio
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 4 months ago (2011-12-16 07:17:10 UTC) #1
mikio
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 4 months ago (2011-12-16 08:29:31 UTC) #2
rsc
Is there a reason to define InterfaceAddr instead of using IPNet directly?
13 years, 4 months ago (2011-12-16 15:44:53 UTC) #3
mikio
On Sat, Dec 17, 2011 at 12:44 AM, Russ Cox <rsc@golang.org> wrote: > Is there ...
13 years, 4 months ago (2011-12-16 16:25:43 UTC) #4
rsc
It just seems like an extra type to learn about.
13 years, 4 months ago (2011-12-16 16:27:16 UTC) #5
mikio
Hello golang-dev@googlegroups.com, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 4 months ago (2011-12-16 16:35:42 UTC) #6
mikio
I did sleep on it but seems like no good reason exists. Users will (assert ...
13 years, 4 months ago (2011-12-17 06:54:41 UTC) #7
mikio
Hello golang-dev@googlegroups.com, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 4 months ago (2011-12-17 06:55:06 UTC) #8
mikio
Hello golang-dev@googlegroups.com, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 4 months ago (2011-12-18 11:46:59 UTC) #9
mikio
ping On 2011/12/18 11:46:59, mikioh wrote: > Hello mailto:golang-dev@googlegroups.com, mailto:rsc@golang.org (cc: > mailto:golang-dev@googlegroups.com), > > ...
13 years, 4 months ago (2011-12-20 01:11:41 UTC) #10
rsc
http://codereview.appspot.com/5489062/diff/47/src/pkg/net/interface_bsd.go File src/pkg/net/interface_bsd.go (right): http://codereview.appspot.com/5489062/diff/47/src/pkg/net/interface_bsd.go#newcode22 src/pkg/net/interface_bsd.go:22: err error How about using := throughout and not ...
13 years, 4 months ago (2011-12-21 04:21:39 UTC) #11
mikio
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 4 months ago (2011-12-21 08:58:35 UTC) #12
mikio
http://codereview.appspot.com/5489062/diff/47/src/pkg/net/interface_bsd.go File src/pkg/net/interface_bsd.go (right): http://codereview.appspot.com/5489062/diff/47/src/pkg/net/interface_bsd.go#newcode22 src/pkg/net/interface_bsd.go:22: err error On 2011/12/21 04:21:39, rsc wrote: > How ...
13 years, 4 months ago (2011-12-21 08:59:08 UTC) #13
mikio
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 4 months ago (2011-12-21 12:02:52 UTC) #14
rsc
LGTM
13 years, 4 months ago (2011-12-21 12:36:57 UTC) #15
mikio
13 years, 4 months ago (2011-12-21 12:39:06 UTC) #16
*** Submitted as http://code.google.com/p/go/source/detail?r=4c20d297d01d ***

net, syscall: interface address and mask

This CL makes both InterfaceAddrs and Addrs method on Interface
return IPNet struct for representing interface address and mask
like below:

interface "lo0": flags "up|loopback|multicast", ifindex 1, mtu 16384
        interface address "fe80::1/64"
        interface address "127.0.0.1/8"
        interface address "::1/128"
        joined group address "ff02::fb"
        joined group address "224.0.0.251"
        joined group address "ff02::2:65d0:d71e"
        joined group address "224.0.0.1"
 	joined group address "ff01::1"
        joined group address "ff02::1"
        joined group address "ff02::1:ff00:1"

Fixes issue 2571.

R=rsc
CC=golang-dev
http://codereview.appspot.com/5489062
Sign in to reply to this message.

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