encode.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
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdarg.h>
#include <errno.h>
#include <assert.h>
#include <string.h>
#include "hash.h"
#include "dhcpd.h"
#include "per_dnet.h"
/*
* This file contains the code which creates, manipulates, and frees encode
* structures.
*/
/*
* Free an individual encode structure, including data.
*/
void
{
}
}
/*
* Dump an entire encode list, including data.
*/
void
{
}
}
/*
* Allocate an ENCODE structure, and fill it in with the passed data.
*
* Doesn't copy data if copy_flag is not set.
*
* Returns: ptr for success. Doesn't return if a failure occurs.
*/
ENCODE *
int copy_flag)
{
} else
}
return (ecp);
}
/*
* Find a specific code in the ENCODE list. Doesn't consider class.
*
* Returns: ptr if successful, NULL otherwise.
*/
ENCODE *
{
return (eclp);
}
return (NULL);
}
/*
* Duplicate the passed encode structure.
*/
ENCODE *
{
ENC_COPY));
}
/*
* Duplicate an encode list. May be called with NULL as a convenience.
*/
ENCODE *
{
return (NULL);
/*
*/
} else {
}
}
return (headp);
}
/*
* Given two ENCODE lists, produce NEW ENCODE list by "OR"ing the first
* encode list with the second. Note that the settings in the second encode
* list override any identical code settings in the first encode list.
*
* The primary list is copied if flags argument is ENC_COPY. Class is not
* considered.
*
* Returns a ptr to the merged list for success, NULL ptr otherwise.
*/
ENCODE *
{
} else {
}
return (first_ecp);
}
/*
* parameter in the list represented by the first ENCODE parameter.
*/
void
{
return;
}
} else {
} else {
}
}
}
/*
* Given a MACRO and a class name, return the ENCODE list for
* that class name, or null if a ENCODE list by that class doesn't exist.
*/
ENCODE *
{
int i;
}
return (NULL);
}