1/* $OpenBSD: frontend.h,v 1.9 2021/01/27 08:30:50 florian Exp $ */ 2 3/* 4 * Copyright (c) 2018 Florian Obser <florian@openbsd.org> 5 * Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org> 6 * 7 * Permission to use, copy, modify, and distribute this software for any 8 * purpose with or without fee is hereby granted, provided that the above 9 * copyright notice and this permission notice appear in all copies. 10 * 11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 16 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 17 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20#define HAVE_IPV4 1 21#define HAVE_IPV6 2 22 23struct trust_anchor { 24 TAILQ_ENTRY(trust_anchor) entry; 25 char *ta; 26}; 27 28TAILQ_HEAD(trust_anchor_head, trust_anchor); 29 30struct imsg_rdns_proposal { 31 uint32_t if_index; 32 int src; 33 struct sockaddr_rtdns rtdns; 34}; 35 36struct dns64_prefix { 37 struct in6_addr in6; 38 int prefixlen; 39 int flags; 40}; 41 42void frontend(int, int); 43void frontend_dispatch_main(int, short, void *); 44void frontend_dispatch_resolver(int, short, void *); 45int frontend_imsg_compose_main(int, pid_t, void *, uint16_t); 46int frontend_imsg_compose_resolver(int, pid_t, void *, uint16_t); 47char *ip_port(struct sockaddr *); 48void add_new_ta(struct trust_anchor_head *, char *); 49void free_tas(struct trust_anchor_head *); 50int merge_tas(struct trust_anchor_head *, 51 struct trust_anchor_head *); 52