summaryrefslogtreecommitdiffstats
path: root/sys/net/route.h
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2006-03-15 19:39:09 +0000
committerandre <andre@FreeBSD.org>2006-03-15 19:39:09 +0000
commit71d2be426c8d4c957d7a6ff97b44f40f70658dfb (patch)
tree7224bb46da1d4e67413b249aff1877bc52a6294d /sys/net/route.h
parent66352feceecbad66c181c2800cbdfe5009a5343f (diff)
downloadFreeBSD-src-71d2be426c8d4c957d7a6ff97b44f40f70658dfb.zip
FreeBSD-src-71d2be426c8d4c957d7a6ff97b44f40f70658dfb.tar.gz
- Fill in the correct rtm_index for RTM_ADD and RTM_CHANGE messages.
- Allow RTM_CHANGE to change a number of route flags as specified by RTF_FMASK. - The unused rtm_use field in struct rt_msghdr is redesignated as rtm_fmask field to communicate route flag changes in RTM_CHANGE messages from userland. The use count of a route was moved to rtm_rmx a long time ago. For source code compatibility reasons a define of rtm_use to rtm_fmask is provided. These changes faciliate running of multiple cooperating routing daemons at the same time without causing undesired interference. Open[BGP|OSPF]D make use of these features to have IGP routes override EGP ones. Obtained from: OpenBSD (claudio@) MFC after: 3 days
Diffstat (limited to 'sys/net/route.h')
-rw-r--r--sys/net/route.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/net/route.h b/sys/net/route.h
index b7f514c..b408213 100644
--- a/sys/net/route.h
+++ b/sys/net/route.h
@@ -169,6 +169,11 @@ struct ortentry {
#define RTF_MULTICAST 0x800000 /* route represents a mcast address */
/* 0x1000000 and up unassigned */
+/* Mask of RTF flags that are allowed to be modified by RTM_CHANGE. */
+#define RTF_FMASK \
+ (RTF_PROTO1 | RTF_PROTO2 | RTF_PROTO3 | RTF_BLACKHOLE | \
+ RTF_REJECT | RTF_STATIC)
+
/*
* Routing statistics.
*/
@@ -192,7 +197,8 @@ struct rt_msghdr {
pid_t rtm_pid; /* identify sender */
int rtm_seq; /* for sender to identify action */
int rtm_errno; /* why failed */
- int rtm_use; /* from rtentry */
+ int rtm_fmask; /* bitmask used in RTM_CHANGE message */
+#define rtm_use rtm_fmask /* deprecated, use rtm_rmx->rmx_pksent */
u_long rtm_inits; /* which metrics we are initializing */
struct rt_metrics rtm_rmx; /* metrics themselves */
};
OpenPOWER on IntegriCloud