Date: Mon, 5 Jun 2006 15:53:55 -0400 (EDT) From: David Gilbert <dgilbert@daveg.ca> To: FreeBSD-gnats-submit@FreeBSD.org Subject: docs/98541: tun man page references obsolite ioctl Message-ID: <20060605195355.4C1244AC2D@canoe.dclg.ca> Resent-Message-ID: <200606052000.k55K0gF0056025@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 98541 >Category: docs >Synopsis: tun man page references obsolite ioctl >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Mon Jun 05 20:00:42 GMT 2006 >Closed-Date: >Last-Modified: >Originator: David Gilbert >Release: FreeBSD 6.1-STABLE i386 >Organization: DaveG.ca >Environment: System: FreeBSD canoe.dclg.ca 6.1-STABLE FreeBSD 6.1-STABLE #7: Sun Jun 4 18:23:37 EDT 2006 dgilbert@canoe.dclg.ca:/usr/src/sys/i386/compile/CANOE i386 As above >Description: tun.4 currently references SIOCSIFADDR. When asking about this, I received: From: "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net> To: David Gilbert <dgilbert@dclg.ca> Cc: freebsd-hackers@freebsd.org Date: Mon, 5 Jun 2006 19:36:20 +0000 (UTC) X-SpamProbe: GOOD 0.0000051 239939e801214c8c84129231bc5ca32c On Mon, 5 Jun 2006, David Gilbert wrote: > I read in the if_tun manpage that it supports SIOCSIFADDR (such that > it works with ifconfig). I like examples, so I search the ifconfig > source code for SIOCSIFADDR. None. Then I search the entire source > tree. ppp uses it to set the IPX address. Obviously SIOCSIFADDR is > not the preferred way to do this anymore. Hints? SIOCSIFADDR/SIOCSIFDSTADDR was deprecated about 10 years ago. See man 4 netintro /Calls which are now deprecated are . If you want SIOCSIFADDR/SIOCSIFDSTADDR for tun you need a patch I have in my tree. SIOCAIFADDR is what you really want. Look at ppp sources for examples for example. >How-To-Repeat: man 4 tun >Fix: *** tun.4.orig Mon Jun 5 15:49:27 2006 --- tun.4 Mon Jun 5 15:51:12 2006 *************** *** 65,73 **** Each interface supports the usual network-interface .Xr ioctl 2 Ns s , such as ! .Dv SIOCSIFADDR ! and ! .Dv SIOCSIFNETMASK , and thus can be used with .Xr ifconfig 8 like any other interface. --- 65,71 ---- Each interface supports the usual network-interface .Xr ioctl 2 Ns s , such as ! .Dv SIOCAIFADDR and thus can be used with .Xr ifconfig 8 like any other interface. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060605195355.4C1244AC2D>