1 /* $OpenBSD: ifconfig.h,v 1.2 2019/10/24 18:54:10 bluhm Exp $ */ 2 3 /* 4 * Copyright (c) 2009 Claudio Jeker <claudio@openbsd.org> 5 * 6 * Permission to use, copy, modify, and distribute this software for any 7 * purpose with or without fee is hereby granted, provided that the above 8 * copyright notice and this permission notice appear in all copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 extern int aflag; 20 extern int ifaliases; 21 extern int sock; 22 extern char ifname[IFNAMSIZ]; 23 24 void printb(char *, unsigned int, unsigned char *); 25 26 void setdiscover(const char *, int); 27 void unsetdiscover(const char *, int); 28 void setblocknonip(const char *, int); 29 void unsetblocknonip(const char *, int); 30 void setlearn(const char *, int); 31 void unsetlearn(const char *, int); 32 void setstp(const char *, int); 33 void unsetstp(const char *, int); 34 void setedge(const char *, int); 35 void unsetedge(const char *, int); 36 void setautoedge(const char *, int); 37 void unsetautoedge(const char *, int); 38 void setptp(const char *, int); 39 void unsetptp(const char *, int); 40 void setautoptp(const char *, int); 41 void unsetautoptp(const char *, int); 42 void addlocal(const char *, int); 43 44 void bridge_add(const char *, int); 45 void bridge_delete(const char *, int); 46 void bridge_addspan(const char *, int); 47 void bridge_delspan(const char *, int); 48 void bridge_flush(const char *, int); 49 void bridge_flushall(const char *, int); 50 void bridge_addaddr(const char *, const char *); 51 void bridge_deladdr(const char *, int); 52 void bridge_maxaddr(const char *, int); 53 void bridge_addrs(const char *, int); 54 void bridge_hellotime(const char *, int); 55 void bridge_fwddelay(const char *, int); 56 void bridge_maxage(const char *, int); 57 void bridge_protect(const char *, const char *); 58 void bridge_unprotect(const char *, int); 59 void bridge_proto(const char *, int); 60 void bridge_ifprio(const char *, const char *); 61 void bridge_ifcost(const char *, const char *); 62 void bridge_noifcost(const char *, int); 63 void bridge_timeout(const char *, int); 64 void bridge_holdcnt(const char *, int); 65 void bridge_priority(const char *, int); 66 void bridge_rules(const char *, int); 67 void bridge_rulefile(const char *, int); 68 void bridge_flushrule(const char *, int); 69 int is_bridge(void); 70 void bridge_status(void); 71 int bridge_rule(int, char **, int); 72 void switch_status(void); 73 void switch_datapathid(const char *, int); 74 void switch_portno(const char *, const char *); 75 76 int if_sff_info(int); 77