jdk/src/windows/classes/sun/net/NetHooks.java
author jrose
Fri, 05 Nov 2010 12:18:30 -0700
changeset 7118 aa8f53fcb28f
parent 5506 202f599c92aa
permissions -rw-r--r--
6996563: 6984311 changes forgot to update vmStructs.cpp for new field _operands Summary: Add missing line to vmStructs. Also fix bug with class dumper. Reviewed-by: twisti, kvn
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2446
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2446
diff changeset
     2
 * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
2446
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
     4
 *
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2446
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2446
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2446
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2446
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    10
 *
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    15
 * accompanied this code).
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    16
 *
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2446
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2446
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2446
diff changeset
    23
 * questions.
2446
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    24
 */
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    25
package sun.net;
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    26
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    27
import java.net.InetAddress;
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    28
import java.io.FileDescriptor;
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    29
import java.io.IOException;
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    30
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    31
/**
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    32
 * Defines static methods to ensure that any installed net hooks are invoked
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    33
 * prior to binding or connecting TCP sockets.
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    34
 */
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    35
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    36
public final class NetHooks {
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    37
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    38
    /**
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    39
     * Invoke prior to binding a TCP socket.
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    40
     */
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    41
    public static void beforeTcpBind(FileDescriptor fdObj,
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    42
                                     InetAddress address,
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    43
                                     int port)
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    44
        throws IOException
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    45
    {
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    46
        // nothing to do
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    47
    }
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    48
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    49
    /**
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    50
     * Invoke prior to connecting an unbound TCP socket.
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    51
     */
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    52
    public static void beforeTcpConnect(FileDescriptor fdObj,
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    53
                                        InetAddress address,
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    54
                                        int port)
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    55
        throws IOException
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    56
    {
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    57
        // nothing to do
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    58
    }
07047237e4d4 4890703: Support SDP (sol)
alanb
parents:
diff changeset
    59
}