1. 14 May, 2015 1 commit
  2. 01 Apr, 2015 1 commit
  3. 31 Mar, 2015 1 commit
    • Mikio Hara's avatar
      net: add socket system call hooks for testing · 29d1f3b8
      Mikio Hara authored
      This change adds socket system call hooks to existing test cases for
      simulating a bit complicated network conditions to help making timeout
      and dual IP stack test cases work more properly in followup changes.
      
      Also test cases print debugging information in non-short mode like the
      following:
      
      Leaked goroutines:
      net.TestWriteTimeout.func2(0xc20802a5a0, 0xc20801d000, 0x1000, 0x1000, 0xc2081d2ae0)
      	/go/src/net/timeout_test.go:170 +0x98
      created by net.TestWriteTimeout
      	/go/src/net/timeout_test.go:173 +0x745
      net.runDatagramPacketConnServer(0xc2080730e0, 0x2bd270, 0x3, 0x2c1770, 0xb, 0xc2081d2ba0, 0xc2081d2c00)
      	/go/src/net/server_test.go:398 +0x667
      created by net.TestTimeoutUDP
      	/go/src/net/timeout_test.go:247 +0xc9
      	(snip)
      
      Leaked sockets:
      3: {Cookie:615726511685632 Err:<nil> SocketErr:0}
      5: {Cookie:7934075906097152 Err:<nil> SocketErr:0}
      
      Socket statistical information:
      {Family:1 Type:805306370 Protocol:0 Opened:17 Accepted:0 Connected:5 Closed:17}
      {Family:2 Type:805306369 Protocol:0 Opened:450 Accepted:234 Connected:279 Closed:636}
      {Family:1 Type:805306369 Protocol:0 Opened:11 Accepted:5 Connected:5 Closed:16}
      {Family:28 Type:805306369 Protocol:0 Opened:95 Accepted:22 Connected:16 Closed:116}
      {Family:2 Type:805306370 Protocol:0 Opened:84 Accepted:0 Connected:34 Closed:83}
      {Family:28 Type:805306370 Protocol:0 Opened:52 Accepted:0 Connected:4 Closed:52}
      
      Change-Id: I0e84be59a0699bc31245c78e2249423459b8cdda
      Reviewed-on: https://go-review.googlesource.com/6390
      
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      29d1f3b8
  4. 23 Mar, 2015 1 commit
  5. 03 Mar, 2015 1 commit
  6. 01 Mar, 2015 1 commit
  7. 10 Feb, 2015 1 commit
  8. 28 Jan, 2015 1 commit
  9. 08 Sep, 2014 1 commit
  10. 24 Aug, 2013 1 commit
  11. 06 Aug, 2013 1 commit
  12. 23 Mar, 2013 1 commit
    • Mikio Hara's avatar
      net: support IPv6 scoped addressing zone · aa0dda76
      Mikio Hara authored
      This CL provides IPv6 scoped addressing zone support as defined
      in RFC 4007 for internet protocol family connection setups.
      
      Follwoing types and functions allow a literal IPv6 address with
      zone identifer as theirs parameter.
      
      pkg net, func Dial(string, string) (Conn, error)
      pkg net, func DialOpt(string, ...DialOption) (Conn, error)
      pkg net, func DialTimeout(string, string, time.Duration) (Conn, error)
      pkg net, func Listen(string, string) (Listener, error)
      pkg net, func ListenPacket(string, string) (PacketConn, error)
      pkg net, func ResolveIPAddr(string, string) (*IPAddr, error)
      pkg net, func ResolveTCPAddr(string, string) (*TCPAddr, error)
      pkg net, func ResolveUDPAddr(string, string) (*UDPAddr, error)
      pkg net, type IPAddr struct, Zone string
      pkg net, type TCPAddr struct, Zone string
      pkg net, type UDPAddr struct, Zone string
      
      Also follwoing methods return a literal IPv6 address with zone
      identifier string if possible.
      
      pkg net, method (*IPAddr) String() string
      pkg net, method (*TCPAddr) String() string
      pkg net, method (*UDPAddr) String() string
      
      Fixes #4234.
      Fixes #4501.
      Update #5081.
      
      R=rsc, iant
      CC=golang-dev
      https://golang.org/cl/6816116
      aa0dda76
  13. 25 Feb, 2013 1 commit
  14. 21 Feb, 2013 1 commit
    • Mikio Hara's avatar
      net: add benchmarks for network interface identification · 0ad88a48
      Mikio Hara authored
      Current results on linux/amd64:
      BenchmarkInterfaces                      20000             80902 ns/op
      BenchmarkInterfaceByIndex                50000             71591 ns/op
      BenchmarkInterfaceByName                 20000             79908 ns/op
      BenchmarkInterfaceAddrs                   2000            836413 ns/op
      BenchmarkInterfacesAndAddrs               5000            605946 ns/op
      BenchmarkInterfacesAndMulticastAddrs     10000            169029 ns/op
      
      Update #4866.
      
      R=golang-dev, bradfitz
      CC=golang-dev
      https://golang.org/cl/7368046
      0ad88a48
  15. 22 Jan, 2013 1 commit
  16. 21 Jul, 2012 1 commit
  17. 04 Mar, 2012 1 commit
  18. 22 Feb, 2012 1 commit
  19. 21 Dec, 2011 1 commit
    • Mikio Hara's avatar
      net, syscall: interface address and mask · 83610567
      Mikio Hara authored
      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 #2571.
      
      R=rsc
      CC=golang-dev
      https://golang.org/cl/5489062
      83610567
  20. 02 Nov, 2011 1 commit
  21. 24 Aug, 2011 1 commit
  22. 04 Aug, 2011 1 commit
  23. 14 Jun, 2011 1 commit
  24. 03 Jun, 2011 1 commit