summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pim6sd/vif.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/pim6sd/vif.h')
-rw-r--r--usr.sbin/pim6sd/vif.h106
1 files changed, 53 insertions, 53 deletions
diff --git a/usr.sbin/pim6sd/vif.h b/usr.sbin/pim6sd/vif.h
index f3e3495..d81d657 100644
--- a/usr.sbin/pim6sd/vif.h
+++ b/usr.sbin/pim6sd/vif.h
@@ -29,8 +29,6 @@
*
* Other copyrights might apply to parts of this software and are so
* noted when applicable.
- *
- * $FreeBSD$
*/
/*
* Questions concerning this software should be directed to
@@ -38,12 +36,12 @@
*
*/
/*
- * This program has been derived from pim6dd.
+ * This program has been derived from pim6dd.
* The pim6dd program is covered by the license in the accompanying file
* named "LICENSE.pim6dd".
*/
/*
- * This program has been derived from pimd.
+ * This program has been derived from pimd.
* The pimd program is covered by the license in the accompanying file
* named "LICENSE.pimd".
*
@@ -56,10 +54,11 @@
* The mrouted program is COPYRIGHT 1989 by The Board of Trustees of
* Leland Stanford Junior University.
*
+ * $FreeBSD$
*/
#ifndef VIF_H
-#define VIF_H
+#define VIF_H
#include <sys/param.h>
#include <sys/time.h>
@@ -76,41 +75,41 @@ extern int total_interfaces;
extern int udp_socket;
extern struct uvif uvifs[];
extern vifi_t numvifs;
-extern int vifs_down;
+extern int vifs_down;
extern int phys_vif;
extern vifi_t reg_vif_num;
-#define NO_VIF ((vifi_t)MAXVIFS) /* An invalid vif index */
-#define DEFAULT_METRIC 1
-#define VIFF_DOWN 0x000100
-#define VIFF_DISABLED 0x000200
-#define VIFF_QUERIER 0x000400
-#define VIFF_REXMIT_PRUNES 0x004000
-#define VIFF_DR 0x040000
-#define VIFF_NONBRS 0x080000
-#define VIFF_PIM_NBR 0x200000
-#define VIFF_POINT_TO_POINT 0x400000
-#define NBRTYPE u_long
-#define NBRBITS sizeof(NBRTYPE) *8
+#define NO_VIF ((vifi_t)MAXVIFS) /* An invalid vif index */
+#define DEFAULT_METRIC 1
+#define VIFF_DOWN 0x000100
+#define VIFF_DISABLED 0x000200
+#define VIFF_QUERIER 0x000400
+#define VIFF_REXMIT_PRUNES 0x004000
+#define VIFF_DR 0x040000
+#define VIFF_NONBRS 0x080000
+#define VIFF_PIM_NBR 0x200000
+#define VIFF_POINT_TO_POINT 0x400000
+#define NBRTYPE u_long
+#define NBRBITS sizeof(NBRTYPE) *8
extern if_set if_nullset;
-#define IF_ISEMPTY(p) (memcmp((p), &if_nullset, sizeof(if_nullset)) == 0)
-#define IF_SAME(p1, p2) (memcmp((p1),(p2),sizeof(*(p1))) == 0)
-#define IF_CLR_MASK(p, mask) \
+#define IF_ISEMPTY(p) (memcmp((p), &if_nullset, sizeof(if_nullset)) == 0)
+#define IF_SAME(p1, p2) (memcmp((p1),(p2),sizeof(*(p1))) == 0)
+#define IF_CLR_MASK(p, mask) \
{\
int idx;\
for (idx = 0; idx < sizeof(*(p))/sizeof(fd_mask); idx++) {\
(p)->ifs_bits[idx] &= ~((mask)->ifs_bits[idx]);\
}\
}
-#define IF_MERGE(p1, p2, result) \
+#define IF_MERGE(p1, p2, result) \
{\
int idx;\
for (idx = 0; idx < sizeof(*(p1))/sizeof(fd_mask); idx++) {\
(result)->ifs_bits[idx] = (p1)->ifs_bits[idx]|(p2)->ifs_bits[idx]; \
}\
- }
+ }
typedef struct {
NBRTYPE hi;
@@ -122,12 +121,12 @@ struct vf_element {
struct sockaddr_in6 *vfe_addr;
struct in6_addr vfe_mask;
int vfe_flags;
-#define VFRF_EXACT 0x0001
+#define VFRF_EXACT 0x0001
};
-#define VFT_ACCEPT 1
-#define VFT_DENY 2
-#define VFF_BIDIR 1
+#define VFT_ACCEPT 1
+#define VFT_DENY 2
+#define VFF_BIDIR 1
struct vif_filter {
int vf_type;
@@ -143,9 +142,9 @@ struct listaddr {
union {
u_int32 alu_genid; /* generation id for neighbor */
struct sockaddr_in6 alu_reporter; /* a host which reported membership */
- } al_alu;
+ } al_alu;
u_char al_pv; /* router protocol version */
- u_char al_mv; /* router mrouted version */
+ u_char al_mv; /* router mrouted version */
u_char al_old; /* time since heard old report */
u_char al_index; /* neighbor index */
u_long al_timerid; /* timer for group membership */
@@ -153,15 +152,15 @@ struct listaddr {
u_int16 al_flags; /* flags related to this neighbor */
};
-#define al_genid al_alu.alu_genid
-#define al_reporter al_alu.alu_reporter
+#define al_genid al_alu.alu_genid
+#define al_reporter al_alu.alu_reporter
/*
- * User level Virtual Interface structure
+ * User level Virtual Interface structure
*
* A "virtual interface" is either a physical, multicast-capable interface
* (called a "phyint"), a virtual point-to-point link (called a "tunnel")
- * or a "register vif" used by PIM. The register vif is used by the
+ * or a "register vif" used by PIM. The register vif is used by the
* Designated Router (DR) to send encapsulated data packets to the
* Rendevous Point (RP) for a particular group. The data packets are
* encapsulated in PIM messages (IPPROTO_PIM = 103) and then unicast to
@@ -169,34 +168,34 @@ struct listaddr {
* (Note: all addresses, subnet numbers and masks are kept in NETWORK order.)
*/
struct uvif {
- u_int uv_flags;
+ u_int uv_flags;
u_char uv_metric; /* VIFF_ flags defined below */
u_char uv_admetric; /* advertised cost of this vif */
u_int uv_rate_limit; /* rate limit on this vif */
struct phaddr *uv_linklocal; /* link-local address of this vif */
- struct sockaddr_in6 uv_rmt_addr;/* remote end-point addr (tunnels only) */
- struct sockaddr_in6 uv_dst_addr;/* destination for PIM messages */
- struct sockaddr_in6 uv_prefix; /* prefix (phyints only) */
- struct in6_addr uv_subnetmask; /* subnet mask (phyints only) */
+ struct sockaddr_in6 uv_rmt_addr;/* remote end-point addr (tunnels only) */
+ struct sockaddr_in6 uv_dst_addr;/* destination for PIM messages */
+ struct sockaddr_in6 uv_prefix; /* prefix (phyints only) */
+ struct in6_addr uv_subnetmask; /* subnet mask (phyints only) */
- char uv_name[IFNAMSIZ]; /* interface name */
+ char uv_name[IFNAMSIZ]; /* interface name */
u_int uv_ifindex; /* index of the interface */
u_int uv_siteid; /* index of the site on the interface */
struct listaddr *uv_groups; /* list of local groups (phyints only) */
struct lisaddr *uv_dvmrp_neighbors;
nbrbitmap_t uv_nbrmap; /* bitmap of active neighboring routers */
- struct listaddr *uv_querier; /* MLD querier on vif */
+ struct listaddr *uv_querier; /* MLD querier on vif */
int uv_prune_lifetime; /* Prune lifetime or 0 for default */
- struct vif_acl *uv_acl; /* access control list of groups */
+ struct vif_acl *uv_acl; /* access control list of groups */
int uv_leaftimer; /* time until this vif is considrd leaf */
struct phaddr *uv_addrs; /* Additional addresses on this vif */
struct vif_filter *uvfilter; /* Route filters on this vif */
u_int16 uv_pim_hello_timer; /* timer for sending PIM hello msgs */
u_int16 uv_gq_timer; /* Group Query timer */
- u_int16 uv_jp_timer; /* Join/Prune timer */
- int uv_local_pref; /* default local preference for assert */
+ u_int16 uv_jp_timer; /* Join/Prune timer */
+ int uv_local_pref; /* default local preference for assert */
int uv_local_metric; /* default local metric for assert */
struct pim_nbr_entry *uv_pim_neighbors; /* list of PIM nbr routers */
@@ -227,6 +226,7 @@ struct uvif {
/* occurrences of timeouts */
u_quad_t uv_pim6_nbr_timo;
u_quad_t uv_listener_timo;
+ u_quad_t uv_querier_timo;
u_quad_t uv_outif_timo; /* outgoing interfaces timers */
};
@@ -239,7 +239,7 @@ struct phaddr {
/* The Access Control List (list with scoped addresses) member */
-#define VIFF_NOLISTENER 0x800000 /* no listener on the link */
+#define VIFF_NOLISTENER 0x800000 /* no listener on the link */
struct vif_acl {
struct vif_acl *acl_next;
@@ -247,7 +247,7 @@ struct vif_acl {
struct in6_addr acl_mask;
};
-/*
+/*
* Used to get the RPF neighbor and IIF info
* for a given source from the unicast routing table.
*/
@@ -256,22 +256,22 @@ struct rpfctl {
struct sockaddr_in6 source; /* the source for which we want iif and rpfnbr */
struct sockaddr_in6 rpfneighbor;/* next hop towards the source */
vifi_t iif; /* the incoming interface to reach the next hop */
-};
+};
-extern void init_vifs __P(());
-extern void stop_all_vifs __P(());
-extern void check_vif_state __P(());
-struct sockaddr_in6 * max_global_address();
-struct sockaddr_in6 * uv_global __P(());
+extern void init_vifs __P((void));
+extern void stop_all_vifs __P((void));
+extern void check_vif_state __P((void));
+struct sockaddr_in6 * max_global_address __P((void));
+struct sockaddr_in6 * uv_global __P((vifi_t));
extern vifi_t local_address __P((struct sockaddr_in6 *src));
-struct sockaddr_in6 * local_iface( char *ifname );
+struct sockaddr_in6 * local_iface __P((char *ifname));
extern vifi_t find_vif_direct __P((struct sockaddr_in6 *src));
extern vifi_t find_vif_direct_local __P((struct sockaddr_in6 *src));
extern int vif_forwarder __P((if_set *p1 ,if_set *p2));
-extern if_set *vif_and __P((if_set *p1, if_set *p2, if_set *result));
+extern if_set *vif_and __P((if_set *p1, if_set *p2, if_set *result));
extern if_set *vif_xor __P((if_set *p1, if_set *p2, if_set *result));
extern struct uvif *find_vif __P((char *ifname));
#endif
OpenPOWER on IntegriCloud