OSDN Git Service

new repo
[bytom/vapor.git] / vendor / golang.org / x / net / icmp / listen_stub.go
1 // Copyright 2014 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // +build nacl plan9
6
7 package icmp
8
9 // ListenPacket listens for incoming ICMP packets addressed to
10 // address. See net.Dial for the syntax of address.
11 //
12 // For non-privileged datagram-oriented ICMP endpoints, network must
13 // be "udp4" or "udp6". The endpoint allows to read, write a few
14 // limited ICMP messages such as echo request and echo reply.
15 // Currently only Darwin and Linux support this.
16 //
17 // Examples:
18 //      ListenPacket("udp4", "192.168.0.1")
19 //      ListenPacket("udp4", "0.0.0.0")
20 //      ListenPacket("udp6", "fe80::1%en0")
21 //      ListenPacket("udp6", "::")
22 //
23 // For privileged raw ICMP endpoints, network must be "ip4" or "ip6"
24 // followed by a colon and an ICMP protocol number or name.
25 //
26 // Examples:
27 //      ListenPacket("ip4:icmp", "192.168.0.1")
28 //      ListenPacket("ip4:1", "0.0.0.0")
29 //      ListenPacket("ip6:ipv6-icmp", "fe80::1%en0")
30 //      ListenPacket("ip6:58", "::")
31 func ListenPacket(network, address string) (*PacketConn, error) {
32         return nil, errOpNoSupport
33 }