1eb12b8eaSSimon J. Gerraty /*- 2*88a3358eSStephen J. Kiernan * SPDX-License-Identifier: BSD-2-Clause 3*88a3358eSStephen J. Kiernan * 4eb12b8eaSSimon J. Gerraty * Copyright (c) 2018, Juniper Networks, Inc. 5eb12b8eaSSimon J. Gerraty * 6eb12b8eaSSimon J. Gerraty * Redistribution and use in source and binary forms, with or without 7eb12b8eaSSimon J. Gerraty * modification, are permitted provided that the following conditions 8eb12b8eaSSimon J. Gerraty * are met: 9eb12b8eaSSimon J. Gerraty * 1. Redistributions of source code must retain the above copyright 10eb12b8eaSSimon J. Gerraty * notice, this list of conditions and the following disclaimer. 11eb12b8eaSSimon J. Gerraty * 2. Redistributions in binary form must reproduce the above copyright 12eb12b8eaSSimon J. Gerraty * notice, this list of conditions and the following disclaimer in the 13eb12b8eaSSimon J. Gerraty * documentation and/or other materials provided with the distribution. 14eb12b8eaSSimon J. Gerraty * 15eb12b8eaSSimon J. Gerraty * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16eb12b8eaSSimon J. Gerraty * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17eb12b8eaSSimon J. Gerraty * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18eb12b8eaSSimon J. Gerraty * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19eb12b8eaSSimon J. Gerraty * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20eb12b8eaSSimon J. Gerraty * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21eb12b8eaSSimon J. Gerraty * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22eb12b8eaSSimon J. Gerraty * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23eb12b8eaSSimon J. Gerraty * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24eb12b8eaSSimon J. Gerraty * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25eb12b8eaSSimon J. Gerraty * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26eb12b8eaSSimon J. Gerraty */ 27eb12b8eaSSimon J. Gerraty 28eb12b8eaSSimon J. Gerraty #ifndef __VERIEXEC_H__ 29eb12b8eaSSimon J. Gerraty #define __VERIEXEC_H__ 30eb12b8eaSSimon J. Gerraty 31eb12b8eaSSimon J. Gerraty #include <sys/ioctl.h> 32eb12b8eaSSimon J. Gerraty #include <dev/veriexec/veriexec_ioctl.h> 33eb12b8eaSSimon J. Gerraty 34eb12b8eaSSimon J. Gerraty extern int dev_fd; 35eb12b8eaSSimon J. Gerraty extern int parser_version; 36eb12b8eaSSimon J. Gerraty extern int ForceFlags; 37eb12b8eaSSimon J. Gerraty extern int Verbose; 38eb12b8eaSSimon J. Gerraty extern int VeriexecVersion; 39eb12b8eaSSimon J. Gerraty extern const char *Cdir; 40eb12b8eaSSimon J. Gerraty 41eb12b8eaSSimon J. Gerraty #define VERBOSE(n, x) if (Verbose > n) printf x 42eb12b8eaSSimon J. Gerraty 43eb12b8eaSSimon J. Gerraty FILE * manifest_open (const char *file, const char *file_content); 44eb12b8eaSSimon J. Gerraty void manifest_parser_init(void); 45eb12b8eaSSimon J. Gerraty int yyparse(void); 46eb12b8eaSSimon J. Gerraty extern FILE *yyin; 47eb12b8eaSSimon J. Gerraty 48eb12b8eaSSimon J. Gerraty #endif 49