replace reference to getkerninfo(2) with reference to sysctl(3),
resync structures and definitions with <net/route.h>; PR 2007 also add SEE ALSO section, and misc. cleanup
This commit is contained in:
parent
499dd92e9d
commit
b6b71e4383
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: route.4,v 1.3 1994/11/30 16:22:31 jtc Exp $
|
||||
.\" $NetBSD: route.4,v 1.4 1997/01/16 06:50:16 mikel Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1990, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
|
@ -116,7 +116,7 @@ to a specific address family by specifying which one is desired.
|
|||
There can be more than one routing socket open per system.
|
||||
.Pp
|
||||
Messages are formed by a header followed by a small
|
||||
number of sockadders (now variable length particularly
|
||||
number of sockaddrs (now variable length particularly
|
||||
in the
|
||||
.Tn ISO
|
||||
case), interpreted by position, and delimited
|
||||
|
@ -131,7 +131,7 @@ to most significant bit within the vector.
|
|||
.Pp
|
||||
Any messages sent to the kernel are returned, and copies are sent
|
||||
to all interested listeners. The kernel will provide the process
|
||||
id. for the sender, and the sender may use an additional sequence
|
||||
ID for the sender, and the sender may use an additional sequence
|
||||
field to distinguish between outstanding messages. However,
|
||||
message replies may be lost when kernel buffers are exhausted.
|
||||
.Pp
|
||||
|
@ -150,7 +150,7 @@ or
|
|||
.Dv ENOBUFS
|
||||
if insufficient resources were available
|
||||
to install a new route.
|
||||
In the current implementation, all routing process run locally,
|
||||
In the current implementation, all routing processes run locally,
|
||||
and the values for
|
||||
.Ar rtm_errno
|
||||
are available through the normal
|
||||
|
@ -181,9 +181,8 @@ entry to a specific destination by using a
|
|||
message,
|
||||
or by reading the
|
||||
.Pa /dev/kmem
|
||||
device, or by issuing a
|
||||
.Xr getkerninfo 2
|
||||
system call.
|
||||
device, or by calling
|
||||
.Xr sysctl 3 .
|
||||
.Pp
|
||||
Messages include:
|
||||
.Bd -literal
|
||||
|
@ -191,10 +190,13 @@ Messages include:
|
|||
#define RTM_DELETE 0x2 /* Delete Route */
|
||||
#define RTM_CHANGE 0x3 /* Change Metrics, Flags, or Gateway */
|
||||
#define RTM_GET 0x4 /* Report Information */
|
||||
#define RTM_LOOSING 0x5 /* Kernel Suspects Partitioning */
|
||||
#define RTM_LOSING 0x5 /* Kernel Suspects Partitioning */
|
||||
#define RTM_REDIRECT 0x6 /* Told to use different route */
|
||||
#define RTM_MISS 0x7 /* Lookup failed on this address */
|
||||
#define RTM_RESOLVE 0xb /* request to resolve dst to LL addr */
|
||||
#define RTM_NEWADDR 0xc /* address being added to iface */
|
||||
#define RTM_DELADDR 0xd /* address being removed from iface */
|
||||
#define RTM_IFINFO 0xe /* iface going up/down etc. */
|
||||
.Ed
|
||||
.Pp
|
||||
A message header consists of:
|
||||
|
@ -204,11 +206,11 @@ struct rt_msghdr {
|
|||
u_char rtm_version; /* future binary compatibility */
|
||||
u_char rtm_type; /* message type */
|
||||
u_short rmt_index; /* index for associated ifp */
|
||||
pid_t rmt_pid; /* identify sender */
|
||||
int rtm_flags; /* flags, incl kern & message, e.g. DONE */
|
||||
int rtm_addrs; /* bitmask identifying sockaddrs in msg */
|
||||
pid_t rmt_pid; /* identify sender */
|
||||
int rtm_seq; /* for sender to identify action */
|
||||
int rtm_errno; /* why failed */
|
||||
int rtm_flags; /* flags, incl kern & message, e.g. DONE */
|
||||
int rtm_use; /* from rtentry */
|
||||
u_long rtm_inits; /* which values we are initializing */
|
||||
struct rt_metrics rtm_rmx; /* metrics themselves */
|
||||
|
@ -227,6 +229,7 @@ struct rt_metrics {
|
|||
u_long rmx_ssthresh; /* outbound gateway buffer limit */
|
||||
u_long rmx_rtt; /* estimated round trip time */
|
||||
u_long rmx_rttvar; /* estimated rtt variance */
|
||||
u_long rmx_pksent; /* packets sent using this route */
|
||||
};
|
||||
.Ed
|
||||
.Pp
|
||||
|
@ -245,19 +248,20 @@ Flags include the values:
|
|||
#define RTF_LLINFO 0x400 /* generated by ARP or ESIS */
|
||||
#define RTF_STATIC 0x800 /* manually added */
|
||||
#define RTF_BLACKHOLE 0x1000 /* just discard pkts (during updates) */
|
||||
#define RTF_PROTO2 0x4000 /* protocol specific routing flag #1 */
|
||||
#define RTF_PROTO1 0x8000 /* protocol specific routing flag #2 */
|
||||
#define RTF_PROTO2 0x4000 /* protocol specific routing flag */
|
||||
#define RTF_PROTO1 0x8000 /* protocol specific routing flag */
|
||||
.Ed
|
||||
.Pp
|
||||
Specifiers for metric values in rmx_locks and rtm_inits are:
|
||||
.Bd -literal
|
||||
#define RTV_SSTHRESH 0x1 /* init or lock _ssthresh */
|
||||
#define RTV_RPIPE 0x2 /* init or lock _recvpipe */
|
||||
#define RTV_SPIPE 0x4 /* init or lock _sendpipe */
|
||||
#define RTV_HOPCOUNT 0x8 /* init or lock _hopcount */
|
||||
#define RTV_RTT 0x10 /* init or lock _rtt */
|
||||
#define RTV_RTTVAR 0x20 /* init or lock _rttvar */
|
||||
#define RTV_MTU 0x40 /* init or lock _mtu */
|
||||
#define RTV_MTU 0x1 /* init or lock _mtu */
|
||||
#define RTV_HOPCOUNT 0x2 /* init or lock _hopcount */
|
||||
#define RTV_EXPIRE 0x4 /* init or lock _expire */
|
||||
#define RTV_RPIPE 0x8 /* init or lock _recvpipe */
|
||||
#define RTV_SPIPE 0x10 /* init or lock _sendpipe */
|
||||
#define RTV_SSTHRESH 0x20 /* init or lock _ssthresh */
|
||||
#define RTV_RTT 0x40 /* init or lock _rtt */
|
||||
#define RTV_RTTVAR 0x80 /* init or lock _rttvar */
|
||||
.Ed
|
||||
.Pp
|
||||
Specifiers for which addresses are present in the messages are:
|
||||
|
@ -269,4 +273,8 @@ Specifiers for which addresses are present in the messages are:
|
|||
#define RTA_IFP 0x10 /* interface name sockaddr present */
|
||||
#define RTA_IFA 0x20 /* interface addr sockaddr present */
|
||||
#define RTA_AUTHOR 0x40 /* sockaddr for author of redirect */
|
||||
#define RTA_BRD 0x80 /* for NEWADDR, broadcast or p-p dest addr */
|
||||
.Ed
|
||||
.Sh SEE ALSO
|
||||
.Xr socket 2 ,
|
||||
.Xr sysctl 3
|
||||
|
|
Loading…
Reference in New Issue