1270096Strasz/*- 2270096Strasz * Copyright (c) 2013 The FreeBSD Foundation 3270096Strasz * All rights reserved. 4270096Strasz * 5270096Strasz * This software was developed by Edward Tomasz Napierala under sponsorship 6270096Strasz * from the FreeBSD Foundation. 7270096Strasz * 8270096Strasz * Redistribution and use in source and binary forms, with or without 9270096Strasz * modification, are permitted provided that the following conditions 10270096Strasz * are met: 11270096Strasz * 1. Redistributions of source code must retain the above copyright 12270096Strasz * notice, this list of conditions and the following disclaimer. 13270096Strasz * 2. Redistributions in binary form must reproduce the above copyright 14270096Strasz * notice, this list of conditions and the following disclaimer in the 15270096Strasz * documentation and/or other materials provided with the distribution. 16270096Strasz * 17270096Strasz * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18270096Strasz * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19270096Strasz * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20270096Strasz * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21270096Strasz * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22270096Strasz * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23270096Strasz * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24270096Strasz * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25270096Strasz * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26270096Strasz * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27270096Strasz * SUCH DAMAGE. 28270096Strasz * 29270096Strasz * $FreeBSD: releng/10.2/sys/fs/autofs/autofs_ioctl.h 279741 2015-03-07 19:32:19Z trasz $ 30270096Strasz */ 31270096Strasz 32270096Strasz#ifndef AUTOFS_IOCTL_H 33270096Strasz#define AUTOFS_IOCTL_H 34270096Strasz 35270096Strasz#define AUTOFS_PATH "/dev/autofs" 36270096Strasz 37270096Straszstruct autofs_daemon_request { 38270096Strasz /* 39270096Strasz * Request identifier. 40270096Strasz */ 41270096Strasz int adr_id; 42270096Strasz 43270096Strasz /* 44270096Strasz * The "from" field, containing map name. For example, 45270096Strasz * when accessing '/net/192.168.1.3/tank/vm/', that would 46270096Strasz * be '-hosts'. 47270096Strasz */ 48270096Strasz char adr_from[MAXPATHLEN]; 49270096Strasz 50270096Strasz /* 51270096Strasz * Full path to the node being looked up; for requests that result 52270096Strasz * in actual mount it is the full mount path. 53270096Strasz */ 54270096Strasz char adr_path[MAXPATHLEN]; 55270096Strasz 56270096Strasz /* 57270096Strasz * Prefix, which is basically the mountpoint from auto_master(5). 58270096Strasz * In example above that would be "/net"; for direct maps it is "/". 59270096Strasz */ 60270096Strasz char adr_prefix[MAXPATHLEN]; 61270096Strasz 62270096Strasz /* 63270096Strasz * Map key, also used as command argument for dynamic maps; in example 64270096Strasz * above that would be '192.168.1.3'. 65270096Strasz */ 66270096Strasz char adr_key[MAXPATHLEN]; 67270096Strasz 68270096Strasz /* 69270096Strasz * Mount options from auto_master(5). 70270096Strasz */ 71270096Strasz char adr_options[MAXPATHLEN]; 72270096Strasz}; 73270096Strasz 74279741Strasz/* 75279741Strasz * Compatibility with 10.1-RELEASE automountd(8). 76279741Strasz */ 77279741Straszstruct autofs_daemon_done_101 { 78279741Strasz /* 79279741Strasz * Identifier, copied from adr_id. 80279741Strasz */ 81279741Strasz int add_id; 82279741Strasz 83279741Strasz /* 84279741Strasz * Error number, possibly returned to userland. 85279741Strasz */ 86279741Strasz int add_error; 87279741Strasz}; 88279741Strasz 89270096Straszstruct autofs_daemon_done { 90270096Strasz /* 91270096Strasz * Identifier, copied from adr_id. 92270096Strasz */ 93270096Strasz int add_id; 94270096Strasz 95270096Strasz /* 96279741Strasz * Set to 1 if the map may contain wildcard entries; 97279741Strasz * otherwise autofs will do negative caching. 98279741Strasz */ 99279741Strasz int add_wildcards; 100279741Strasz 101279741Strasz /* 102270096Strasz * Error number, possibly returned to userland. 103270096Strasz */ 104270096Strasz int add_error; 105279741Strasz 106279741Strasz /* 107279741Strasz * Reserved for future use. 108279741Strasz */ 109279741Strasz int add_spare[7]; 110270096Strasz}; 111270096Strasz 112270096Strasz#define AUTOFSREQUEST _IOR('I', 0x01, struct autofs_daemon_request) 113279741Strasz#define AUTOFSDONE101 _IOW('I', 0x02, struct autofs_daemon_done_101) 114279741Strasz#define AUTOFSDONE _IOW('I', 0x03, struct autofs_daemon_done) 115270096Strasz 116270096Strasz#endif /* !AUTOFS_IOCTL_H */ 117