10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*5660Sny155746 * Common Development and Distribution License (the "License"). 6*5660Sny155746 * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 210Sstevel@tonic-gate /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 220Sstevel@tonic-gate /* All Rights Reserved */ 230Sstevel@tonic-gate 240Sstevel@tonic-gate /* 25*5660Sny155746 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 26*5660Sny155746 * Use is subject to license terms. 270Sstevel@tonic-gate */ 280Sstevel@tonic-gate 290Sstevel@tonic-gate #ifndef _PKGSTRCT_H 300Sstevel@tonic-gate #define _PKGSTRCT_H 310Sstevel@tonic-gate 320Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.9 */ 330Sstevel@tonic-gate 340Sstevel@tonic-gate #include <time.h> 350Sstevel@tonic-gate 360Sstevel@tonic-gate #ifdef __cplusplus 370Sstevel@tonic-gate extern "C" { 380Sstevel@tonic-gate #endif 390Sstevel@tonic-gate 400Sstevel@tonic-gate #define CLSSIZ 64 410Sstevel@tonic-gate #define PKGSIZ 64 420Sstevel@tonic-gate #define ATRSIZ 64 430Sstevel@tonic-gate 440Sstevel@tonic-gate #define BADFTYPE '?' 450Sstevel@tonic-gate #define BADMODE (mode_t)ULONG_MAX 460Sstevel@tonic-gate #define BADOWNER "?" 470Sstevel@tonic-gate #define BADGROUP "?" 480Sstevel@tonic-gate #define BADMAJOR (major_t)ULONG_MAX 490Sstevel@tonic-gate #define BADMINOR (minor_t)ULONG_MAX 500Sstevel@tonic-gate #define BADCLASS "none" 510Sstevel@tonic-gate #define BADINPUT 1 /* not EOF */ 520Sstevel@tonic-gate #define BADCONT (-1L) 530Sstevel@tonic-gate 540Sstevel@tonic-gate extern char *errstr; 550Sstevel@tonic-gate 560Sstevel@tonic-gate struct ainfo { 570Sstevel@tonic-gate char *local; 580Sstevel@tonic-gate mode_t mode; 590Sstevel@tonic-gate char owner[ATRSIZ+1]; 600Sstevel@tonic-gate char group[ATRSIZ+1]; 610Sstevel@tonic-gate major_t major; 620Sstevel@tonic-gate minor_t minor; 630Sstevel@tonic-gate }; 640Sstevel@tonic-gate 650Sstevel@tonic-gate struct cinfo { 66*5660Sny155746 long cksum; 67*5660Sny155746 fsblkcnt_t size; 68*5660Sny155746 time_t modtime; 690Sstevel@tonic-gate }; 700Sstevel@tonic-gate 710Sstevel@tonic-gate struct pinfo { 720Sstevel@tonic-gate char status; 730Sstevel@tonic-gate char pkg[PKGSIZ+1]; 740Sstevel@tonic-gate char editflag; 750Sstevel@tonic-gate char aclass[ATRSIZ+1]; 760Sstevel@tonic-gate struct pinfo 770Sstevel@tonic-gate *next; 780Sstevel@tonic-gate }; 790Sstevel@tonic-gate 800Sstevel@tonic-gate struct cfent { 810Sstevel@tonic-gate short volno; 820Sstevel@tonic-gate char ftype; 830Sstevel@tonic-gate char pkg_class[CLSSIZ+1]; 840Sstevel@tonic-gate int pkg_class_idx; 850Sstevel@tonic-gate char *path; 860Sstevel@tonic-gate struct ainfo ainfo; 870Sstevel@tonic-gate struct cinfo cinfo; 880Sstevel@tonic-gate short npkgs; 890Sstevel@tonic-gate struct pinfo 900Sstevel@tonic-gate *pinfo; 910Sstevel@tonic-gate }; 920Sstevel@tonic-gate 930Sstevel@tonic-gate /* averify() & cverify() error codes */ 940Sstevel@tonic-gate #define VE_EXIST 0x0001 950Sstevel@tonic-gate #define VE_FTYPE 0x0002 960Sstevel@tonic-gate #define VE_ATTR 0x0004 970Sstevel@tonic-gate #define VE_CONT 0x0008 980Sstevel@tonic-gate #define VE_FAIL 0x0010 990Sstevel@tonic-gate #define VE_TIME 0x0020 1000Sstevel@tonic-gate 1010Sstevel@tonic-gate #ifdef __cplusplus 1020Sstevel@tonic-gate } 1030Sstevel@tonic-gate #endif 1040Sstevel@tonic-gate 1050Sstevel@tonic-gate #endif /* _PKGSTRCT_H */ 106