summaryrefslogtreecommitdiff
path: root/sys/net/if.h
diff options
context:
space:
mode:
authorRyan Thomas McBride <mcbride@cvs.openbsd.org>2004-12-07 20:38:48 +0000
committerRyan Thomas McBride <mcbride@cvs.openbsd.org>2004-12-07 20:38:48 +0000
commitfb57e0b916c473252a6496414904b7a5ec797aad (patch)
tree87858173870951839673c0a7203ce1707d7e3d3c /sys/net/if.h
parent749b9bf7811e95b1f3388eb7967d751b53097779 (diff)
Convert carp(4) to behave more like a regular interface, much in the same
style as vlan(4). carp interfaces no longer require the physical interface to be on the same subnet as the carp interface, or even that the physical interface has an adress at all, so CARP can now be used on /30 networks. ok deraadt@ henning@
Diffstat (limited to 'sys/net/if.h')
-rw-r--r--sys/net/if.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/net/if.h b/sys/net/if.h
index 7c777339863..64be1d6b9e5 100644
--- a/sys/net/if.h
+++ b/sys/net/if.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.h,v 1.61 2004/12/07 19:26:46 mcbride Exp $ */
+/* $OpenBSD: if.h,v 1.62 2004/12/07 20:38:46 mcbride Exp $ */
/* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */
/*
@@ -180,7 +180,12 @@ struct ifnet { /* and the entries */
int if_pcount; /* number of promiscuous listeners */
caddr_t if_bpf; /* packet filter structure */
caddr_t if_bridge; /* bridge structure */
- caddr_t if_carp; /* carp structure */
+ union {
+ caddr_t carp_s; /* carp structure (used by !carp ifs) */
+ struct ifnet *carp_d; /* ptr to carpdev (used by carp ifs) */
+ } if_carp_ptr;
+#define if_carp if_carp_ptr.carp_s
+#define if_carpdev if_carp_ptr.carp_d
u_short if_index; /* numeric abbreviation for this if */
short if_timer; /* time 'til if_watchdog called */
short if_flags; /* up/down, broadcast, etc. */