Module Name: src Committed By: pgoyette Date: Tue Mar 26 12:21:28 UTC 2019
Modified Files: src/share/man/man4: Makefile Added Files: src/share/man/man4: srt.4 Log Message: Add a man page for srt(4). Thanks to wiz@ for reviewing. This man page is just a simple beginning. It can definitely use some more flesh on its bones. To generate a diff of this commit: cvs rdiff -u -r1.679 -r1.680 src/share/man/man4/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man4/srt.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/share/man/man4/Makefile diff -u src/share/man/man4/Makefile:1.679 src/share/man/man4/Makefile:1.680 --- src/share/man/man4/Makefile:1.679 Sun Mar 17 00:35:09 2019 +++ src/share/man/man4/Makefile Tue Mar 26 12:21:28 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.679 2019/03/17 00:35:09 tnn Exp $ +# $NetBSD: Makefile,v 1.680 2019/03/26 12:21:28 pgoyette Exp $ # @(#)Makefile 8.1 (Berkeley) 6/18/93 MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \ @@ -58,8 +58,8 @@ MAN= aac.4 ac97.4 acardide.4 aceride.4 a scsi.4 sctp.4 sd.4 se.4 seeprom.4 sem.4 \ ses.4 sf.4 sfb.4 sgsmix.4 shb.4 shmif.4 shpcic.4 si70xxtemp.4 \ siisata.4 siop.4 sip.4 siside.4 sk.4 sl.4 slide.4 \ - sm.4 smsh.4 sn.4 sony.4 spc.4 speaker.4 spif.4 sqphy.4 ss.4 ssdfb.4 \ - st.4 ste.4 stge.4 sti.4 stpcide.4 sv.4 strip.4 \ + sm.4 smsh.4 sn.4 sony.4 spc.4 speaker.4 spif.4 sqphy.4 srt.4 ss.4 \ + ssdfb.4 st.4 ste.4 stge.4 sti.4 stpcide.4 sv.4 strip.4 \ svwsata.4 swsensor.4 swwdog.4 sysmon.4 \ tap.4 tc.4 tcds.4 tcp.4 tcu.4 tdvfb.4 tea5767radio.4 termios.4 tfb.4 \ thinkpad.4 ti.4 tl.4 tlp.4 tlphy.4 tpm.4 tprof.4 tr.4 tra.4 \ Added files: Index: src/share/man/man4/srt.4 diff -u /dev/null src/share/man/man4/srt.4:1.1 --- /dev/null Tue Mar 26 12:21:28 2019 +++ src/share/man/man4/srt.4 Tue Mar 26 12:21:28 2019 @@ -0,0 +1,122 @@ +.\" $NetBSD: srt.4,v 1.1 2019/03/26 12:21:28 pgoyette Exp $ +.\" +.\" This file is in the public domain. +.\" +.Dd March 26, 2019 +.Dt SRT 4 +.Os +.Sh NAME +.Nm srt +.Nd source-routing network interface +.Sh SYNOPSIS +.Cd pseudo-device srt +.Sh DESCRIPTION +The +.Nm srt +interface is a software interface that implements source-address-based +routing. +Packets are directed to the +.Nm +interface using normal routing decision process. +Packets queued for delivery are then processed according to the rules +established for the interface using the +.Xr srtconfig 1 +utility. +.Pp +To use a +.Nm +device, the administrator must first create the interface. +This can be done by using the +.Xr ifconfig 8 +.Cm create +command. +An +.Xr open 2 +call on +.Pa /dev/srt Ns Sy N +will also create a network interface with the same unit number of +that device if it doesn't exist yet. +.Pp +The network interfaces should be named +.Sy srt Ns Ar 0 , +.Sy srt Ns Ar 1 , +etc. +The +.Nm +interface supports only the +.Xr open 2 , +.Xr close 2 , +and +.Xr ioctl 2 +operations; other operations such as +.Xr read 2 +and +.Xr write 2 +are not supported. +.Pp +All common +.Xr ioctl 2 +calls are supported by the +.Nm +interface. +In addition, the following +.Xr ioctl 2 +calls +.Pq defined in Aq Pa net/if_srt.h +are supported on the +.Nm +device: +.Bl -tag -width SRT_SGFLAGS -offset 4n +.It Dv SRT_GETNRT +The argument is a pointer to an integer, in which the number of +entries in the device's routing table is returned. +.It Dv SRT_GETRT +The argument is the address of a +.Fa struct srt_rt . +The routing table entry specified by the +.Dq inx +member is returned. +.It Dv SRT_SETRT +The argument is the address of a +.Fa struct srt_rt . +The routing entry is placed into the device's routing table at the +index specified by the +.Dq inx +member. +.It Dv SRT_DELRT +The argument is the address of a +.Fa struct srt_rt . +The routing entry specified by the +.Dq inx +member is deleted from the device's routing table. +(Any entries in the device's routing table with higher index values are +renumbered.) +.It Dv SRT_SFLAGS +The argument is a pointer to an integer containing any of the following +flags to be set: +.Bl -tag -width SSF_MTULOCK +.It Dv SSF_MTULOCK +If set, do not automatically update the interface's MTU. +.El +.It Dv SRT_GFLAGS +The argument is a pointer to an integer in which the current flags are +returned. +.It Dv SRT_SGFLAGS +Manipulates some global flags, none of which are currently defined. +.It Dv SRT_DEBUG +Currently this is a no-op. +.El +.Sh SEE ALSO +.Xr srtconfig 1 , +.Xr inet 4 , +.Xr intro 4 +.Sh HISTORY +.An -split +The +.Nm +device was added in +.Nx 5.0 +by +.An der Mouse Aq Mt mo...@netbsd.org . +This manual page was prepared by +.An Paul Goyette Aq Mt pgoye...@netbsd.org .