1 /*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25 package com.sun.dhcpmgr.server;
26
27 import java.util.*;
28 import java.net.InetAddress;
29
30 import com.sun.dhcpmgr.bridge.*;
31 import com.sun.dhcpmgr.data.*;
32
33 /**
34 * This interface defines the methods available for managing the dhcptab.
35 */
36 public interface DhcptabMgr {
37 public Option createOption(String name, String value)
38 throws BridgeException;
39 public Option [] getOptions(DhcpDatastore datastore)
40 throws BridgeException;
41 public Option [] getOptions()
42 throws BridgeException;
43 public Macro [] getMacros(DhcpDatastore datastore)
44 throws BridgeException;
45 public Macro [] getMacros()
46 throws BridgeException;
47 public Macro getMacro(String key, DhcpDatastore datastore)
48 throws BridgeException;
49 public Macro getMacro(String key)
50 throws BridgeException;
51 public Option getOption(String key, DhcpDatastore datastore)
52 throws BridgeException;
53 public Option getOption(String key)
54 throws BridgeException;
55 public void createRecord(DhcptabRecord rec, boolean signalServer,
56 DhcpDatastore datastore) throws BridgeException;
57 public void createRecord(DhcptabRecord rec, boolean signalServer)
58 throws BridgeException;
59 public void modifyRecord(DhcptabRecord oldRec, DhcptabRecord newRec,
60 boolean signalServer, DhcpDatastore datastore)
61 throws BridgeException;
62 public void modifyRecord(DhcptabRecord oldRec, DhcptabRecord newRec,
63 boolean signalServer) throws BridgeException;
64 public void deleteRecord(DhcptabRecord rec, boolean signalServer,
65 DhcpDatastore datastore) throws BridgeException;
66 public void deleteRecord(DhcptabRecord rec, boolean signalServer)
67 throws BridgeException;
68 public ActionError [] deleteAllMacros() throws BridgeException;
69 public ActionError [] deleteAllOptions() throws BridgeException;
70 public ActionError [] deleteMacros(String [] macroNames);
71 public ActionError [] deleteOptions(String [] optionNames);
72 public void cvtDhcptab(DhcpDatastore datastore)
73 throws BridgeException;
74 public void createDhcptab(DhcpDatastore datastore)
75 throws BridgeException;
76 public void createDhcptab()
77 throws BridgeException;
78 public void deleteDhcptab(DhcpDatastore datastore)
79 throws BridgeException;
80 public void deleteDhcptab()
81 throws BridgeException;
82 public void createLocaleMacro()
83 throws BridgeException, ValidationException;
84 public void createLocaleMacro(DhcpDatastore datastore)
85 throws BridgeException, ValidationException;
86 public void createServerMacro(String svrName, InetAddress svrAddress,
87 int leaseLength, boolean leaseNegotiable, String dnsDomain,
88 Vector dnsServs) throws BridgeException, ValidationException;
89 public void createServerMacro(String svrName, InetAddress svrAddress,
90 int leaseLength, boolean leaseNegotiable, String dnsDomain,
91 Vector dnsServs, DhcpDatastore datastore)
92 throws BridgeException, ValidationException;
93 public void createNetworkMacro(Network network, IPAddress [] routers,
94 boolean isLan, String nisDomain, Vector nisServs)
95 throws BridgeException, ValidationException;
96 public void createNetworkMacro(Network network, IPAddress [] routers,
97 boolean isLan, String nisDomain, Vector nisServs,
98 DhcpDatastore datastore)
99 throws BridgeException, ValidationException;
100 }