mkdstore.c 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 2001-2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* mkdstore: fast datastore creation program.
*
* mkdstore <table> <nrecords> <cid> <flags> <cip> <sip> <lease> <comment>
*/
#include <stdio.h>
#include <netdb.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <assert.h>
#include <string.h>
#include <syslog.h>
#include <netinet/if_ether.h>
#include <netdb.h>
#include <locale.h>
#include <signal.h>
#include <dhcp_svc_confopt.h>
#include <dhcp_svc_private.h>
#include <dhcp_impl.h>
char network[INET_ADDRSTRLEN];
/*
* mkdstore <table> <nrecords> <cid> <flags> <cip> <sip> <lease> <macro>
* <comment>
*/
main(int c, char **v)
{
long long cid;
int i, j;
char **entries;
char *network = v[1];
char *server;
char *macro;
int err;
#ifdef DEBUG
#endif /* DEBUG */
if (c == 1) {
"<cid> <flags> <cip> <sip> <lease> <comment>\n*/");
return (0);
}
/* Load current datastore. */
(void) read_dsvc_conf(&dsp);
dhcpsvc_errmsg(i));
return (EINVAL);
}
DSVC_READ | DSVC_WRITE);
if (err != DSVC_SUCCESS) {
if (err != DSVC_SUCCESS) {
return (err);
}
}
/* XXXX: bug: currently can't get the count as advertised */
if (dncp)
if (err != DSVC_SUCCESS) {
return (err);
}
for (i = 0, j = 0; i < ct; i++) {
"main%debug 'in function main'",
if (cid) {
} else {
}
if (cid)
cid += 0x100;
}
return (0);
}