LEFT | RIGHT |
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 // +build darwin freebsd linux openbsd | 5 // +build darwin freebsd linux netbsd openbsd |
6 | 6 |
7 package ipv4_test | 7 package ipv4_test |
8 | 8 |
9 import ( | 9 import ( |
10 "code.google.com/p/go.net/ipv4" | 10 "code.google.com/p/go.net/ipv4" |
11 "net" | 11 "net" |
12 "os" | 12 "os" |
13 "testing" | 13 "testing" |
14 ) | 14 ) |
15 | 15 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 } | 70 } |
71 | 71 |
72 r, err := ipv4.NewRawConn(c) | 72 r, err := ipv4.NewRawConn(c) |
73 if err != nil { | 73 if err != nil { |
74 t.Fatalf("ipv4.NewRawConn failed: %v", err) | 74 t.Fatalf("ipv4.NewRawConn failed: %v", err) |
75 } | 75 } |
76 id := os.Getpid() & 0xffff | 76 id := os.Getpid() & 0xffff |
77 pld := newICMPEchoRequest(id, 1, 128, []byte("HELLO-R-U-THERE")) | 77 pld := newICMPEchoRequest(id, 1, 128, []byte("HELLO-R-U-THERE")) |
78 runDatagramTransponder(t, r, pld, nil, dst) | 78 runDatagramTransponder(t, r, pld, nil, dst) |
79 } | 79 } |
LEFT | RIGHT |