xref: /illumos-gate/usr/src/cmd/ypcmd/ypxfrd.x (revision 2a8bcb4e)
1 %/*
2 % * CDDL HEADER START
3 % *
4 % * The contents of this file are subject to the terms of the
5 % * Common Development and Distribution License, Version 1.0 only
6 % * (the "License").  You may not use this file except in compliance
7 % * with the License.
8 % *
9 % * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 % * or http://www.opensolaris.org/os/licensing.
11 % * See the License for the specific language governing permissions
12 % * and limitations under the License.
13 % *
14 % * When distributing Covered Code, include this CDDL HEADER in each
15 % * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 % * If applicable, add the following below this CDDL HEADER, with the
17 % * fields enclosed by brackets "[]" replaced with your own identifying
18 % * information: Portions Copyright [yyyy] [name of copyright owner]
19 % *
20 % * CDDL HEADER END
21 % *
22 % * Copyright 1989 Sun Microsystems, Inc.  All rights reserved.
23 % * Use is subject to license terms.
24 % */
25 %
26 %/*
27 % * This is NOT source code!
28 % * DO NOT EDIT THIS FILE!
29 % */
30 
31 const PBLEN  = 1024;
32 const DBLEN  = 4096;
33 enum answer {OK,GETDBM_EOF,GETDBM_ERROR};
34 
35 
36 typedef opaque pagblock[PBLEN];
37 typedef opaque dirblock[DBLEN];
38 typedef string pathname<1024>;
39 struct  hosereq{
40 pathname map;
41 pathname domain;
42 };
43 
44 struct pagdat {
45 int	blkno;
46 pagblock blkdat;
47 };
48 
49 struct dirdat {
50 int	blkno;
51 dirblock blkdat;
52 };
53 
54 
55 
56 union pag  switch (answer status){
57 case OK:
58 	pagdat ok;
59 
60 default:
61 	void;
62 };
63 
64 struct paglist {
65     struct pag d;
66     struct paglist *next;
67 };
68 
69 union dir  switch (answer status){
70 case OK:
71 	dirdat ok;
72 
73 default:
74 	void;
75 };
76 
77 
78 struct dirlist {
79     struct dir d;
80     struct dirlist *next;
81 };
82 struct du {
83 struct paglist p;
84 struct dirlist d;
85 
86 };
87 union dbmfyl switch (answer status){
88 case OK:
89 	struct du ok;
90 default :
91 	void;
92 };
93 
94 program YPXFRD {
95 	version V1{
96 	dbmfyl  getdbm(hosereq)=1;
97 	}=1;
98 }=100069;
99