2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
2N/A * Use is subject to license terms.
2N/A */
2N/A
2N/A#ifndef _LIBFRUP_H
2N/A#define _LIBFRUP_H
2N/A
2N/A#pragma ident "%Z%%M% %I% %E% SMI"
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A#include <stdarg.h>
2N/A
2N/A#include "libfru.h"
2N/A#include "../../libfruutils/fru_tag.h"
2N/A
2N/Atypedef uint64_t fru_seghdl_t;
2N/Atypedef enum {FRU_ENCRYPT, FRU_DECRYPT} fru_encrypt_t;
2N/Atypedef fru_errno_t
2N/A(*fru_encrypt_func_t)(fru_encrypt_t en_dec, unsigned char *buf, size_t buf_len);
2N/A
2N/A/*
2N/A * Type for pointers to functions for terminating the processing of a node
2N/A * (after its children have been processed)
2N/A */
2N/Atypedef void (*end_node_fp_t)(fru_nodehdl_t node, const char *path,
2N/A const char *name, void *args);
2N/A
2N/A/*
2N/A * Project-private exported symbols
2N/A */
2N/Aextern fru_encrypt_func_t encrypt_func;
2N/A
2N/Aextern fru_errno_t fru_encryption_supported(void);
2N/A
2N/Aextern fru_errno_t fru_walk_tree(fru_nodehdl_t node, const char *prior_path,
2N/A fru_errno_t (*process_node)(fru_nodehdl_t node,
2N/A const char *path,
2N/A const char *name, void *args,
2N/A end_node_fp_t *end_node,
2N/A void **end_args),
2N/A void *args);
2N/A
2N/Aextern int fru_pathmatch(const char *path, const char *searchpath);
2N/A
2N/Aextern fru_errno_t fru_for_each_segment(fru_nodehdl_t node,
2N/A int (*function)(fru_seghdl_t segment,
2N/A void *args),
2N/A void *args);
2N/Aextern fru_errno_t fru_get_segment_name(fru_seghdl_t segment, char **name);
2N/Aextern fru_errno_t fru_for_each_packet(fru_seghdl_t segment,
2N/A int (*function)(fru_tag_t *tag,
2N/A uint8_t *payload,
2N/A size_t length, void *args),
2N/A void *args);
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _LIBFRUP_H */