dhcpd.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _DHCPD_H
#define _DHCPD_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* dhcpd.h -- common header file for all the modules of the in.dhcpd program.
*/
#include <dhcp_svc_confopt.h>
#include <dhcp_svc_private.h>
#include <dhcp_svc_public.h>
#include <dhcp_impl.h>
#include <dhcp_symbol.h>
#include <libinetutil.h>
#include "hash.h"
#include "per_dnet.h"
/*
* Raw encoded packet data. The final state. Note that 'code' not only
* describes options: predefined: 1-60, site: 128-254, vendor: 42(*),
* but it also defines packet fields for packet data as well.
* Note that due to overlap of codes between various DSYM categories,
* category must be used to distinguish (see libdhcputil).
*/
typedef struct encoded {
} ENCODE;
typedef struct {
} VNDLIST;
typedef struct {
int classes; /* num of client classes */
} MACRO;
/* logging message categories */
typedef enum {
L_ASSIGN = 0, /* New assignment */
typedef enum {
P_BOOTP = 0, /* BOOT Protocol */
} DHCP_PROTO;
#define ENC_COPY 0 /* Copy encode list */
#define DHCP_ARP_ADD 0 /* Add an ARP table entry */
#define NEW_DHCPTAB 0 /* load initial dhcptab */
/* load option flags */
/* dhcp_lookup_dd_classify search flags */
/* DHCP client states */
#define INIT_STATE 1
#define INIT_REBOOT_STATE 2
#define RENEW_REBIND_STATE 3
extern int debug;
extern boolean_t no_dhcptab;
extern boolean_t server_mode;
extern boolean_t be_automatic;
extern int log_local;
extern int icmp_tries;
extern time_t cache_secs;
extern time_t renog_secs;
extern time_t icmp_timeout;
extern time_t nsutimeout_secs;
extern boolean_t time_to_go;
extern dsvc_datastore_t datastore;
extern int max_threads; /* maximum number of threads per net */
extern int max_clients; /* maximum number of clients per net */
extern int net_thresh; /* secs to keep pernet reference */
extern int clnt_thresh; /* secs to keep client reference */
extern struct __res_state resolv_conf;
#ifdef DEBUG
#endif /* DEBUG */
extern void *reinitialize(void *);
extern int initmtab(void);
extern int initntab(void);
extern int checktab(void);
extern int readtab(int);
extern int relay_agent_init(char *);
extern void dhcpmsg(int, const char *, ...);
extern void *smalloc(unsigned);
extern void *stack_create(unsigned int);
extern void open_macros(void);
extern void close_macros(void);
extern void free_encode_list(ENCODE *);
extern void free_encode(ENCODE *);
extern char *get_class_id(PKT_LIST *, char *, int);
ENCODE *);
extern void *monitor_client(void *);
dn_rec_list_t **);
const char *, uint_t);
extern int dhcp_close_dd(dsvc_handle_t *);
extern int dhcp_modify_dd_entry(dsvc_handle_t, const void *, void *);
extern void dhcp_free_dd_list(dsvc_handle_t, void *);
const dn_rec_t *, void **, int);
dn_rec_list_t **);
extern int qualify_hostname(char *, const char *, const char *, int, int);
#ifdef __cplusplus
}
#endif
#endif /* _DHCPD_H */