Home | History | Annotate | Download | only in net

Lines Matching refs:address

33  * This class represents an Internet Protocol version 4 (IPv4) address.
37 * <i>RFC&nbsp;1918: Address Allocation for Private Internets</i></a>,
43 * Textual representation of IPv4 address used as input to methods
55 * address.
57 * <p> When a three part address is specified, the last part is
59 * bytes of the network address. This makes the three part address
63 * <p> When a two part address is supplied, the last part is
65 * bytes of the network address. This makes the two part address
70 * the network address without any byte rearrangement.
75 * <h4> The Scope of a Multicast Address </h4>
96 // BEGIN Android-added: Define special-purpose IPv4 address
107 // END Android-added: Define special-purpose IPv4 address
122 holder().address = 0;
131 int address = addr[3] & 0xFF;
132 address |= ((addr[2] << 8) & 0xFF00);
133 address |= ((addr[1] << 16) & 0xFF0000);
134 address |= ((addr[0] << 24) & 0xFF000000);
135 holder().address = address;
140 Inet4Address(String hostName, int address) {
143 holder().address = address;
159 inet.holder().address = holder().getAddress();
174 * IP multicast address. IP multicast address is a Class D
175 * address i.e first four bits of the address are 1110.
177 * an IP multicast address
185 * Utility routine to check if the InetAddress in a wildcard address.
187 * a wildcard address.
195 * Utility routine to check if the InetAddress is a loopback address.
198 * a loopback address; or false otherwise.
208 * Utility routine to check if the InetAddress is an link local address.
211 * a link local address; or false if address is not a link local unicast address.
216 // defined in "Documenting Special Use IPv4 Address Blocks
219 int address = holder().getAddress();
220 return (((address >>> 24) & 0xFF) == 169)
221 && (((address >>> 16) & 0xFF) == 254);
225 * Utility routine to check if the InetAddress is a site local address.
228 * a site local address; or false if address is not a site local unicast address.
236 int address = holder().getAddress();
237 return (((address >>> 24) & 0xFF) == 10)
238 || ((((address >>> 24) & 0xFF) == 172)
239 && (((address >>> 16) & 0xF0) == 16))
240 || ((((address >>> 24) & 0xFF) == 192)
241 && (((address >>> 16) & 0xFF) == 168));
245 * Utility routine to check if the multicast address has global scope.
247 * @return a {@code boolean} indicating if the address has
248 * is a multicast address of global scope, false if it is not
249 * of global scope or it is not a multicast address
261 * Utility routine to check if the multicast address has node scope.
263 * @return a {@code boolean} indicating if the address has
264 * is a multicast address of node-local scope, false if it is not
265 * of node-local scope or it is not a multicast address
274 * Utility routine to check if the multicast address has link scope.
276 * @return a {@code boolean} indicating if the address has
277 * is a multicast address of link-local scope, false if it is not
278 * of link-local scope or it is not a multicast address
283 int address = holder().getAddress();
284 return (((address >>> 24) & 0xFF) == 224)
285 && (((address >>> 16) & 0xFF) == 0)
286 && (((address >>> 8) & 0xFF) == 0);
290 * Utility routine to check if the multicast address has site scope.
292 * @return a {@code boolean} indicating if the address has
293 * is a multicast address of site-local scope, false if it is not
294 * of site-local scope or it is not a multicast address
299 int address = holder().getAddress();
300 return (((address >>> 24) & 0xFF) == 239)
301 && (((address >>> 16) & 0xFF) == 255);
305 * Utility routine to check if the multicast address has organization scope.
307 * @return a {@code boolean} indicating if the address has
308 * is a multicast address of organization-local scope,
310 * or it is not a multicast address
315 int address = holder().getAddress();
316 return (((address >>> 24) & 0xFF) == 239)
317 && (((address >>> 16) & 0xFF) >= 192)
318 && (((address >>> 16) & 0xFF) <= 195);
322 * Returns the raw IP address of this {@code InetAddress}
324 * byte of the address is in {@code getAddress()[0]}.
326 * @return the raw IP address of this object.
329 int address = holder().getAddress();
332 addr[0] = (byte) ((address >>> 24) & 0xFF);
333 addr[1] = (byte) ((address >>> 16) & 0xFF);
334 addr[2] = (byte) ((address >>> 8) & 0xFF);
335 addr[3] = (byte) (address & 0xFF);
340 * Returns the IP address string in textual presentation form.
342 * @return the raw IP address in a string format.
350 * Returns a hashcode for this IP address.
352 * @return a hash code value for this IP address.
361 * not {@code null} and it represents the same IP address as
365 * address if the length of the byte arrays returned by
381 * Converts IPv4 binary address into a string suitable for presentation.
383 * @param src a byte array representing an IPv4 numeric address
384 * @return a String representing the IPv4 address in