xref: /freebsd/sbin/devd/devd.h (revision b3e7694832e81d7a904a10f525f8797b753bf0d3)
1e530e044SWarner Losh /*-
2e530e044SWarner Losh  * DEVD (Device action daemon)
3e530e044SWarner Losh  *
4*4d846d26SWarner Losh  * SPDX-License-Identifier: BSD-2-Clause
51de7b4b8SPedro F. Giffuni  *
6f86e6000SWarner Losh  * Copyright (c) 2002 M. Warner Losh <imp@FreeBSD.org>
7e530e044SWarner Losh  *
8e530e044SWarner Losh  * Redistribution and use in source and binary forms, with or without
9e530e044SWarner Losh  * modification, are permitted provided that the following conditions
10e530e044SWarner Losh  * are met:
11e530e044SWarner Losh  * 1. Redistributions of source code must retain the above copyright
12e530e044SWarner Losh  *    notice, this list of conditions and the following disclaimer.
13e530e044SWarner Losh  * 2. Redistributions in binary form must reproduce the above copyright
14e530e044SWarner Losh  *    notice, this list of conditions and the following disclaimer in the
15e530e044SWarner Losh  *    documentation and/or other materials provided with the distribution.
16e530e044SWarner Losh  *
17e530e044SWarner Losh  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18e530e044SWarner Losh  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19e530e044SWarner Losh  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20e530e044SWarner Losh  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21e530e044SWarner Losh  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22e530e044SWarner Losh  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23e530e044SWarner Losh  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24e530e044SWarner Losh  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25e530e044SWarner Losh  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26e530e044SWarner Losh  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27e530e044SWarner Losh  * SUCH DAMAGE.
28e530e044SWarner Losh  */
29e530e044SWarner Losh 
306aeeca8eSWarner Losh #ifndef DEVD_H
316aeeca8eSWarner Losh #define DEVD_H
326aeeca8eSWarner Losh 
336aeeca8eSWarner Losh /** @warning This file needs to be purely 'C' compatible.
346aeeca8eSWarner Losh  */
353054f218SWarner Losh struct event_proc;
363054f218SWarner Losh struct eps;
373054f218SWarner Losh __BEGIN_DECLS
383054f218SWarner Losh void add_attach(int, struct event_proc *);
393054f218SWarner Losh void add_detach(int, struct event_proc *);
40e530e044SWarner Losh void add_directory(const char *);
413054f218SWarner Losh void add_nomatch(int, struct event_proc *);
42842ccec5SWarner Losh void add_notify(int, struct event_proc *);
433054f218SWarner Losh struct event_proc *add_to_event_proc(struct event_proc *, struct eps *);
443054f218SWarner Losh struct eps *new_match(const char *, const char *);
45cd70782bSWarner Losh struct eps *new_media(const char *, const char *);
463054f218SWarner Losh struct eps *new_action(const char *);
473054f218SWarner Losh void set_pidfile(const char *);
483054f218SWarner Losh void set_variable(const char *, const char *);
493054f218SWarner Losh void yyerror(const char *s);
503054f218SWarner Losh int  yylex(void);
513054f218SWarner Losh int  yyparse(void);
52f405a1beSEitan Adler extern int lineno;
533054f218SWarner Losh __END_DECLS
54e530e044SWarner Losh 
553054f218SWarner Losh #define PATH_DEVCTL	"/dev/devctl"
560425e016SAlan Somers #define DEVCTL_MAXBUF	8192
576aeeca8eSWarner Losh 
586aeeca8eSWarner Losh #endif /* DEVD_H */
59