File: sockets-naming.desc

package info (click to toggle)
adasockets 1.8.8-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 2,464 kB
  • ctags: 172
  • sloc: sh: 9,967; ada: 1,689; ansic: 357; makefile: 256
file content (177 lines) | stat: -rw-r--r-- 4,686 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
/*=* Global settings.
 *
 * package: Sockets.Naming
 * intro:
 *    The @code{Sockets.Naming} package contains types and helper functions
 *    needed to manipulate Internet host names and addresses.
=*/

/*=type String_Access
 *
 * what: Access on string
 * def: access String
 * doc:
 *    Helper type
=*/

/*=type String_Array
 *
 * what: Array of strings
 * def: array (Positive range <>) of String_Access
 * doc:
 *    Helper type
=*/

/*=type Address_Component
 *
 * what: IPv4 address component (subtype)
 * def: Natural range 0 .. 255
 * doc:
 *    Helper type
=*/

/*=type Address
 *
 * what: IPv4 address (subtype)
 * def: record@*@w{  }H1, H2, H3, H4 : Address_Component;@*end record
 * doc:
 *    This type represents an IPv4 address with @code{H1} being the first
 *    octet and @code{H4} the last one. For example, 137.194.161.2 is
 *    represented by @code{H1=137, H2=194, H3=161, H4=2}.
=*/

/*=type Address_Array
 *
 * what: array of IPv4 addresses
 * def: array (Positive range <>) of Address
 * doc:
 *    Helper type
=*/

/*=type Host_Entry
 *
 * discr: N_Aliases, N_Addresses : Natural
 * def: new Ada.Finalization.Controlled with record@*@w{  } Name : String_Access;@*@w{  } Aliases : String_Array (1 .. N_Aliases);@*@w{  } Addresses : Address_Array (1 .. N_Addresses);@* end record
 * doc:
 *    The @code{Host_Entry} type holds a set of names and IP addresses
 *    associated with a host. Each host can have several IP address
 *    as well as several aliases.
=*/

/*=subprogram Image
 *
 * what: Make a string from an address
 * kind: function
 * arg: Add, in, Address,, IP address
 * ret: String, String representation of the IP address
 * concept: Representing IP addresses
 * see: Value (function)
=*/

/*=subprogram Value
 *
 * what: Transform a string into an address
 * kind: function
 * arg: Add, in, String,, Textual representation of an IP address
 * ret: Address, Corresponding Address
 * concept: Representing IP addresses
 * see: Image (function)
=*/

/*=subprogram Is_IP_Address
 *
 * what: Check if given string is a valid IP address
 * kind: function
 * arg: Something, in, String,, String to check
 * ret: Boolean, @samp{True} if @var{Something} is an IP address
=*/

/*=subprogram Info_Of_Name_Or_IP
 *
 * what: Get addresses and names of a host
 * kind: function
 * arg: Something, in, String,, Host name or IP address
 * ret: Host_Entry, Corresponding host entry
 * exc: Naming_Error, No information available for this name or address
 * doc:
 *    This function extracts all the names and addresses from the
 *    naming service.
=*/

/*=subprogram Address_Of
 *
 * what: Get the IP address of a host
 * kind: function
 * arg: Something, in, String,, Host name or IP address
 * ret: Address, IPv4 address
 * exc: Naming_Error, No information available for this name or address
 * see: Name_Of (function)
=*/

/*=subprogram Host_Name
 *
 * what: Get the name of the current host
 * kind: function
 * ret: String, Name of the current host
 * doc:
 *    This function returns the name of the current host. Depending on
 *    the local configuration, it may or may not be a fully qualified
 *    domain name (FQDN).
=*/

/*=subprogram Name_Of
 *
 * what: Official name of the host
 * kind: function
 * arg: Something, in, String,, Host name or IP address
 * ret: String, Name of the host
 * exc: Naming_Error, No information available for this name or address
 * see: Address_Of (function)
=*/

/*=subprogram Any_Address
 *
 * what: Special address representing any address on the local host
 * kind: function
 * ret: Address, Equivalent to @code{INADDR_ANY} in the C programming language
=*/

/*=subprogram Get_Peer_Addr
 *
 * what: Retrieve IP address of remote host
 * kind: function
 * arg: Socket, in, Socket_FD,, Connected socket object
 * ret: Address, Peer address
 * see: Get_Peer_Port (function)
 * see: Get_Sock_Addr (function)
=*/

/*=subprogram Get_Peer_Port
 *
 * what: Retrieve port used by remote host
 * kind: function
 * arg: Socket, in, Socket_FD,, Connected socket object
 * ret: Positive, Port used on the remote host
 * see: Get_Sock_Port (function)
 * see: Get_Peer_Addr (function)
=*/

/*=subprogram Get_Sock_Addr
 *
 * what: Retrieve IP address of local host
 * kind: function
 * arg: Socket, in, Socket_FD,, Connected socket object
 * ret: Address, Address of local interface used
 * see: Get_Sock_Port (function)
 * see: Get_Peer_Addr (function)
=*/

/*=subprogram Get_Sock_Port
 *
 * what: Retrieve port used by local host
 * kind: function
 * arg: Socket, in, Socket_FD,, Connected socket object
 * ret: Positive, Port used on the local host
 * see: Get_Peer_Port (function)
 * see: Get_Sock_Addr (function)
=*/