178828Sobrien/* SPDX-License-Identifier: BSD-2-Clause */ 278828Sobrien/* 378828Sobrien * dhcpcd - DHCP client daemon 460484Sobrien * Copyright (c) 2006-2023 Roy Marples <roy@marples.name> 578828Sobrien * All rights reserved 678828Sobrien 778828Sobrien * Redistribution and use in source and binary forms, with or without 878828Sobrien * modification, are permitted provided that the following conditions 978828Sobrien * are met: 1078828Sobrien * 1. Redistributions of source code must retain the above copyright 1178828Sobrien * notice, this list of conditions and the following disclaimer. 1278828Sobrien * 2. Redistributions in binary form must reproduce the above copyright 1378828Sobrien * notice, this list of conditions and the following disclaimer in the 1478828Sobrien * documentation and/or other materials provided with the distribution. 1578828Sobrien * 1678828Sobrien * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1778828Sobrien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1878828Sobrien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1960484Sobrien * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 2060484Sobrien * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2160484Sobrien * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2260484Sobrien * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2360484Sobrien * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2460484Sobrien * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2589857Sobrien * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2689857Sobrien * SUCH DAMAGE. 2789857Sobrien */ 2889857Sobrien 2960484Sobrien#ifndef SCRIPT_H 3060484Sobrien#define SCRIPT_H 3160484Sobrien 3260484Sobrien#include "control.h" 3360484Sobrien 3460484Sobrien__printflike(2, 3) int efprintf(FILE *, const char *, ...); 3560484Sobrienvoid if_printoptions(void); 3660484Sobrienchar ** script_buftoenv(struct dhcpcd_ctx *, char *, size_t); 3760484Sobrienpid_t script_exec(char *const *, char *const *); 3860484Sobrienint send_interface(struct fd_list *, const struct interface *, int); 3960484Sobrienint script_dump(const char *, size_t); 4060484Sobrienint script_runreason(const struct interface *, const char *); 4160484Sobrien#endif 4260484Sobrien