154N/A/*
154N/A * CDDL HEADER START
154N/A *
154N/A * The contents of this file are subject to the terms of the
154N/A * Common Development and Distribution License (the "License").
154N/A * You may not use this file except in compliance with the License.
154N/A *
154N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
154N/A * or http://www.opensolaris.org/os/licensing.
154N/A * See the License for the specific language governing permissions
154N/A * and limitations under the License.
154N/A *
154N/A * When distributing Covered Code, include this CDDL HEADER in each
154N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
154N/A * If applicable, add the following below this CDDL HEADER, with the
154N/A * fields enclosed by brackets "[]" replaced with your own identifying
154N/A * information: Portions Copyright [yyyy] [name of copyright owner]
154N/A *
154N/A * CDDL HEADER END
154N/A */
533N/A
154N/A/*
3301N/A * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
154N/A */
154N/A
155N/A#ifndef _LIBLIST_H
155N/A#define _LIBLIST_H
61N/A
61N/A#include <sys/types.h>
61N/A
155N/A#ifdef __cplusplus
155N/Aextern "C" {
155N/A#endif
155N/A
61N/Astruct libnode;
61N/Astruct liblist;
61N/A
61N/Atypedef struct libnode {
61N/A off_t nameoff; /* offset of name of this node in */
155N/A /* a particular name table */
61N/A struct liblist *verlist; /* version string list head */
61N/A struct libnode *next; /* next node */
61N/A} libnode_t;
61N/A
61N/Atypedef struct liblist {
61N/A libnode_t *head;
61N/A libnode_t *tail;
61N/A} liblist_t;
61N/A
61N/A
61N/A/* liblist utils */
3301N/Aliblist_t *liblist_alloc(void);
61N/Avoid liblist_free(liblist_t *lst);
61N/Alibnode_t *liblist_add(liblist_t *lst, off_t off);
533N/Aint liblist_foreach(liblist_t *lst, int (*cb)(libnode_t *, void *, void *),
61N/A void *info, void *info2);
61N/A
61N/A/* callbacks */
533N/Aint setver_liblist_cb(libnode_t *n, void *info, void *info2);
61N/A
155N/A#ifdef __cplusplus
155N/A}
155N/A#endif
155N/A
155N/A#endif /* _LIBLIST_H */