]> gitweb.factorcode.org Git - factor.git/blob - basis/io/sockets/icmp/icmp-docs.factor
Squashed commit of the following:
[factor.git] / basis / io / sockets / icmp / icmp-docs.factor
1
2 USING: help.markup help.syntax io.sockets ;
3
4 IN: io.sockets.icmp
5
6 HELP: icmp
7 { $class-description
8     "Host name specifier for ICMP. "
9     "The " { $snippet "host" } " slot holds the host name. "
10     "New instances are created by calling " { $link <icmp> } "." }
11 { $notes
12     "This address specifier can be used with " { $link resolve-host }
13     " to obtain a list of IP addresses associated with the host name, "
14     "and attempts a connection to each one in turn until one succeeds. "
15     "Other network words do not accept this address specifier, and "
16     { $link resolve-host } " must be called directly; it is "
17     "then up to the application to pick the correct address from the "
18     "(possibly several) addresses associated to the host name."
19 }
20 { $examples
21     { $code "\"www.apple.com\" <icmp>" }
22 } ;
23
24 HELP: <icmp>
25 { $values { "host" "a host name" } { "icmp" icmp } }
26 { $description "Creates a new " { $link icmp } " address specifier." } ;
27
28 HELP: icmp4
29 { $class-description
30     "IPv4 address specifier for ICMP. "
31     "The " { $snippet "host" } " slot holds the IPv4 address. "
32     "New instances are created by calling " { $link <icmp4> } "."
33 }
34 { $notes
35     "Most applications do not operate on IPv4 addresses directly, "
36     "and instead should use the " { $link icmp }
37     " address specifier, or call " { $link resolve-host } "."
38 }
39 { $examples
40     { $code "\"127.0.0.1\" <icmp4>" }
41 } ;
42
43 HELP: <icmp4>
44 { $values { "host" "an IPv4 address" } { "icmp4" icmp4 } }
45 { $description "Creates a new " { $link icmp4 } " address specifier." } ;
46
47 HELP: icmp6
48 { $class-description
49     "IPv6 address specifier for ICMP. "
50     "The " { $snippet "host" } " slot holds the IPv6 address. "
51     "New instances are created by calling " { $link <icmp6> } "."
52 }
53 { $notes
54     "Most applications do not operate on IPv6 addresses directly, "
55     "and instead should use the " { $link icmp }
56     " address specifier, or call " { $link resolve-host } "."
57 }
58 { $examples
59     { $code "\"::1\" <icmp6>" }
60 } ;
61
62 HELP: <icmp6>
63 { $values { "host" "an IPv6 address" } { "icmp6" icmp4 } }
64 { $description "Creates a new " { $link icmp6 } " address specifier." } ;
65
66 ARTICLE: "network-icmp" "ICMP"
67 "ICMP support is implemented for both IPv4 and IPv6 addresses, using the "
68 "operating system's host name resolution (via " { $link resolve-host } "):"
69 { $subsections
70     icmp
71     <icmp>
72 }
73 "IPv4 addresses, with no host name resolution:"
74 { $subsections
75     icmp4
76     <icmp4>
77 }
78 "IPv6 addresses, with no host name resolution:"
79 { $subsections
80     icmp6
81     <icmp6>
82 } ;
83
84 ABOUT: "network-icmp"
85